1 |
commit: 6d52b7a90cf8e0973a42037cf7520e87a706f6e5 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 22 03:48:48 2019 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 22 03:50:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d52b7a9 |
7 |
|
8 |
media-libs/mesa: Version bump to 19.0.5 |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
media-libs/mesa/Manifest | 1 + |
13 |
media-libs/mesa/mesa-19.0.5.ebuild | 525 +++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 526 insertions(+) |
15 |
|
16 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
17 |
index 340ed2b2682..f41fbd8c57f 100644 |
18 |
--- a/media-libs/mesa/Manifest |
19 |
+++ b/media-libs/mesa/Manifest |
20 |
@@ -2,5 +2,6 @@ DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d0 |
21 |
DIST mesa-19.0.2.tar.xz 11959876 BLAKE2B 4d82a339a1577fb156b48d330157894891326f36cb265421453a5fde5086ee05f83962fde49113f34917f750cfffb40c8bce84bd003fe9d7c1e6900c52dc4d66 SHA512 6b317205efa7d62150fae23489fbad5f062ecde99fb5b210fa7ccbed2e0ef60aee1f1e66e2c606ea5d59193c3218f732556706ab3b645b175044342d88984d51 |
22 |
DIST mesa-19.0.3.tar.xz 11963844 BLAKE2B 7d8bae717c0a2a6143d3aee35852145a2032d40ad7f4edcd76eec46392f3917787592d13f9695de54a15ea5bcb3dec3181c418ddfb5b69a3e1b52fb796f04eab SHA512 aa170577252aa4157e4bd49076bbf6207e4aada9fc9f23b255de332e816f9c63e5661f752f2f276dd43e232a8926866004e2a2ff9ad4b411330969c2a9a7ffa0 |
23 |
DIST mesa-19.0.4.tar.xz 11964060 BLAKE2B 5c0d0c6e019792ff6cd195f3b59303e2230fa32c24aa1524c3cccddc56ef6634732e79ff03c7bb20055c0489dbdd7cc103b27989179602f3c9ab332afd531d1a SHA512 431cd9360e1f6376e0966daf82322877b3833032c800f2d86816b37a6f3978d76294a01c3905a01af610582c9541c2a8b52b2e89c56cc954651aa7a790e84ca5 |
24 |
+DIST mesa-19.0.5.tar.xz 11967816 BLAKE2B 941f99194492fcdf4545d06d4f2d576a1a2b206aa9211dd8c3a018877a42dfac4a6d7b4103e781e4c4211661c118b663225252567e22226a866386a8e242f177 SHA512 aecd5ee54ac0316d5e318dbea0abdc06f23e67d75d36eb82d6cf6a396c9e850e1ccf4fa8815f8c4097b6039ebb1524673189350cbfd4b766ce75ce17c26d9d8d |
25 |
DIST mesa-19.1.0-rc1.tar.xz 10877180 BLAKE2B 1ea358595875fbe46b58f5445762cec0c0bd6ee087ce9819237373e2b41aacb64365ac9832b20b9f5fb8838c3d2c6c929cd642bba18b99c7ef153ca124135918 SHA512 a56215882a7c22b7b8fe57d5703914d674841e4045676e2cc2e7834d17f4d5a765516bec4f01eea6772c50e1d979cc430e032302f38c6e7a4274bc43a4d647b1 |
26 |
DIST mesa-19.1.0-rc2.tar.xz 10876808 BLAKE2B 2da9603ea7ec5c1de94ee24c3200f570e4ea127601f370230dc1bf1b64167c6d405fbd6bdb4cdae6be46ed0ff1610f12c0445c3f5a65dd6559e91b6f664872ca SHA512 4d04bec48cbfb17d6dbe7b7700083612e46cbaad3e3630d6219fd1988f5e793cdb5100b8c2531a94b6078f8bb239fef27ed440122d12a2473be5be8648b6a8b1 |
27 |
|
28 |
diff --git a/media-libs/mesa/mesa-19.0.5.ebuild b/media-libs/mesa/mesa-19.0.5.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..6e5cc0499b8 |
31 |
--- /dev/null |
32 |
+++ b/media-libs/mesa/mesa-19.0.5.ebuild |
33 |
@@ -0,0 +1,525 @@ |
34 |
+# Copyright 1999-2019 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=6 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_5 python3_6 python3_7 ) |
40 |
+ |
41 |
+inherit llvm meson multilib-minimal pax-utils python-any-r1 |
42 |
+ |
43 |
+OPENGL_DIR="xorg-x11" |
44 |
+ |
45 |
+MY_P="${P/_/-}" |
46 |
+ |
47 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
48 |
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
49 |
+ |
50 |
+if [[ ${PV} == 9999 ]]; then |
51 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
52 |
+ EXPERIMENTAL="true" |
53 |
+ inherit git-r3 |
54 |
+else |
55 |
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
56 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
57 |
+fi |
58 |
+ |
59 |
+LICENSE="MIT" |
60 |
+SLOT="0" |
61 |
+RESTRICT=" |
62 |
+ !test? ( test ) |
63 |
+" |
64 |
+ |
65 |
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
66 |
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
67 |
+for card in ${VIDEO_CARDS}; do |
68 |
+ IUSE_VIDEO_CARDS+=" video_cards_${card}" |
69 |
+done |
70 |
+ |
71 |
+IUSE="${IUSE_VIDEO_CARDS} |
72 |
+ +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm |
73 |
+ lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind |
74 |
+ vdpau vulkan wayland xa xvmc" |
75 |
+ |
76 |
+REQUIRED_USE=" |
77 |
+ d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) |
78 |
+ gles1? ( egl ) |
79 |
+ gles2? ( egl ) |
80 |
+ vulkan? ( dri3 |
81 |
+ || ( video_cards_i965 video_cards_radeonsi ) |
82 |
+ video_cards_radeonsi? ( llvm ) ) |
83 |
+ wayland? ( egl gbm ) |
84 |
+ video_cards_freedreno? ( gallium ) |
85 |
+ video_cards_intel? ( classic ) |
86 |
+ video_cards_i915? ( || ( classic gallium ) ) |
87 |
+ video_cards_i965? ( classic ) |
88 |
+ video_cards_imx? ( gallium video_cards_vivante ) |
89 |
+ video_cards_nouveau? ( || ( classic gallium ) ) |
90 |
+ video_cards_radeon? ( || ( classic gallium ) |
91 |
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
92 |
+ video_cards_r100? ( classic ) |
93 |
+ video_cards_r200? ( classic ) |
94 |
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
95 |
+ video_cards_r600? ( gallium ) |
96 |
+ video_cards_radeonsi? ( gallium llvm ) |
97 |
+ video_cards_vc4? ( gallium ) |
98 |
+ video_cards_virgl? ( gallium ) |
99 |
+ video_cards_vivante? ( gallium gbm ) |
100 |
+ video_cards_vmware? ( gallium ) |
101 |
+" |
102 |
+ |
103 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.97" |
104 |
+RDEPEND=" |
105 |
+ !app-eselect/eselect-mesa |
106 |
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
107 |
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
108 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
109 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
110 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
111 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
112 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
113 |
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
114 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
115 |
+ libglvnd? ( |
116 |
+ media-libs/libglvnd[${MULTILIB_USEDEP}] |
117 |
+ !app-eselect/eselect-opengl |
118 |
+ ) |
119 |
+ !libglvnd? ( |
120 |
+ >=app-eselect/eselect-opengl-1.3.0 |
121 |
+ ) |
122 |
+ gallium? ( |
123 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
124 |
+ llvm? ( |
125 |
+ video_cards_radeonsi? ( |
126 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
127 |
+ ) |
128 |
+ video_cards_r600? ( |
129 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
130 |
+ ) |
131 |
+ video_cards_radeon? ( |
132 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
133 |
+ ) |
134 |
+ ) |
135 |
+ lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) |
136 |
+ opencl? ( |
137 |
+ dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] |
138 |
+ dev-libs/libclc |
139 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
140 |
+ ) |
141 |
+ vaapi? ( |
142 |
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
143 |
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
144 |
+ ) |
145 |
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
146 |
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
147 |
+ ) |
148 |
+ wayland? ( |
149 |
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] |
150 |
+ >=dev-libs/wayland-protocols-1.8 |
151 |
+ ) |
152 |
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
153 |
+ |
154 |
+ video_cards_intel? ( |
155 |
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
156 |
+ ) |
157 |
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
158 |
+" |
159 |
+for card in ${RADEON_CARDS}; do |
160 |
+ RDEPEND="${RDEPEND} |
161 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
162 |
+ " |
163 |
+done |
164 |
+RDEPEND="${RDEPEND} |
165 |
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
166 |
+" |
167 |
+ |
168 |
+# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
169 |
+# we need to *really* make sure we're not pulling one than more slot |
170 |
+# simultaneously. |
171 |
+# |
172 |
+# How to use it: |
173 |
+# 1. List all the working slots (with min versions) in ||, newest first. |
174 |
+# 2. Update the := to specify *max* version, e.g. < 9. |
175 |
+# 3. Specify LLVM_MAX_SLOT, e.g. 8. |
176 |
+LLVM_MAX_SLOT="8" |
177 |
+LLVM_DEPSTR=" |
178 |
+ || ( |
179 |
+ sys-devel/llvm:8[${MULTILIB_USEDEP}] |
180 |
+ sys-devel/llvm:7[${MULTILIB_USEDEP}] |
181 |
+ ) |
182 |
+ <sys-devel/llvm-9:=[${MULTILIB_USEDEP}] |
183 |
+" |
184 |
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
185 |
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
186 |
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
187 |
+RDEPEND="${RDEPEND} |
188 |
+ llvm? ( |
189 |
+ opencl? ( |
190 |
+ video_cards_r600? ( |
191 |
+ ${CLANG_DEPSTR_AMDGPU} |
192 |
+ ) |
193 |
+ !video_cards_r600? ( |
194 |
+ video_cards_radeonsi? ( |
195 |
+ ${CLANG_DEPSTR_AMDGPU} |
196 |
+ ) |
197 |
+ ) |
198 |
+ !video_cards_r600? ( |
199 |
+ !video_cards_radeonsi? ( |
200 |
+ video_cards_radeon? ( |
201 |
+ ${CLANG_DEPSTR_AMDGPU} |
202 |
+ ) |
203 |
+ ) |
204 |
+ ) |
205 |
+ !video_cards_r600? ( |
206 |
+ !video_cards_radeon? ( |
207 |
+ !video_cards_radeonsi? ( |
208 |
+ ${CLANG_DEPSTR} |
209 |
+ ) |
210 |
+ ) |
211 |
+ ) |
212 |
+ ) |
213 |
+ !opencl? ( |
214 |
+ video_cards_r600? ( |
215 |
+ ${LLVM_DEPSTR_AMDGPU} |
216 |
+ ) |
217 |
+ !video_cards_r600? ( |
218 |
+ video_cards_radeonsi? ( |
219 |
+ ${LLVM_DEPSTR_AMDGPU} |
220 |
+ ) |
221 |
+ ) |
222 |
+ !video_cards_r600? ( |
223 |
+ !video_cards_radeonsi? ( |
224 |
+ video_cards_radeon? ( |
225 |
+ ${LLVM_DEPSTR_AMDGPU} |
226 |
+ ) |
227 |
+ ) |
228 |
+ ) |
229 |
+ !video_cards_r600? ( |
230 |
+ !video_cards_radeon? ( |
231 |
+ !video_cards_radeonsi? ( |
232 |
+ ${LLVM_DEPSTR} |
233 |
+ ) |
234 |
+ ) |
235 |
+ ) |
236 |
+ ) |
237 |
+ ) |
238 |
+" |
239 |
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
240 |
+ |
241 |
+DEPEND="${RDEPEND} |
242 |
+ ${PYTHON_DEPS} |
243 |
+ opencl? ( |
244 |
+ >=sys-devel/gcc-4.6 |
245 |
+ ) |
246 |
+ sys-devel/bison |
247 |
+ sys-devel/flex |
248 |
+ sys-devel/gettext |
249 |
+ virtual/pkgconfig |
250 |
+ valgrind? ( dev-util/valgrind ) |
251 |
+ x11-base/xorg-proto |
252 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
253 |
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
254 |
+" |
255 |
+ |
256 |
+S="${WORKDIR}/${MY_P}" |
257 |
+EGIT_CHECKOUT_DIR=${S} |
258 |
+ |
259 |
+QA_WX_LOAD=" |
260 |
+x86? ( |
261 |
+ !pic? ( |
262 |
+ usr/lib*/libglapi.so.0.0.0 |
263 |
+ usr/lib*/libGLESv1_CM.so.1.0.0 |
264 |
+ usr/lib*/libGLESv2.so.2.0.0 |
265 |
+ usr/lib*/libGL.so.1.2.0 |
266 |
+ usr/lib*/libOSMesa.so.8.0.0 |
267 |
+ ) |
268 |
+)" |
269 |
+ |
270 |
+llvm_check_deps() { |
271 |
+ local flags=${MULTILIB_USEDEP} |
272 |
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
273 |
+ then |
274 |
+ flags+=",llvm_targets_AMDGPU(-)" |
275 |
+ fi |
276 |
+ |
277 |
+ if use opencl; then |
278 |
+ has_version "sys-devel/clang[${flags}]" || return 1 |
279 |
+ fi |
280 |
+ has_version "sys-devel/llvm[${flags}]" |
281 |
+} |
282 |
+ |
283 |
+pkg_pretend() { |
284 |
+ if use opencl; then |
285 |
+ if ! use video_cards_r600 && |
286 |
+ ! use video_cards_radeonsi; then |
287 |
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" |
288 |
+ fi |
289 |
+ fi |
290 |
+ |
291 |
+ if use vaapi; then |
292 |
+ if ! use video_cards_r600 && |
293 |
+ ! use video_cards_radeonsi && |
294 |
+ ! use video_cards_nouveau; then |
295 |
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" |
296 |
+ fi |
297 |
+ fi |
298 |
+ |
299 |
+ if use vdpau; then |
300 |
+ if ! use video_cards_r300 && |
301 |
+ ! use video_cards_r600 && |
302 |
+ ! use video_cards_radeonsi && |
303 |
+ ! use video_cards_nouveau; then |
304 |
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" |
305 |
+ fi |
306 |
+ fi |
307 |
+ |
308 |
+ if use xa; then |
309 |
+ if ! use video_cards_freedreno && |
310 |
+ ! use video_cards_nouveau && |
311 |
+ ! use video_cards_vmware; then |
312 |
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" |
313 |
+ fi |
314 |
+ fi |
315 |
+ |
316 |
+ if use xvmc; then |
317 |
+ if ! use video_cards_r600 && |
318 |
+ ! use video_cards_nouveau; then |
319 |
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" |
320 |
+ fi |
321 |
+ fi |
322 |
+ |
323 |
+ if ! use gallium; then |
324 |
+ use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" |
325 |
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" |
326 |
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" |
327 |
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" |
328 |
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" |
329 |
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" |
330 |
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" |
331 |
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" |
332 |
+ fi |
333 |
+ |
334 |
+ if ! use llvm; then |
335 |
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" |
336 |
+ fi |
337 |
+} |
338 |
+ |
339 |
+python_check_deps() { |
340 |
+ has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" |
341 |
+} |
342 |
+ |
343 |
+pkg_setup() { |
344 |
+ # warning message for bug 459306 |
345 |
+ if use llvm && has_version sys-devel/llvm[!debug=]; then |
346 |
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
347 |
+ ewarn "detected! This can cause problems. For details, see bug 459306." |
348 |
+ fi |
349 |
+ |
350 |
+ if use llvm; then |
351 |
+ llvm_pkg_setup |
352 |
+ fi |
353 |
+ python-any-r1_pkg_setup |
354 |
+} |
355 |
+ |
356 |
+multilib_src_configure() { |
357 |
+ local emesonargs=() |
358 |
+ |
359 |
+ if use classic; then |
360 |
+ # Intel code |
361 |
+ dri_driver_enable video_cards_i915 i915 |
362 |
+ dri_driver_enable video_cards_i965 i965 |
363 |
+ if ! use video_cards_i915 && \ |
364 |
+ ! use video_cards_i965; then |
365 |
+ dri_driver_enable video_cards_intel i915 i965 |
366 |
+ fi |
367 |
+ |
368 |
+ # Nouveau code |
369 |
+ dri_driver_enable video_cards_nouveau nouveau |
370 |
+ |
371 |
+ # ATI code |
372 |
+ dri_driver_enable video_cards_r100 r100 |
373 |
+ dri_driver_enable video_cards_r200 r200 |
374 |
+ if ! use video_cards_r100 && \ |
375 |
+ ! use video_cards_r200; then |
376 |
+ dri_driver_enable video_cards_radeon r100 r200 |
377 |
+ fi |
378 |
+ fi |
379 |
+ |
380 |
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) |
381 |
+ |
382 |
+ if use gallium; then |
383 |
+ emesonargs+=( |
384 |
+ $(meson_use llvm) |
385 |
+ $(meson_use lm_sensors lmsensors) |
386 |
+ $(meson_use unwind libunwind) |
387 |
+ ) |
388 |
+ |
389 |
+ if use video_cards_r300 || |
390 |
+ use video_cards_r600 || |
391 |
+ use video_cards_radeonsi || |
392 |
+ use video_cards_nouveau || |
393 |
+ use video_cards_vmware; then |
394 |
+ emesonargs+=($(meson_use d3d9 gallium-nine)) |
395 |
+ else |
396 |
+ emesonargs+=(-Dgallium-nine=false) |
397 |
+ fi |
398 |
+ |
399 |
+ if use video_cards_r600 || |
400 |
+ use video_cards_radeonsi || |
401 |
+ use video_cards_nouveau; then |
402 |
+ emesonargs+=($(meson_use vaapi gallium-va)) |
403 |
+ use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) |
404 |
+ else |
405 |
+ emesonargs+=(-Dgallium-va=false) |
406 |
+ fi |
407 |
+ |
408 |
+ if use video_cards_r300 || |
409 |
+ use video_cards_r600 || |
410 |
+ use video_cards_radeonsi || |
411 |
+ use video_cards_nouveau; then |
412 |
+ emesonargs+=($(meson_use vdpau gallium-vdpau)) |
413 |
+ else |
414 |
+ emesonargs+=(-Dgallium-vdpau=false) |
415 |
+ fi |
416 |
+ |
417 |
+ if use video_cards_freedreno || |
418 |
+ use video_cards_nouveau || |
419 |
+ use video_cards_vmware; then |
420 |
+ emesonargs+=($(meson_use xa gallium-xa)) |
421 |
+ else |
422 |
+ emesonargs+=(-Dgallium-xa=false) |
423 |
+ fi |
424 |
+ |
425 |
+ if use video_cards_r600 || |
426 |
+ use video_cards_nouveau; then |
427 |
+ emesonargs+=($(meson_use xvmc gallium-xvmc)) |
428 |
+ else |
429 |
+ emesonargs+=(-Dgallium-xvmc=false) |
430 |
+ fi |
431 |
+ |
432 |
+ gallium_enable video_cards_vc4 vc4 |
433 |
+ gallium_enable video_cards_vivante etnaviv |
434 |
+ gallium_enable video_cards_vmware svga |
435 |
+ gallium_enable video_cards_nouveau nouveau |
436 |
+ gallium_enable video_cards_imx imx |
437 |
+ |
438 |
+ # Only one i915 driver (classic vs gallium). Default to classic. |
439 |
+ if ! use classic; then |
440 |
+ gallium_enable video_cards_i915 i915 |
441 |
+ if ! use video_cards_i915 && \ |
442 |
+ ! use video_cards_i965; then |
443 |
+ gallium_enable video_cards_intel i915 |
444 |
+ fi |
445 |
+ fi |
446 |
+ |
447 |
+ gallium_enable video_cards_r300 r300 |
448 |
+ gallium_enable video_cards_r600 r600 |
449 |
+ gallium_enable video_cards_radeonsi radeonsi |
450 |
+ if ! use video_cards_r300 && \ |
451 |
+ ! use video_cards_r600; then |
452 |
+ gallium_enable video_cards_radeon r300 r600 |
453 |
+ fi |
454 |
+ |
455 |
+ gallium_enable video_cards_freedreno freedreno |
456 |
+ gallium_enable video_cards_virgl virgl |
457 |
+ |
458 |
+ # opencl stuff |
459 |
+ emesonargs+=( |
460 |
+ -Dgallium-opencl="$(usex opencl icd disabled)" |
461 |
+ ) |
462 |
+ fi |
463 |
+ |
464 |
+ if use vulkan; then |
465 |
+ vulkan_enable video_cards_i965 intel |
466 |
+ vulkan_enable video_cards_radeonsi amd |
467 |
+ fi |
468 |
+ |
469 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
470 |
+ if [[ ${ABI} == x86 ]]; then |
471 |
+ emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) |
472 |
+ fi |
473 |
+ |
474 |
+ # on abi_x86_32 hardened we need to have asm disable |
475 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
476 |
+ emesonargs+=( -Dasm=false ) |
477 |
+ fi |
478 |
+ |
479 |
+ if use gallium; then |
480 |
+ gallium_enable -- swrast |
481 |
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) |
482 |
+ else |
483 |
+ dri_driver_enable -- swrast |
484 |
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) |
485 |
+ fi |
486 |
+ |
487 |
+ driver_list() { |
488 |
+ local drivers="$(sort -u <<< "${1// /$'\n'}")" |
489 |
+ echo "${drivers//$'\n'/,}" |
490 |
+ } |
491 |
+ |
492 |
+ emesonargs+=( |
493 |
+ $(meson_use test build-tests) |
494 |
+ -Dglx=dri |
495 |
+ -Dshared-glapi=true |
496 |
+ $(meson_use dri3) |
497 |
+ $(meson_use egl) |
498 |
+ $(meson_use gbm) |
499 |
+ $(meson_use gles1) |
500 |
+ $(meson_use gles2) |
501 |
+ $(meson_use libglvnd glvnd) |
502 |
+ $(meson_use selinux) |
503 |
+ -Dvalgrind=$(usex valgrind auto false) |
504 |
+ -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
505 |
+ -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
506 |
+ -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
507 |
+ --buildtype $(usex debug debug plain) |
508 |
+ -Db_ndebug=$(usex debug false true) |
509 |
+ ) |
510 |
+ meson_src_configure |
511 |
+} |
512 |
+ |
513 |
+multilib_src_compile() { |
514 |
+ meson_src_compile |
515 |
+} |
516 |
+ |
517 |
+multilib_src_install() { |
518 |
+ meson_src_install |
519 |
+ |
520 |
+ use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so* |
521 |
+} |
522 |
+ |
523 |
+multilib_src_install_all() { |
524 |
+ einstalldocs |
525 |
+} |
526 |
+ |
527 |
+multilib_src_test() { |
528 |
+ meson test -v -C "${BUILD_DIR}" -t 100 |
529 |
+} |
530 |
+ |
531 |
+pkg_postinst() { |
532 |
+ # Switch to the xorg implementation. |
533 |
+ echo |
534 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
535 |
+} |
536 |
+ |
537 |
+# $1 - VIDEO_CARDS flag (check skipped for "--") |
538 |
+# other args - names of DRI drivers to enable |
539 |
+dri_driver_enable() { |
540 |
+ if [[ $1 == -- ]] || use $1; then |
541 |
+ shift |
542 |
+ DRI_DRIVERS+=("$@") |
543 |
+ fi |
544 |
+} |
545 |
+ |
546 |
+gallium_enable() { |
547 |
+ if [[ $1 == -- ]] || use $1; then |
548 |
+ shift |
549 |
+ GALLIUM_DRIVERS+=("$@") |
550 |
+ fi |
551 |
+} |
552 |
+ |
553 |
+vulkan_enable() { |
554 |
+ if [[ $1 == -- ]] || use $1; then |
555 |
+ shift |
556 |
+ VULKAN_DRIVERS+=("$@") |
557 |
+ fi |
558 |
+} |