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: Sat, 30 Jan 2021 17:52:44
Message-Id: 1612029140.75eca9fe59fa2e31ce6f7453b3e3c6bbed5427da.mattst88@gentoo
1 commit: 75eca9fe59fa2e31ce6f7453b3e3c6bbed5427da
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 30 17:48:26 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 30 17:52:20 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75eca9fe
7
8 media-libs/mesa: Version bump to 20.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-20.3.4.ebuild | 558 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 559 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 8fa99064b16..721a67e413e 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,3 +1,4 @@
21 DIST mesa-20.2.6.tar.xz 13886924 BLAKE2B 2bc5d680979b58a77105a8058da5dfea81afe05166a44d08cf243e5760b8c66e418fd78046a2c88243f56aa85a610d052f3aaf259938668cd0f4a184e9edca46 SHA512 347b275d88c0d14cacef570ed736cac07f2e607bc4c89a16b915ec01ac57dbbe698ddf9a0ad70f034e00318403351e3c728e74c72c653acf1fc99720887fa888
22 DIST mesa-20.3.3.tar.xz 14222700 BLAKE2B 02996b9f784f4c4a4502f8d5a1ef9763799b36206cfbfb56aeeb84837a119457fcfdd2d2efc3bf87fe945bd4dd4747b77fe9af51b290311b86e850fa4d6ac8c6 SHA512 77735462f4ccbe865d0cf7e9db47c42f8bc2600b9a030dca11066d29e43f73c18ca0422e6356129fc14ac1b1018ed752ae4ee45bd31ae706fea58f573a14d346
23 +DIST mesa-20.3.4.tar.xz 14253372 BLAKE2B 210908f5b802b9fd0170a6f06310f39bab4aa0ca1c84914d702863f9df4d47f1720f0d3779ae804d2eef322a09f4b6cc40855efd7dc365cd84dd8f222b217998 SHA512 81c4d032213b4aef842f1594e0e89bc0045f7ca7ce5f267b62a0f8236eb12ab09c1f780d8b3776b3072f37cd0bd8829f8a1330a749ccf462471b262ef8097477
24 DIST mesa-21.0.0-rc3.tar.xz 14488732 BLAKE2B f459fde39b7a1a62166b1d58df309e6295c489eef1324649478a6e21139317068b7cc5fb9ab6d54a31bbfc8c696df81ebc9531e14c40020380f342dc5948036d SHA512 b51495e8ef3a4a2f1b98ad3c4f5037c21b4b7df375138bcc02b24cb4b7ffd7b807d76ac0853d0ecc81c09ceca2a97e5c402352700f297ed7f4369f98d03a0810
25
26 diff --git a/media-libs/mesa/mesa-20.3.4.ebuild b/media-libs/mesa/mesa-20.3.4.ebuild
27 new file mode 100644
28 index 00000000000..3a23ce15ad2
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-20.3.4.ebuild
31 @@ -0,0 +1,558 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{6,7,8,9} )
38 +
39 +inherit llvm meson multilib-minimal 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 + 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.100"
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.15.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/libXdamage-1.1.4-r1:=[${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="11"
177 +LLVM_DEPSTR="
178 + || (
179 + sys-devel/llvm:11[${MULTILIB_USEDEP}]
180 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
181 + sys-devel/llvm:9[${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 +"
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 +
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 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
368 + linux-info_pkg_setup
369 + fi
370 +
371 + if use gallium && use llvm; then
372 + llvm_pkg_setup
373 + fi
374 + python-any-r1_pkg_setup
375 +}
376 +
377 +multilib_src_configure() {
378 + local emesonargs=()
379 +
380 + if use classic; then
381 + # Intel code
382 + dri_driver_enable video_cards_i915 i915
383 + dri_driver_enable video_cards_i965 i965
384 + if ! use video_cards_i915 && \
385 + ! use video_cards_i965; then
386 + dri_driver_enable video_cards_intel i915 i965
387 + fi
388 +
389 + # Nouveau code
390 + dri_driver_enable video_cards_nouveau nouveau
391 +
392 + # ATI code
393 + dri_driver_enable video_cards_r100 r100
394 + dri_driver_enable video_cards_r200 r200
395 + if ! use video_cards_r100 && \
396 + ! use video_cards_r200; then
397 + dri_driver_enable video_cards_radeon r100 r200
398 + fi
399 + fi
400 +
401 + local platforms
402 + use X && platforms+="x11"
403 + use wayland && platforms+=",wayland"
404 + emesonargs+=(-Dplatforms=${platforms#,})
405 +
406 + if use X || use egl; then
407 + emesonargs+=(-Dglvnd=true)
408 + else
409 + emesonargs+=(-Dglvnd=false)
410 + fi
411 +
412 + if use gallium; then
413 + emesonargs+=(
414 + $(meson_feature llvm)
415 + $(meson_feature lm-sensors lmsensors)
416 + $(meson_feature unwind libunwind)
417 + )
418 +
419 + if use video_cards_iris ||
420 + use video_cards_r300 ||
421 + use video_cards_r600 ||
422 + use video_cards_radeonsi ||
423 + use video_cards_nouveau ||
424 + use video_cards_vmware; then
425 + emesonargs+=($(meson_use d3d9 gallium-nine))
426 + else
427 + emesonargs+=(-Dgallium-nine=false)
428 + fi
429 +
430 + if use video_cards_r600 ||
431 + use video_cards_radeonsi ||
432 + use video_cards_nouveau; then
433 + emesonargs+=($(meson_feature vaapi gallium-va))
434 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
435 + else
436 + emesonargs+=(-Dgallium-va=disabled)
437 + fi
438 +
439 + if use video_cards_r300 ||
440 + use video_cards_r600 ||
441 + use video_cards_radeonsi ||
442 + use video_cards_nouveau; then
443 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
444 + else
445 + emesonargs+=(-Dgallium-vdpau=disabled)
446 + fi
447 +
448 + if use video_cards_freedreno ||
449 + use video_cards_nouveau ||
450 + use video_cards_vmware; then
451 + emesonargs+=($(meson_feature xa gallium-xa))
452 + else
453 + emesonargs+=(-Dgallium-xa=disabled)
454 + fi
455 +
456 + if use video_cards_r600 ||
457 + use video_cards_nouveau; then
458 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
459 + else
460 + emesonargs+=(-Dgallium-xvmc=disabled)
461 + fi
462 +
463 + if use video_cards_freedreno ||
464 + use video_cards_lima ||
465 + use video_cards_panfrost ||
466 + use video_cards_v3d ||
467 + use video_cards_vc4 ||
468 + use video_cards_vivante; then
469 + gallium_enable -- kmsro
470 + fi
471 +
472 + gallium_enable video_cards_lima lima
473 + gallium_enable video_cards_panfrost panfrost
474 + gallium_enable video_cards_v3d v3d
475 + gallium_enable video_cards_vc4 vc4
476 + gallium_enable video_cards_vivante etnaviv
477 + gallium_enable video_cards_vmware svga
478 + gallium_enable video_cards_nouveau nouveau
479 + gallium_enable zink zink
480 +
481 + # Only one i915 driver (classic vs gallium). Default to classic.
482 + if ! use classic; then
483 + gallium_enable video_cards_i915 i915
484 + if ! use video_cards_i915 && \
485 + ! use video_cards_i965; then
486 + gallium_enable video_cards_intel i915
487 + fi
488 + fi
489 +
490 + gallium_enable video_cards_iris iris
491 +
492 + gallium_enable video_cards_r300 r300
493 + gallium_enable video_cards_r600 r600
494 + gallium_enable video_cards_radeonsi radeonsi
495 + if ! use video_cards_r300 && \
496 + ! use video_cards_r600; then
497 + gallium_enable video_cards_radeon r300 r600
498 + fi
499 +
500 + gallium_enable video_cards_freedreno freedreno
501 + gallium_enable video_cards_virgl virgl
502 +
503 + # opencl stuff
504 + emesonargs+=(
505 + -Dgallium-opencl="$(usex opencl icd disabled)"
506 + )
507 + fi
508 +
509 + if use vulkan; then
510 + vulkan_enable video_cards_i965 intel
511 + vulkan_enable video_cards_iris intel
512 + vulkan_enable video_cards_radeonsi amd
513 + vulkan_enable video_cards_v3d broadcom
514 + fi
515 +
516 + if use gallium; then
517 + gallium_enable -- swrast
518 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
519 + else
520 + dri_driver_enable -- swrast
521 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
522 + fi
523 +
524 + driver_list() {
525 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
526 + echo "${drivers//$'\n'/,}"
527 + }
528 +
529 + emesonargs+=(
530 + $(meson_use test build-tests)
531 + -Dglx=$(usex X dri disabled)
532 + -Dshared-glapi=enabled
533 + $(meson_feature dri3)
534 + $(meson_feature egl)
535 + $(meson_feature gbm)
536 + $(meson_feature gles1)
537 + $(meson_feature gles2)
538 + $(meson_use selinux)
539 + $(meson_feature zstd)
540 + -Dvalgrind=$(usex valgrind auto false)
541 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
542 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
543 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
544 + $(meson_use vulkan vulkan-device-select-layer)
545 + $(meson_use vulkan-overlay vulkan-overlay-layer)
546 + --buildtype $(usex debug debug plain)
547 + -Db_ndebug=$(usex debug false true)
548 + )
549 + meson_src_configure
550 +}
551 +
552 +multilib_src_compile() {
553 + meson_src_compile
554 +}
555 +
556 +multilib_src_install() {
557 + meson_src_install
558 +}
559 +
560 +multilib_src_install_all() {
561 + einstalldocs
562 +}
563 +
564 +multilib_src_test() {
565 + meson_src_test -t 100
566 +}
567 +
568 +# $1 - VIDEO_CARDS flag (check skipped for "--")
569 +# other args - names of DRI drivers to enable
570 +dri_driver_enable() {
571 + if [[ $1 == -- ]] || use $1; then
572 + shift
573 + DRI_DRIVERS+=("$@")
574 + fi
575 +}
576 +
577 +gallium_enable() {
578 + if [[ $1 == -- ]] || use $1; then
579 + shift
580 + GALLIUM_DRIVERS+=("$@")
581 + fi
582 +}
583 +
584 +vulkan_enable() {
585 + if [[ $1 == -- ]] || use $1; then
586 + shift
587 + VULKAN_DRIVERS+=("$@")
588 + fi
589 +}