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