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: Tue, 30 Jun 2020 22:42:31
Message-Id: 1593556942.dad4c500e21ba74856742329a05cc050dc5489be.mattst88@gentoo
1 commit: dad4c500e21ba74856742329a05cc050dc5489be
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 30 22:18:40 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 30 22:42:22 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dad4c500
7
8 media-libs/mesa: Version bump to 20.1.2
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-20.1.2.ebuild | 560 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 561 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 20f64363442..df8c4ddd60b 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,2 +1,3 @@
21 DIST mesa-20.0.8.tar.xz 12360736 BLAKE2B 19e3f8a40b34b5f17ed76077c5d92f728a134b2479c43d86674ed1818ab99639a9b732041f67488251df808564f6abe5b587d756ef9c7c13dcada87cd0fc05de SHA512 d906330c412899907dd05a84034a929107fccaf3044814c4b1f30ba5690cbcf1587b5f17534c6345111f3cb7cf292afd5984a60486643ff6f534b57cec615374
22 DIST mesa-20.1.1.tar.xz 12683180 BLAKE2B de602430ea91076f93b66d1be6da31bd3c74bc194709d36834bac6767c8c2f6047b0930cc070a19293f89a041dc881855ae1f1adedf02284ee4ebc3682487d61 SHA512 a8ae02915305488e5e0d8c104da73df1cdd61ab0b5c5d27a6851c418d25a2c9beeea9cddf93a341afa63cec52d356fe68b194c8c36e78c26f66fa884fc27f147
23 +DIST mesa-20.1.2.tar.xz 12717604 BLAKE2B b7f41ed625a13c35b5dfed9b1c0919beb73a2dc578dc93d6bd43b936b4cabecdd26eb0841eacf910f0f21afccfad2047d7c4aa4a4c9aeae1d07fb20a4f79028f SHA512 467fc6a1cbfc1bc140ba2e6e90a14bd8d15d979b92ba14d084018b6cf22b172767575f5127c6edb5c3bdf12fe6696b27d9975826b3fbb5ad5909d258fc3b8433
24
25 diff --git a/media-libs/mesa/mesa-20.1.2.ebuild b/media-libs/mesa/mesa-20.1.2.ebuild
26 new file mode 100644
27 index 00000000000..00b4050b4e8
28 --- /dev/null
29 +++ b/media-libs/mesa/mesa-20.1.2.ebuild
30 @@ -0,0 +1,560 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{6,7,8} )
37 +
38 +inherit llvm meson multilib-minimal 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://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
52 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~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 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 +libglvnd +llvm
69 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
70 + vulkan-overlay wayland +X xa xvmc +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 + vulkan? ( dri3
77 + video_cards_radeonsi? ( llvm ) )
78 + vulkan-overlay? ( vulkan )
79 + wayland? ( egl gbm )
80 + video_cards_freedreno? ( gallium )
81 + video_cards_intel? ( classic )
82 + video_cards_i915? ( || ( classic gallium ) )
83 + video_cards_i965? ( classic )
84 + video_cards_iris? ( gallium )
85 + video_cards_lima? ( gallium )
86 + video_cards_nouveau? ( || ( classic gallium ) )
87 + video_cards_panfrost? ( gallium )
88 + video_cards_radeon? ( || ( classic gallium )
89 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
90 + video_cards_r100? ( classic )
91 + video_cards_r200? ( classic )
92 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
93 + video_cards_r600? ( gallium )
94 + video_cards_radeonsi? ( gallium llvm )
95 + video_cards_vc4? ( gallium )
96 + video_cards_virgl? ( gallium )
97 + video_cards_vivante? ( gallium gbm )
98 + video_cards_vmware? ( gallium )
99 + xa? ( X )
100 + xvmc? ( X )
101 +"
102 +
103 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
104 +RDEPEND="
105 + !app-eselect/eselect-mesa
106 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
107 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
108 + libglvnd? (
109 + >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
110 + !app-eselect/eselect-opengl
111 + )
112 + !libglvnd? (
113 + >=app-eselect/eselect-opengl-1.3.0
114 + )
115 + gallium? (
116 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
117 + llvm? (
118 + video_cards_radeonsi? (
119 + virtual/libelf:0=[${MULTILIB_USEDEP}]
120 + )
121 + video_cards_r600? (
122 + virtual/libelf:0=[${MULTILIB_USEDEP}]
123 + )
124 + video_cards_radeon? (
125 + virtual/libelf:0=[${MULTILIB_USEDEP}]
126 + )
127 + )
128 + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
129 + opencl? (
130 + >=virtual/opencl-3[${MULTILIB_USEDEP}]
131 + dev-libs/libclc
132 + virtual/libelf:0=[${MULTILIB_USEDEP}]
133 + )
134 + vaapi? (
135 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
136 + )
137 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
138 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
139 + )
140 + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
141 + wayland? (
142 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
143 + >=dev-libs/wayland-protocols-1.8
144 + )
145 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
146 + video_cards_intel? (
147 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
148 + )
149 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
150 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
151 + X? (
152 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
153 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
154 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
155 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
156 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
157 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
158 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
159 + )
160 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
161 +"
162 +for card in ${RADEON_CARDS}; do
163 + RDEPEND="${RDEPEND}
164 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
165 + "
166 +done
167 +RDEPEND="${RDEPEND}
168 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
169 +"
170 +
171 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
172 +# we need to *really* make sure we're not pulling one than more slot
173 +# simultaneously.
174 +#
175 +# How to use it:
176 +# 1. List all the working slots (with min versions) in ||, newest first.
177 +# 2. Update the := to specify *max* version, e.g. < 10.
178 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
179 +LLVM_MAX_SLOT="10"
180 +LLVM_DEPSTR="
181 + || (
182 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
183 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
184 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
185 + )
186 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
187 +"
188 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
189 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
190 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
191 +RDEPEND="${RDEPEND}
192 + gallium? (
193 + llvm? (
194 + opencl? (
195 + video_cards_r600? (
196 + ${CLANG_DEPSTR_AMDGPU}
197 + )
198 + !video_cards_r600? (
199 + video_cards_radeonsi? (
200 + ${CLANG_DEPSTR_AMDGPU}
201 + )
202 + )
203 + !video_cards_r600? (
204 + !video_cards_radeonsi? (
205 + video_cards_radeon? (
206 + ${CLANG_DEPSTR_AMDGPU}
207 + )
208 + )
209 + )
210 + !video_cards_r600? (
211 + !video_cards_radeon? (
212 + !video_cards_radeonsi? (
213 + ${CLANG_DEPSTR}
214 + )
215 + )
216 + )
217 + )
218 + !opencl? (
219 + video_cards_r600? (
220 + ${LLVM_DEPSTR_AMDGPU}
221 + )
222 + !video_cards_r600? (
223 + video_cards_radeonsi? (
224 + ${LLVM_DEPSTR_AMDGPU}
225 + )
226 + )
227 + !video_cards_r600? (
228 + !video_cards_radeonsi? (
229 + video_cards_radeon? (
230 + ${LLVM_DEPSTR_AMDGPU}
231 + )
232 + )
233 + )
234 + !video_cards_r600? (
235 + !video_cards_radeon? (
236 + !video_cards_radeonsi? (
237 + ${LLVM_DEPSTR}
238 + )
239 + )
240 + )
241 + )
242 + )
243 + )
244 +"
245 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
246 +
247 +DEPEND="${RDEPEND}
248 + valgrind? ( dev-util/valgrind )
249 + X? (
250 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
251 + x11-base/xorg-proto
252 + )
253 +"
254 +BDEPEND="
255 + ${PYTHON_DEPS}
256 + opencl? (
257 + >=sys-devel/gcc-4.6
258 + )
259 + sys-devel/bison
260 + sys-devel/flex
261 + sys-devel/gettext
262 + virtual/pkgconfig
263 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
264 +"
265 +
266 +S="${WORKDIR}/${MY_P}"
267 +EGIT_CHECKOUT_DIR=${S}
268 +
269 +QA_WX_LOAD="
270 +x86? (
271 + usr/lib*/libglapi.so.0.0.0
272 + usr/lib*/libGLESv1_CM.so.1.1.0
273 + usr/lib*/libGLESv2.so.2.0.0
274 + usr/lib*/libGL.so.1.2.0
275 + usr/lib*/libOSMesa.so.8.0.0
276 + libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
277 +)"
278 +
279 +llvm_check_deps() {
280 + local flags=${MULTILIB_USEDEP}
281 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
282 + then
283 + flags+=",llvm_targets_AMDGPU(-)"
284 + fi
285 +
286 + if use opencl; then
287 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
288 + fi
289 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
290 +}
291 +
292 +pkg_pretend() {
293 + if use vulkan; then
294 + if ! use video_cards_i965 &&
295 + ! use video_cards_iris &&
296 + ! use video_cards_radeonsi; then
297 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
298 + fi
299 + fi
300 +
301 + if use opencl; then
302 + if ! use video_cards_r600 &&
303 + ! use video_cards_radeonsi; then
304 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
305 + fi
306 + fi
307 +
308 + if use vaapi; then
309 + if ! use video_cards_r600 &&
310 + ! use video_cards_radeonsi &&
311 + ! use video_cards_nouveau; then
312 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
313 + fi
314 + fi
315 +
316 + if use vdpau; then
317 + if ! use video_cards_r300 &&
318 + ! use video_cards_r600 &&
319 + ! use video_cards_radeonsi &&
320 + ! use video_cards_nouveau; then
321 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
322 + fi
323 + fi
324 +
325 + if use xa; then
326 + if ! use video_cards_freedreno &&
327 + ! use video_cards_nouveau &&
328 + ! use video_cards_vmware; then
329 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
330 + fi
331 + fi
332 +
333 + if use xvmc; then
334 + if ! use video_cards_r600 &&
335 + ! use video_cards_nouveau; then
336 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
337 + fi
338 + fi
339 +
340 + if ! use gallium; then
341 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
342 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
343 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
344 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
345 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
346 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
347 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
348 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
349 + fi
350 +
351 + if ! use llvm; then
352 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
353 + fi
354 +}
355 +
356 +python_check_deps() {
357 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
358 +}
359 +
360 +pkg_setup() {
361 + # warning message for bug 459306
362 + if use llvm && has_version sys-devel/llvm[!debug=]; then
363 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
364 + ewarn "detected! This can cause problems. For details, see bug 459306."
365 + fi
366 +
367 + # os_same_file_description requires the kcmp syscall,
368 + # which is only available with CONFIG_CHECKPOINT_RESTORE=y.
369 + # Currently only AMDGPU utilizes this function, so only AMDGPU users would
370 + # get a spooky warning message if the syscall fails.
371 + if use gallium && use video_cards_radeonsi; then
372 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
373 + linux-info_pkg_setup
374 + fi
375 +
376 + if use gallium && use llvm; then
377 + llvm_pkg_setup
378 + fi
379 + python-any-r1_pkg_setup
380 +}
381 +
382 +multilib_src_configure() {
383 + local emesonargs=()
384 +
385 + if use classic; then
386 + # Intel code
387 + dri_driver_enable video_cards_i915 i915
388 + dri_driver_enable video_cards_i965 i965
389 + if ! use video_cards_i915 && \
390 + ! use video_cards_i965; then
391 + dri_driver_enable video_cards_intel i915 i965
392 + fi
393 +
394 + # Nouveau code
395 + dri_driver_enable video_cards_nouveau nouveau
396 +
397 + # ATI code
398 + dri_driver_enable video_cards_r100 r100
399 + dri_driver_enable video_cards_r200 r200
400 + if ! use video_cards_r100 && \
401 + ! use video_cards_r200; then
402 + dri_driver_enable video_cards_radeon r100 r200
403 + fi
404 + fi
405 +
406 + emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
407 +
408 + if use gallium; then
409 + emesonargs+=(
410 + $(meson_use llvm)
411 + $(meson_use lm-sensors lmsensors)
412 + $(meson_use unwind libunwind)
413 + )
414 +
415 + if use video_cards_iris ||
416 + use video_cards_r300 ||
417 + use video_cards_r600 ||
418 + use video_cards_radeonsi ||
419 + use video_cards_nouveau ||
420 + use video_cards_vmware; then
421 + emesonargs+=($(meson_use d3d9 gallium-nine))
422 + else
423 + emesonargs+=(-Dgallium-nine=false)
424 + fi
425 +
426 + if use video_cards_r600 ||
427 + use video_cards_radeonsi ||
428 + use video_cards_nouveau; then
429 + emesonargs+=($(meson_use vaapi gallium-va))
430 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
431 + else
432 + emesonargs+=(-Dgallium-va=false)
433 + fi
434 +
435 + if use video_cards_r300 ||
436 + use video_cards_r600 ||
437 + use video_cards_radeonsi ||
438 + use video_cards_nouveau; then
439 + emesonargs+=($(meson_use vdpau gallium-vdpau))
440 + else
441 + emesonargs+=(-Dgallium-vdpau=false)
442 + fi
443 +
444 + if use video_cards_freedreno ||
445 + use video_cards_nouveau ||
446 + use video_cards_vmware; then
447 + emesonargs+=($(meson_use xa gallium-xa))
448 + else
449 + emesonargs+=(-Dgallium-xa=false)
450 + fi
451 +
452 + if use video_cards_r600 ||
453 + use video_cards_nouveau; then
454 + emesonargs+=($(meson_use xvmc gallium-xvmc))
455 + else
456 + emesonargs+=(-Dgallium-xvmc=false)
457 + fi
458 +
459 + if use video_cards_freedreno ||
460 + use video_cards_lima ||
461 + use video_cards_panfrost ||
462 + use video_cards_vc4 ||
463 + use video_cards_vivante; then
464 + gallium_enable -- kmsro
465 + fi
466 +
467 + gallium_enable video_cards_lima lima
468 + gallium_enable video_cards_panfrost panfrost
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 +
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 + -Dshared-glapi=true
525 + $(meson_use dri3)
526 + $(meson_use egl)
527 + $(meson_use gbm)
528 + $(meson_use gles1)
529 + $(meson_use gles2)
530 + $(meson_use libglvnd glvnd)
531 + $(meson_use selinux)
532 + $(meson_use 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 +pkg_postinst() {
562 + if ! use libglvnd; then
563 + # Switch to the xorg implementation.
564 + echo
565 + eselect opengl set --use-old ${OPENGL_DIR}
566 + fi
567 +}
568 +
569 +# $1 - VIDEO_CARDS flag (check skipped for "--")
570 +# other args - names of DRI drivers to enable
571 +dri_driver_enable() {
572 + if [[ $1 == -- ]] || use $1; then
573 + shift
574 + DRI_DRIVERS+=("$@")
575 + fi
576 +}
577 +
578 +gallium_enable() {
579 + if [[ $1 == -- ]] || use $1; then
580 + shift
581 + GALLIUM_DRIVERS+=("$@")
582 + fi
583 +}
584 +
585 +vulkan_enable() {
586 + if [[ $1 == -- ]] || use $1; then
587 + shift
588 + VULKAN_DRIVERS+=("$@")
589 + fi
590 +}