Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Fri, 02 Jul 2021 21:21:03
Message-Id: 1625260849.3a73dccbaae743350c9c19fd57ee2ef2c0ccc3d8.mattst88@gentoo
1 commit: 3a73dccbaae743350c9c19fd57ee2ef2c0ccc3d8
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 2 21:19:39 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 2 21:20:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a73dccb
7
8 media-libs/mesa: Version bump to 21.1.4
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-21.1.4.ebuild | 553 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 554 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 3c0979eac91..7babd9d375d 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -3,3 +3,4 @@ DIST mesa-21.0.3.tar.xz 14710004 BLAKE2B f2165da4487824931d8ff90e4f13624546a297b
21 DIST mesa-21.1.1.tar.xz 15169732 BLAKE2B b2c2f2fa14ebf78baeb64ca976dde2920a594bcea02b3a17820135afc169c8489f37a2869b140d637b11b618c96e37834c255ca7a92d17f70003a11e8fffd401 SHA512 79d0e2b0e1e590e7f36a082df3584010a553af0b3060bd2d3a7ace700ac7a8d1b7734ba67f2e193dd441434eeec74a16e0dbcbf8c15061b5dd5d6a1feca73d62
22 DIST mesa-21.1.2.tar.xz 15199892 BLAKE2B 1e1d9e0bee2eec95a38379047c050ba7e4a9ada47bb8d4f1d3faf355ec6f71ad8e792cfaf72234a3c86f254c33618883f772c0f3f7f7f97085a8c7b5a1ad90d0 SHA512 a7907fa29fdb4e137015ee5405b9c8c0769ef9354bbe963c1af80318b398c05c79db6129b583106d620c42a5e9b625611b648fd5207334eb9b588d7963defc70
23 DIST mesa-21.1.3.tar.xz 15230376 BLAKE2B 49098dc462a19ded67329556acdf136f249609dae85e8b898f721c34127df17fe816fea90e23a93ca9f86ab1f06f660e787cdb2b01b9caa2cd694c04ee1e2027 SHA512 8ca6d5516035484ea2a63bc6338794003ef167239ab0c220f8d3693f97f9725b46fc9d9a704c4ba11b83197d4b8e5f658d65ef0cce1e0957f5e58bd13726b9e0
24 +DIST mesa-21.1.4.tar.xz 15254812 BLAKE2B 7ec6177ad4fb6f053553b634c9ff03c5d618d0212fd77c2fda8803197bef529c74ccf3c3ae75a810ba1d57862f08405c6df702e41f6cb0fd202833ce7b9efef0 SHA512 1f4e2d8ba2c3c02bad5468687752d7e87d6e79c4a0e6ec4b2741a57fb270d18ae4712aaa07a9e09a2d3348540f5a26cdbe05464cd52adb8df1e2e28a581b2b53
25
26 diff --git a/media-libs/mesa/mesa-21.1.4.ebuild b/media-libs/mesa/mesa-21.1.4.ebuild
27 new file mode 100644
28 index 00000000000..b67e6c7e47f
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-21.1.4.ebuild
31 @@ -0,0 +1,553 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{7,8,9} )
38 +
39 +inherit llvm meson-multilib python-any-r1 linux-info
40 +
41 +OPENGL_DIR="xorg-x11"
42 +
43 +MY_P="${P/_/-}"
44 +
45 +DESCRIPTION="OpenGL-like graphic library for Linux"
46 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
47 +
48 +if [[ ${PV} == 9999 ]]; then
49 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
50 + inherit git-r3
51 +else
52 + SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
53 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
54 +fi
55 +
56 +LICENSE="MIT"
57 +SLOT="0"
58 +RESTRICT="
59 + !test? ( test )
60 +"
61 +
62 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
63 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
64 +for card in ${VIDEO_CARDS}; do
65 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
66 +done
67 +
68 +IUSE="${IUSE_VIDEO_CARDS}
69 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm
70 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
71 + vulkan-overlay wayland +X xa xvmc zink +zstd"
72 +
73 +REQUIRED_USE="
74 + d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
75 + gles1? ( egl )
76 + gles2? ( egl )
77 + osmesa? ( gallium )
78 + vulkan? ( dri3
79 + video_cards_radeonsi? ( llvm ) )
80 + vulkan-overlay? ( vulkan )
81 + wayland? ( egl gbm )
82 + video_cards_freedreno? ( gallium )
83 + video_cards_intel? ( classic )
84 + video_cards_i915? ( || ( classic gallium ) )
85 + video_cards_i965? ( classic )
86 + video_cards_iris? ( gallium )
87 + video_cards_lima? ( gallium )
88 + video_cards_nouveau? ( || ( classic gallium ) )
89 + video_cards_panfrost? ( 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_v3d? ( gallium )
98 + video_cards_vc4? ( gallium )
99 + video_cards_virgl? ( gallium )
100 + video_cards_vivante? ( gallium gbm )
101 + video_cards_vmware? ( gallium )
102 + xa? ( X )
103 + xvmc? ( X )
104 + zink? ( gallium vulkan )
105 +"
106 +
107 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105"
108 +RDEPEND="
109 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
110 + >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
111 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
112 + gallium? (
113 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
114 + llvm? (
115 + video_cards_radeonsi? (
116 + virtual/libelf:0=[${MULTILIB_USEDEP}]
117 + )
118 + video_cards_r600? (
119 + virtual/libelf:0=[${MULTILIB_USEDEP}]
120 + )
121 + video_cards_radeon? (
122 + virtual/libelf:0=[${MULTILIB_USEDEP}]
123 + )
124 + )
125 + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
126 + opencl? (
127 + >=virtual/opencl-3[${MULTILIB_USEDEP}]
128 + dev-libs/libclc
129 + virtual/libelf:0=[${MULTILIB_USEDEP}]
130 + )
131 + vaapi? (
132 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
133 + )
134 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
135 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
136 + )
137 + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
138 + wayland? (
139 + >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
140 + >=dev-libs/wayland-protocols-1.8
141 + )
142 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
143 + video_cards_intel? (
144 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
145 + )
146 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
147 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
148 + X? (
149 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
150 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
151 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
152 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
153 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
154 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
155 + )
156 + zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
157 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
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. < 10.
175 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
176 +LLVM_MAX_SLOT="12"
177 +LLVM_DEPSTR="
178 + || (
179 + sys-devel/llvm:12[${MULTILIB_USEDEP}]
180 + sys-devel/llvm:11[${MULTILIB_USEDEP}]
181 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
182 + )
183 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
184 +"
185 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
186 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
187 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
188 +RDEPEND="${RDEPEND}
189 + gallium? (
190 + llvm? (
191 + opencl? (
192 + video_cards_r600? (
193 + ${CLANG_DEPSTR_AMDGPU}
194 + )
195 + !video_cards_r600? (
196 + video_cards_radeonsi? (
197 + ${CLANG_DEPSTR_AMDGPU}
198 + )
199 + )
200 + !video_cards_r600? (
201 + !video_cards_radeonsi? (
202 + video_cards_radeon? (
203 + ${CLANG_DEPSTR_AMDGPU}
204 + )
205 + )
206 + )
207 + !video_cards_r600? (
208 + !video_cards_radeon? (
209 + !video_cards_radeonsi? (
210 + ${CLANG_DEPSTR}
211 + )
212 + )
213 + )
214 + )
215 + !opencl? (
216 + video_cards_r600? (
217 + ${LLVM_DEPSTR_AMDGPU}
218 + )
219 + !video_cards_r600? (
220 + video_cards_radeonsi? (
221 + ${LLVM_DEPSTR_AMDGPU}
222 + )
223 + )
224 + !video_cards_r600? (
225 + !video_cards_radeonsi? (
226 + video_cards_radeon? (
227 + ${LLVM_DEPSTR_AMDGPU}
228 + )
229 + )
230 + )
231 + !video_cards_r600? (
232 + !video_cards_radeon? (
233 + !video_cards_radeonsi? (
234 + ${LLVM_DEPSTR}
235 + )
236 + )
237 + )
238 + )
239 + )
240 + )
241 +"
242 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
243 +
244 +DEPEND="${RDEPEND}
245 + valgrind? ( dev-util/valgrind )
246 + X? (
247 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
248 + x11-base/xorg-proto
249 + )
250 +"
251 +BDEPEND="
252 + ${PYTHON_DEPS}
253 + opencl? (
254 + >=sys-devel/gcc-4.6
255 + )
256 + sys-devel/bison
257 + sys-devel/flex
258 + virtual/pkgconfig
259 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
260 + wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
261 +"
262 +
263 +S="${WORKDIR}/${MY_P}"
264 +EGIT_CHECKOUT_DIR=${S}
265 +
266 +QA_WX_LOAD="
267 +x86? (
268 + usr/lib*/libglapi.so.0.0.0
269 + usr/lib*/libGLESv1_CM.so.1.1.0
270 + usr/lib*/libGLESv2.so.2.0.0
271 + usr/lib*/libGL.so.1.2.0
272 + usr/lib*/libOSMesa.so.8.0.0
273 + usr/lib/libGLX_mesa.so.0.0.0
274 +)"
275 +
276 +llvm_check_deps() {
277 + local flags=${MULTILIB_USEDEP}
278 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
279 + then
280 + flags+=",llvm_targets_AMDGPU(-)"
281 + fi
282 +
283 + if use opencl; then
284 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
285 + fi
286 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
287 +}
288 +
289 +pkg_pretend() {
290 + if use vulkan; then
291 + if ! use video_cards_i965 &&
292 + ! use video_cards_iris &&
293 + ! use video_cards_radeonsi &&
294 + ! use video_cards_v3d; then
295 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
296 + fi
297 + fi
298 +
299 + if use opencl; then
300 + if ! use video_cards_r600 &&
301 + ! use video_cards_radeonsi; then
302 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
303 + fi
304 + fi
305 +
306 + if use vaapi; then
307 + if ! use video_cards_r600 &&
308 + ! use video_cards_radeonsi &&
309 + ! use video_cards_nouveau; then
310 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
311 + fi
312 + fi
313 +
314 + if use vdpau; then
315 + if ! use video_cards_r300 &&
316 + ! use video_cards_r600 &&
317 + ! use video_cards_radeonsi &&
318 + ! use video_cards_nouveau; then
319 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
320 + fi
321 + fi
322 +
323 + if use xa; then
324 + if ! use video_cards_freedreno &&
325 + ! use video_cards_nouveau &&
326 + ! use video_cards_vmware; then
327 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
328 + fi
329 + fi
330 +
331 + if use xvmc; then
332 + if ! use video_cards_r600 &&
333 + ! use video_cards_nouveau; then
334 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
335 + fi
336 + fi
337 +
338 + if ! use gallium; then
339 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
340 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
341 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
342 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
343 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
344 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
345 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
346 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
347 + fi
348 +
349 + if ! use llvm; then
350 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
351 + fi
352 +
353 + if use osmesa && ! use llvm; then
354 + ewarn "OSMesa will be slow without enabling USE=llvm"
355 + fi
356 +}
357 +
358 +python_check_deps() {
359 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
360 +}
361 +
362 +pkg_setup() {
363 + # warning message for bug 459306
364 + if use llvm && has_version sys-devel/llvm[!debug=]; then
365 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
366 + ewarn "detected! This can cause problems. For details, see bug 459306."
367 + fi
368 +
369 + if use video_cards_i965 ||
370 + use video_cards_iris ||
371 + use video_cards_radeonsi; then
372 + if kernel_is -ge 5 11 3; then
373 + CONFIG_CHECK="~KCMP"
374 + elif kernel_is -ge 5 11; then
375 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
376 + elif kernel_is -ge 5 10 20; then
377 + CONFIG_CHECK="~KCMP"
378 + else
379 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
380 + fi
381 + linux-info_pkg_setup
382 + fi
383 +
384 + if use gallium && use llvm; then
385 + llvm_pkg_setup
386 + fi
387 + python-any-r1_pkg_setup
388 +}
389 +
390 +multilib_src_configure() {
391 + local emesonargs=()
392 +
393 + if use classic; then
394 + # Intel code
395 + dri_driver_enable video_cards_i915 i915
396 + dri_driver_enable video_cards_i965 i965
397 + if ! use video_cards_i915 && \
398 + ! use video_cards_i965; then
399 + dri_driver_enable video_cards_intel i915 i965
400 + fi
401 +
402 + # Nouveau code
403 + dri_driver_enable video_cards_nouveau nouveau
404 +
405 + # ATI code
406 + dri_driver_enable video_cards_r100 r100
407 + dri_driver_enable video_cards_r200 r200
408 + if ! use video_cards_r100 && \
409 + ! use video_cards_r200; then
410 + dri_driver_enable video_cards_radeon r100 r200
411 + fi
412 + fi
413 +
414 + local platforms
415 + use X && platforms+="x11"
416 + use wayland && platforms+=",wayland"
417 + emesonargs+=(-Dplatforms=${platforms#,})
418 +
419 + if use X || use egl; then
420 + emesonargs+=(-Dglvnd=true)
421 + else
422 + emesonargs+=(-Dglvnd=false)
423 + fi
424 +
425 + if use gallium; then
426 + emesonargs+=(
427 + $(meson_feature llvm)
428 + $(meson_feature lm-sensors lmsensors)
429 + $(meson_feature unwind libunwind)
430 + )
431 +
432 + if use video_cards_iris ||
433 + use video_cards_r300 ||
434 + use video_cards_r600 ||
435 + use video_cards_radeonsi ||
436 + use video_cards_nouveau ||
437 + use video_cards_vmware; then
438 + emesonargs+=($(meson_use d3d9 gallium-nine))
439 + else
440 + emesonargs+=(-Dgallium-nine=false)
441 + fi
442 +
443 + if use video_cards_r600 ||
444 + use video_cards_radeonsi ||
445 + use video_cards_nouveau; then
446 + emesonargs+=($(meson_feature vaapi gallium-va))
447 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
448 + else
449 + emesonargs+=(-Dgallium-va=disabled)
450 + fi
451 +
452 + if use video_cards_r300 ||
453 + use video_cards_r600 ||
454 + use video_cards_radeonsi ||
455 + use video_cards_nouveau; then
456 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
457 + else
458 + emesonargs+=(-Dgallium-vdpau=disabled)
459 + fi
460 +
461 + if use video_cards_freedreno ||
462 + use video_cards_nouveau ||
463 + use video_cards_vmware; then
464 + emesonargs+=($(meson_feature xa gallium-xa))
465 + else
466 + emesonargs+=(-Dgallium-xa=disabled)
467 + fi
468 +
469 + if use video_cards_r600 ||
470 + use video_cards_nouveau; then
471 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
472 + else
473 + emesonargs+=(-Dgallium-xvmc=disabled)
474 + fi
475 +
476 + if use video_cards_freedreno ||
477 + use video_cards_lima ||
478 + use video_cards_panfrost ||
479 + use video_cards_v3d ||
480 + use video_cards_vc4 ||
481 + use video_cards_vivante; then
482 + gallium_enable -- kmsro
483 + fi
484 +
485 + gallium_enable -- swrast
486 + gallium_enable video_cards_lima lima
487 + gallium_enable video_cards_panfrost panfrost
488 + gallium_enable video_cards_v3d v3d
489 + gallium_enable video_cards_vc4 vc4
490 + gallium_enable video_cards_vivante etnaviv
491 + gallium_enable video_cards_vmware svga
492 + gallium_enable video_cards_nouveau nouveau
493 + gallium_enable zink zink
494 +
495 + # Only one i915 driver (classic vs gallium). Default to classic.
496 + if ! use classic; then
497 + gallium_enable video_cards_i915 i915
498 + if ! use video_cards_i915 && \
499 + ! use video_cards_i965; then
500 + gallium_enable video_cards_intel i915
501 + fi
502 + fi
503 +
504 + gallium_enable video_cards_iris iris
505 +
506 + gallium_enable video_cards_r300 r300
507 + gallium_enable video_cards_r600 r600
508 + gallium_enable video_cards_radeonsi radeonsi
509 + if ! use video_cards_r300 && \
510 + ! use video_cards_r600; then
511 + gallium_enable video_cards_radeon r300 r600
512 + fi
513 +
514 + gallium_enable video_cards_freedreno freedreno
515 + gallium_enable video_cards_virgl virgl
516 +
517 + # opencl stuff
518 + emesonargs+=(
519 + -Dgallium-opencl="$(usex opencl icd disabled)"
520 + )
521 + fi
522 +
523 + if use vulkan; then
524 + vulkan_enable video_cards_i965 intel
525 + vulkan_enable video_cards_iris intel
526 + vulkan_enable video_cards_radeonsi amd
527 + vulkan_enable video_cards_v3d broadcom
528 + fi
529 +
530 + driver_list() {
531 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
532 + echo "${drivers//$'\n'/,}"
533 + }
534 +
535 + emesonargs+=(
536 + $(meson_use test build-tests)
537 + -Dglx=$(usex X dri disabled)
538 + -Dshared-glapi=enabled
539 + $(meson_feature dri3)
540 + $(meson_feature egl)
541 + $(meson_feature gbm)
542 + $(meson_feature gles1)
543 + $(meson_feature gles2)
544 + $(meson_use osmesa)
545 + $(meson_use selinux)
546 + $(meson_feature zstd)
547 + -Dvalgrind=$(usex valgrind auto false)
548 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
549 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
550 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
551 + $(meson_use vulkan vulkan-device-select-layer)
552 + $(meson_use vulkan-overlay vulkan-overlay-layer)
553 + --buildtype $(usex debug debug plain)
554 + -Db_ndebug=$(usex debug false true)
555 + )
556 + meson_src_configure
557 +}
558 +
559 +multilib_src_test() {
560 + meson_src_test -t 100
561 +}
562 +
563 +# $1 - VIDEO_CARDS flag (check skipped for "--")
564 +# other args - names of DRI drivers to enable
565 +dri_driver_enable() {
566 + if [[ $1 == -- ]] || use $1; then
567 + shift
568 + DRI_DRIVERS+=("$@")
569 + fi
570 +}
571 +
572 +gallium_enable() {
573 + if [[ $1 == -- ]] || use $1; then
574 + shift
575 + GALLIUM_DRIVERS+=("$@")
576 + fi
577 +}
578 +
579 +vulkan_enable() {
580 + if [[ $1 == -- ]] || use $1; then
581 + shift
582 + VULKAN_DRIVERS+=("$@")
583 + fi
584 +}