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