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, 30 Sep 2020 19:13:24
Message-Id: 1601493191.a94acdaf57c4da0738d0af131e5d26bad06efc59.mattst88@gentoo
1 commit: a94acdaf57c4da0738d0af131e5d26bad06efc59
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 30 19:05:52 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 30 19:13:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a94acdaf
7
8 media-libs/mesa: Version bump to 20.2.0
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-20.2.0.ebuild | 551 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 552 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 2dca688555b..df8adc3611b 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,3 +1,4 @@
21 DIST mesa-20.1.7.tar.xz 12825368 BLAKE2B 2fedda518ff29bfda49af12d714dc258e48fca3492d2327ce5080d11bbaea5ad646d438f3e2d5ddabeffae83211976fb15001c650cd6ab4052ab09d97342afdc SHA512 5ff614c3f7568db7673cd2398615e5398c7f50093abdabd0730e07fe9c358310793fea3f130058110c9a2aa284c6efd207e1bdca3d1a1ba46fb18d76e34f361a
22 DIST mesa-20.1.8.tar.xz 12846348 BLAKE2B b31680458100fc4394819a379a14237cfe39befea91f53641dc181d29891cb3e508c45f5ea1b07deee97f6bf04b6d8b2ca9cd8270bf79ab4a524035fbdc58c36 SHA512 519b0e2837982d097c362d974a90c94efd1cdf14505fc43eaa740a23c042bc0c3f04d0edaf6b371966d82667cade6d0c68c92528e1be6c12884b38c67fd064c1
23 DIST mesa-20.2.0-rc4.tar.xz 13569628 BLAKE2B 54068c298a57f2c19113828e2e9b94dd15070ecc0c899f7e3dc527b27579e4f8c3c84c7b841c8d0b8313556cca41bfefd3e08b360dd0e364cbc29e0609ff6f3d SHA512 1f718bfbadbc15b7216864226adb737f3a4a7801dc60ca9294effd4be5f260fffd31c988eed9550e8a7a7430acb05ba0c7d65693c1f375eab4b95d2d029755bb
24 +DIST mesa-20.2.0.tar.xz 13675596 BLAKE2B d1c6b4ac631446a35eb916d0b2ddbe2a8d75429268b1598b35f5776953b560ac08917bde07e32cf4ca33aa4e6a2713d46dc6de86d717127fbb950f0de2aa6325 SHA512 3dd7def04ba4f196be8fd59999285febb10366e89d6e649c518b436b732c62d3f1bd235fc470de7fda4b4cc09a1baaadca4222dcdc2449225d789b151cea69d7
25
26 diff --git a/media-libs/mesa/mesa-20.2.0.ebuild b/media-libs/mesa/mesa-20.2.0.ebuild
27 new file mode 100644
28 index 00000000000..7e2bd851871
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-20.2.0.ebuild
31 @@ -0,0 +1,551 @@
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} )
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 + !app-eselect/eselect-mesa
109 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
110 + >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
111 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
112 + gallium? (
113 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
114 + llvm? (
115 + video_cards_radeonsi? (
116 + virtual/libelf:0=[${MULTILIB_USEDEP}]
117 + )
118 + video_cards_r600? (
119 + virtual/libelf:0=[${MULTILIB_USEDEP}]
120 + )
121 + video_cards_radeon? (
122 + virtual/libelf:0=[${MULTILIB_USEDEP}]
123 + )
124 + )
125 + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
126 + opencl? (
127 + >=virtual/opencl-3[${MULTILIB_USEDEP}]
128 + dev-libs/libclc
129 + virtual/libelf:0=[${MULTILIB_USEDEP}]
130 + )
131 + vaapi? (
132 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
133 + )
134 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
135 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
136 + )
137 + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
138 + wayland? (
139 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
140 + >=dev-libs/wayland-protocols-1.8
141 + )
142 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
143 + video_cards_intel? (
144 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
145 + )
146 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
147 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
148 + X? (
149 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
150 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
151 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
152 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
153 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
154 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
155 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
156 + )
157 + zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
158 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
159 +"
160 +for card in ${RADEON_CARDS}; do
161 + RDEPEND="${RDEPEND}
162 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
163 + "
164 +done
165 +RDEPEND="${RDEPEND}
166 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
167 +"
168 +
169 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
170 +# we need to *really* make sure we're not pulling one than more slot
171 +# simultaneously.
172 +#
173 +# How to use it:
174 +# 1. List all the working slots (with min versions) in ||, newest first.
175 +# 2. Update the := to specify *max* version, e.g. < 10.
176 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
177 +LLVM_MAX_SLOT="10"
178 +LLVM_DEPSTR="
179 + || (
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; then
293 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
294 + fi
295 + fi
296 +
297 + if use opencl; then
298 + if ! use video_cards_r600 &&
299 + ! use video_cards_radeonsi; then
300 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
301 + fi
302 + fi
303 +
304 + if use vaapi; then
305 + if ! use video_cards_r600 &&
306 + ! use video_cards_radeonsi &&
307 + ! use video_cards_nouveau; then
308 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
309 + fi
310 + fi
311 +
312 + if use vdpau; then
313 + if ! use video_cards_r300 &&
314 + ! use video_cards_r600 &&
315 + ! use video_cards_radeonsi &&
316 + ! use video_cards_nouveau; then
317 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
318 + fi
319 + fi
320 +
321 + if use xa; then
322 + if ! use video_cards_freedreno &&
323 + ! use video_cards_nouveau &&
324 + ! use video_cards_vmware; then
325 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
326 + fi
327 + fi
328 +
329 + if use xvmc; then
330 + if ! use video_cards_r600 &&
331 + ! use video_cards_nouveau; then
332 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
333 + fi
334 + fi
335 +
336 + if ! use gallium; then
337 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
338 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
339 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
340 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
341 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
342 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
343 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
344 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
345 + fi
346 +
347 + if ! use llvm; then
348 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
349 + fi
350 +}
351 +
352 +python_check_deps() {
353 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
354 +}
355 +
356 +pkg_setup() {
357 + # warning message for bug 459306
358 + if use llvm && has_version sys-devel/llvm[!debug=]; then
359 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
360 + ewarn "detected! This can cause problems. For details, see bug 459306."
361 + fi
362 +
363 + if use video_cards_i965 ||
364 + use video_cards_iris ||
365 + use video_cards_radeonsi; then
366 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
367 + linux-info_pkg_setup
368 + fi
369 +
370 + if use gallium && use llvm; then
371 + llvm_pkg_setup
372 + fi
373 + python-any-r1_pkg_setup
374 +}
375 +
376 +multilib_src_configure() {
377 + local emesonargs=()
378 +
379 + if use classic; then
380 + # Intel code
381 + dri_driver_enable video_cards_i915 i915
382 + dri_driver_enable video_cards_i965 i965
383 + if ! use video_cards_i915 && \
384 + ! use video_cards_i965; then
385 + dri_driver_enable video_cards_intel i915 i965
386 + fi
387 +
388 + # Nouveau code
389 + dri_driver_enable video_cards_nouveau nouveau
390 +
391 + # ATI code
392 + dri_driver_enable video_cards_r100 r100
393 + dri_driver_enable video_cards_r200 r200
394 + if ! use video_cards_r100 && \
395 + ! use video_cards_r200; then
396 + dri_driver_enable video_cards_radeon r100 r200
397 + fi
398 + fi
399 +
400 + local platforms
401 + use X && platforms+="x11"
402 + use wayland && platforms+=",wayland"
403 + [[ -n $platforms ]] && emesonargs+=(-Dplatforms=${platforms#,})
404 +
405 + if use gallium; then
406 + emesonargs+=(
407 + $(meson_feature llvm)
408 + $(meson_feature lm-sensors lmsensors)
409 + $(meson_feature unwind libunwind)
410 + )
411 +
412 + if use video_cards_iris ||
413 + use video_cards_r300 ||
414 + use video_cards_r600 ||
415 + use video_cards_radeonsi ||
416 + use video_cards_nouveau ||
417 + use video_cards_vmware; then
418 + emesonargs+=($(meson_use d3d9 gallium-nine))
419 + else
420 + emesonargs+=(-Dgallium-nine=false)
421 + fi
422 +
423 + if use video_cards_r600 ||
424 + use video_cards_radeonsi ||
425 + use video_cards_nouveau; then
426 + emesonargs+=($(meson_feature vaapi gallium-va))
427 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
428 + else
429 + emesonargs+=(-Dgallium-va=disabled)
430 + fi
431 +
432 + if use video_cards_r300 ||
433 + use video_cards_r600 ||
434 + use video_cards_radeonsi ||
435 + use video_cards_nouveau; then
436 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
437 + else
438 + emesonargs+=(-Dgallium-vdpau=disabled)
439 + fi
440 +
441 + if use video_cards_freedreno ||
442 + use video_cards_nouveau ||
443 + use video_cards_vmware; then
444 + emesonargs+=($(meson_feature xa gallium-xa))
445 + else
446 + emesonargs+=(-Dgallium-xa=disabled)
447 + fi
448 +
449 + if use video_cards_r600 ||
450 + use video_cards_nouveau; then
451 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
452 + else
453 + emesonargs+=(-Dgallium-xvmc=disabled)
454 + fi
455 +
456 + if use video_cards_freedreno ||
457 + use video_cards_lima ||
458 + use video_cards_panfrost ||
459 + use video_cards_v3d ||
460 + use video_cards_vc4 ||
461 + use video_cards_vivante; then
462 + gallium_enable -- kmsro
463 + fi
464 +
465 + gallium_enable video_cards_lima lima
466 + gallium_enable video_cards_panfrost panfrost
467 + gallium_enable video_cards_v3d v3d
468 + gallium_enable video_cards_vc4 vc4
469 + gallium_enable video_cards_vivante etnaviv
470 + gallium_enable video_cards_vmware svga
471 + gallium_enable video_cards_nouveau nouveau
472 + gallium_enable zink zink
473 +
474 + # Only one i915 driver (classic vs gallium). Default to classic.
475 + if ! use classic; then
476 + gallium_enable video_cards_i915 i915
477 + if ! use video_cards_i915 && \
478 + ! use video_cards_i965; then
479 + gallium_enable video_cards_intel i915
480 + fi
481 + fi
482 +
483 + gallium_enable video_cards_iris iris
484 +
485 + gallium_enable video_cards_r300 r300
486 + gallium_enable video_cards_r600 r600
487 + gallium_enable video_cards_radeonsi radeonsi
488 + if ! use video_cards_r300 && \
489 + ! use video_cards_r600; then
490 + gallium_enable video_cards_radeon r300 r600
491 + fi
492 +
493 + gallium_enable video_cards_freedreno freedreno
494 + gallium_enable video_cards_virgl virgl
495 +
496 + # opencl stuff
497 + emesonargs+=(
498 + -Dgallium-opencl="$(usex opencl icd disabled)"
499 + )
500 + fi
501 +
502 + if use vulkan; then
503 + vulkan_enable video_cards_i965 intel
504 + vulkan_enable video_cards_iris intel
505 + vulkan_enable video_cards_radeonsi amd
506 + fi
507 +
508 + if use gallium; then
509 + gallium_enable -- swrast
510 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
511 + else
512 + dri_driver_enable -- swrast
513 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
514 + fi
515 +
516 + driver_list() {
517 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
518 + echo "${drivers//$'\n'/,}"
519 + }
520 +
521 + emesonargs+=(
522 + $(meson_use test build-tests)
523 + -Dglx=$(usex X dri disabled)
524 + -Dglvnd=true
525 + -Dshared-glapi=true
526 + $(meson_feature dri3)
527 + $(meson_feature egl)
528 + $(meson_feature gbm)
529 + $(meson_feature gles1)
530 + $(meson_feature gles2)
531 + $(meson_use selinux)
532 + $(meson_feature zstd)
533 + -Dvalgrind=$(usex valgrind auto false)
534 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
535 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
536 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
537 + $(meson_use vulkan vulkan-device-select-layer)
538 + $(meson_use vulkan-overlay vulkan-overlay-layer)
539 + --buildtype $(usex debug debug plain)
540 + -Db_ndebug=$(usex debug false true)
541 + )
542 + meson_src_configure
543 +}
544 +
545 +multilib_src_compile() {
546 + meson_src_compile
547 +}
548 +
549 +multilib_src_install() {
550 + meson_src_install
551 +}
552 +
553 +multilib_src_install_all() {
554 + einstalldocs
555 +}
556 +
557 +multilib_src_test() {
558 + meson test -v -C "${BUILD_DIR}" -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 +}