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: Mon, 30 Nov 2020 20:39:31
Message-Id: 1606768737.475b614a7910847849d8e2986e9bdb14f47d7e5f.mattst88@gentoo
1 commit: 475b614a7910847849d8e2986e9bdb14f47d7e5f
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 30 20:21:03 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 20:38:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=475b614a
7
8 media-libs/mesa: Version bump to 20.3.0_rc3
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.0_rc3.ebuild | 553 +++++++++++++++++++++++++++++++++
14 2 files changed, 554 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 96c7c7baa7b..3052e2a5807 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,3 +1,4 @@
21 DIST mesa-20.1.10.tar.xz 12918420 BLAKE2B 408f4bc6eb0dc11199cd161d6914b77cb57313bca94f26794cbfd05332922c45dc216a64e33df9fad64cd41e1ad8b2de6c2e5f99cad234870f7a5b970a62dcbd SHA512 0d4016abfcc733c853d7b6c3c997ddc554a44088c0a4d9a7edb51ab5ad7d9e1234728b61ffcb9c82a6c5fee1429091a1c31cbeabcb1b50411337b99ee550d28a
22 DIST mesa-20.2.3.tar.xz 13844212 BLAKE2B 53eff6d43d2e05dad051c30de624bd8d872e87d6f1d2f32b631b1c4fea657b8dd9b2d5b9702bdd9138b0d9d6c78b74d737162d3f1c76ca969ce6d9ae4f561eda SHA512 e55b57523f6fdb1199586538c119c3e7c81d1a7af86be14c90d140c514f65e54ac0c56bd341686d04b770b80d3ddd92188ee17b3bc23f243aed10c25de7e19a6
23 DIST mesa-20.3.0-rc2.tar.xz 14085024 BLAKE2B c87e3e48ed1dfec2da4fa6bbb549fc925d806f8681e8dc1b3fc3b54eec4864402bb34009a95998c1fc818ddb7d1df2d51347df3d20ec9e4364245ae4f750f16d SHA512 1d94100550b60a0dc6e984d898114b11b8656e2954e946478a2732cec678d1e6a0f07bb5bcdc856facf7e274aea52cfc2b4228c064eadc7bbc00147c6b17cc0e
24 +DIST mesa-20.3.0-rc3.tar.xz 14090140 BLAKE2B 8b02a580d54728337970b2e7de9130575b24fd544a55376e84653f405dddfecbe1aa63a8b7918b135a90b4ce6f4cb045991109960873aef7013f6928b952cd14 SHA512 f0114ee938c1041b345c052716e4582ec6fcda27b7625e9dab511282ba3676439c79a77514421dc669b737150169e0e01e3355e94db9a5f65c5c50cdaac898bd
25
26 diff --git a/media-libs/mesa/mesa-20.3.0_rc3.ebuild b/media-libs/mesa/mesa-20.3.0_rc3.ebuild
27 new file mode 100644
28 index 00000000000..1da56517de7
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-20.3.0_rc3.ebuild
31 @@ -0,0 +1,553 @@
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 ~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 + [[ -n $platforms ]] && emesonargs+=(-Dplatforms=${platforms#,})
405 +
406 + if use gallium; then
407 + emesonargs+=(
408 + $(meson_feature llvm)
409 + $(meson_feature lm-sensors lmsensors)
410 + $(meson_feature unwind libunwind)
411 + )
412 +
413 + if use video_cards_iris ||
414 + use video_cards_r300 ||
415 + use video_cards_r600 ||
416 + use video_cards_radeonsi ||
417 + use video_cards_nouveau ||
418 + use video_cards_vmware; then
419 + emesonargs+=($(meson_use d3d9 gallium-nine))
420 + else
421 + emesonargs+=(-Dgallium-nine=false)
422 + fi
423 +
424 + if use video_cards_r600 ||
425 + use video_cards_radeonsi ||
426 + use video_cards_nouveau; then
427 + emesonargs+=($(meson_feature vaapi gallium-va))
428 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
429 + else
430 + emesonargs+=(-Dgallium-va=disabled)
431 + fi
432 +
433 + if use video_cards_r300 ||
434 + use video_cards_r600 ||
435 + use video_cards_radeonsi ||
436 + use video_cards_nouveau; then
437 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
438 + else
439 + emesonargs+=(-Dgallium-vdpau=disabled)
440 + fi
441 +
442 + if use video_cards_freedreno ||
443 + use video_cards_nouveau ||
444 + use video_cards_vmware; then
445 + emesonargs+=($(meson_feature xa gallium-xa))
446 + else
447 + emesonargs+=(-Dgallium-xa=disabled)
448 + fi
449 +
450 + if use video_cards_r600 ||
451 + use video_cards_nouveau; then
452 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
453 + else
454 + emesonargs+=(-Dgallium-xvmc=disabled)
455 + fi
456 +
457 + if use video_cards_freedreno ||
458 + use video_cards_lima ||
459 + use video_cards_panfrost ||
460 + use video_cards_v3d ||
461 + use video_cards_vc4 ||
462 + use video_cards_vivante; then
463 + gallium_enable -- kmsro
464 + fi
465 +
466 + gallium_enable video_cards_lima lima
467 + gallium_enable video_cards_panfrost panfrost
468 + gallium_enable video_cards_v3d v3d
469 + gallium_enable video_cards_vc4 vc4
470 + gallium_enable video_cards_vivante etnaviv
471 + gallium_enable video_cards_vmware svga
472 + gallium_enable video_cards_nouveau nouveau
473 + gallium_enable zink zink
474 +
475 + # Only one i915 driver (classic vs gallium). Default to classic.
476 + if ! use classic; then
477 + gallium_enable video_cards_i915 i915
478 + if ! use video_cards_i915 && \
479 + ! use video_cards_i965; then
480 + gallium_enable video_cards_intel i915
481 + fi
482 + fi
483 +
484 + gallium_enable video_cards_iris iris
485 +
486 + gallium_enable video_cards_r300 r300
487 + gallium_enable video_cards_r600 r600
488 + gallium_enable video_cards_radeonsi radeonsi
489 + if ! use video_cards_r300 && \
490 + ! use video_cards_r600; then
491 + gallium_enable video_cards_radeon r300 r600
492 + fi
493 +
494 + gallium_enable video_cards_freedreno freedreno
495 + gallium_enable video_cards_virgl virgl
496 +
497 + # opencl stuff
498 + emesonargs+=(
499 + -Dgallium-opencl="$(usex opencl icd disabled)"
500 + )
501 + fi
502 +
503 + if use vulkan; then
504 + vulkan_enable video_cards_i965 intel
505 + vulkan_enable video_cards_iris intel
506 + vulkan_enable video_cards_radeonsi amd
507 + vulkan_enable video_cards_v3d broadcom
508 + fi
509 +
510 + if use gallium; then
511 + gallium_enable -- swrast
512 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
513 + else
514 + dri_driver_enable -- swrast
515 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
516 + fi
517 +
518 + driver_list() {
519 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
520 + echo "${drivers//$'\n'/,}"
521 + }
522 +
523 + emesonargs+=(
524 + $(meson_use test build-tests)
525 + -Dglx=$(usex X dri disabled)
526 + -Dglvnd=true
527 + -Dshared-glapi=true
528 + $(meson_feature dri3)
529 + $(meson_feature egl)
530 + $(meson_feature gbm)
531 + $(meson_feature gles1)
532 + $(meson_feature gles2)
533 + $(meson_use selinux)
534 + $(meson_feature zstd)
535 + -Dvalgrind=$(usex valgrind auto false)
536 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
537 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
538 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
539 + $(meson_use vulkan vulkan-device-select-layer)
540 + $(meson_use vulkan-overlay vulkan-overlay-layer)
541 + --buildtype $(usex debug debug plain)
542 + -Db_ndebug=$(usex debug false true)
543 + )
544 + meson_src_configure
545 +}
546 +
547 +multilib_src_compile() {
548 + meson_src_compile
549 +}
550 +
551 +multilib_src_install() {
552 + meson_src_install
553 +}
554 +
555 +multilib_src_install_all() {
556 + einstalldocs
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 +}