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