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