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: Fri, 31 Jan 2020 19:20:25
Message-Id: 1580498411.d8c037cdbfcc5a728030729bbb5c04392b681db4.mattst88@gentoo
1 commit: d8c037cdbfcc5a728030729bbb5c04392b681db4
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 31 19:03:53 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 31 19:20:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8c037cd
7
8 media-libs/mesa: Version bump to 20.0.0_rc1
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.0_rc1.ebuild | 542 +++++++++++++++++++++++++++++++++
14 2 files changed, 543 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index ed19ad839e3..87e92d19032 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.2.tar.xz 11834324 BLAKE2B 114912816a08424da1d55c65d8ff4fb97d58022f5968d37938055e0b0fcdfeeebdbdca3c28d187fd85aaf6385d3a1bfbfe3f011f410e9a991519d34cb81697b5 SHA512 fb69999fa7a15cd6f2c254fb6e8fe635e56dc49a5c2c762a96c77815cbad77060b8f81a02e67ac9ec58092ab866e080fb928086a5ac1e61c3efe882e5825cd28
23 DIST mesa-19.3.3.tar.xz 11938700 BLAKE2B a2fd88e8c2d8b189ddf4fcebe324d2f6c00e0c101a565eeb783f50ecc7b2b85f3fe698822788807ab9aaf0403a4d27b7c469bd73c891f535e220b9a0204059f9 SHA512 1f792fbde71132afd4a43d6abe6a3d640f375e83641c6144c82312774434c9588ffba65a3ba38394947bd753656aa85213b6cd9f745cec0040c0559eb41f0dc9
24 +DIST mesa-20.0.0-rc1.tar.xz 12085464 BLAKE2B 5d9831eafe9f2e1e3e0c4bc4cb9b76f3b0fca0b6f0c2e6aa4cc72a5f79308eae392f47627f3372400f832bee14dd76914c398c21f2e93d3c42c7ebc5b8c2bda6 SHA512 1b1d5408768b7eec313083ec12218dfaef1f6bb0e209ee7e49b8974af0cdbfdf71860516e459c6933647ec8895ed61f54db64a26662e3e6500e27560f7d98746
25
26 diff --git a/media-libs/mesa/mesa-20.0.0_rc1.ebuild b/media-libs/mesa/mesa-20.0.0_rc1.ebuild
27 new file mode 100644
28 index 00000000000..39da329b5dd
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-20.0.0_rc1.ebuild
31 @@ -0,0 +1,542 @@
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"
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 +"
163 +for card in ${RADEON_CARDS}; do
164 + RDEPEND="${RDEPEND}
165 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
166 + "
167 +done
168 +RDEPEND="${RDEPEND}
169 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
170 +"
171 +
172 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
173 +# we need to *really* make sure we're not pulling one than more slot
174 +# simultaneously.
175 +#
176 +# How to use it:
177 +# 1. List all the working slots (with min versions) in ||, newest first.
178 +# 2. Update the := to specify *max* version, e.g. < 10.
179 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
180 +LLVM_MAX_SLOT="9"
181 +LLVM_DEPSTR="
182 + || (
183 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
184 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
185 + )
186 + sys-devel/llvm:=[${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 opencl; then
294 + if ! use video_cards_r600 &&
295 + ! use video_cards_radeonsi; then
296 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
297 + fi
298 + fi
299 +
300 + if use vaapi; then
301 + if ! use video_cards_r600 &&
302 + ! use video_cards_radeonsi &&
303 + ! use video_cards_nouveau; then
304 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
305 + fi
306 + fi
307 +
308 + if use vdpau; then
309 + if ! use video_cards_r300 &&
310 + ! use video_cards_r600 &&
311 + ! use video_cards_radeonsi &&
312 + ! use video_cards_nouveau; then
313 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
314 + fi
315 + fi
316 +
317 + if use xa; then
318 + if ! use video_cards_freedreno &&
319 + ! use video_cards_nouveau &&
320 + ! use video_cards_vmware; then
321 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
322 + fi
323 + fi
324 +
325 + if use xvmc; then
326 + if ! use video_cards_r600 &&
327 + ! use video_cards_nouveau; then
328 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
329 + fi
330 + fi
331 +
332 + if ! use gallium; then
333 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
334 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
335 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
336 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
337 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
338 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
339 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
340 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
341 + fi
342 +
343 + if ! use llvm; then
344 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
345 + fi
346 +}
347 +
348 +python_check_deps() {
349 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
350 +}
351 +
352 +pkg_setup() {
353 + # warning message for bug 459306
354 + if use llvm && has_version sys-devel/llvm[!debug=]; then
355 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
356 + ewarn "detected! This can cause problems. For details, see bug 459306."
357 + fi
358 +
359 + if use llvm; then
360 + llvm_pkg_setup
361 + fi
362 + python-any-r1_pkg_setup
363 +}
364 +
365 +multilib_src_configure() {
366 + local emesonargs=()
367 +
368 + if use classic; then
369 + # Intel code
370 + dri_driver_enable video_cards_i915 i915
371 + dri_driver_enable video_cards_i965 i965
372 + if ! use video_cards_i915 && \
373 + ! use video_cards_i965; then
374 + dri_driver_enable video_cards_intel i915 i965
375 + fi
376 +
377 + # Nouveau code
378 + dri_driver_enable video_cards_nouveau nouveau
379 +
380 + # ATI code
381 + dri_driver_enable video_cards_r100 r100
382 + dri_driver_enable video_cards_r200 r200
383 + if ! use video_cards_r100 && \
384 + ! use video_cards_r200; then
385 + dri_driver_enable video_cards_radeon r100 r200
386 + fi
387 + fi
388 +
389 + emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
390 +
391 + if use gallium; then
392 + emesonargs+=(
393 + $(meson_use llvm)
394 + $(meson_use lm-sensors lmsensors)
395 + $(meson_use unwind libunwind)
396 + )
397 +
398 + if use video_cards_iris ||
399 + use video_cards_r300 ||
400 + use video_cards_r600 ||
401 + use video_cards_radeonsi ||
402 + use video_cards_nouveau ||
403 + use video_cards_vmware; then
404 + emesonargs+=($(meson_use d3d9 gallium-nine))
405 + else
406 + emesonargs+=(-Dgallium-nine=false)
407 + fi
408 +
409 + if use video_cards_r600 ||
410 + use video_cards_radeonsi ||
411 + use video_cards_nouveau; then
412 + emesonargs+=($(meson_use vaapi gallium-va))
413 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
414 + else
415 + emesonargs+=(-Dgallium-va=false)
416 + fi
417 +
418 + if use video_cards_r300 ||
419 + use video_cards_r600 ||
420 + use video_cards_radeonsi ||
421 + use video_cards_nouveau; then
422 + emesonargs+=($(meson_use vdpau gallium-vdpau))
423 + else
424 + emesonargs+=(-Dgallium-vdpau=false)
425 + fi
426 +
427 + if use video_cards_freedreno ||
428 + use video_cards_nouveau ||
429 + use video_cards_vmware; then
430 + emesonargs+=($(meson_use xa gallium-xa))
431 + else
432 + emesonargs+=(-Dgallium-xa=false)
433 + fi
434 +
435 + if use video_cards_r600 ||
436 + use video_cards_nouveau; then
437 + emesonargs+=($(meson_use xvmc gallium-xvmc))
438 + else
439 + emesonargs+=(-Dgallium-xvmc=false)
440 + fi
441 +
442 + if use video_cards_freedreno ||
443 + use video_cards_lima ||
444 + use video_cards_panfrost ||
445 + use video_cards_vc4 ||
446 + use video_cards_vivante; then
447 + gallium_enable -- kmsro
448 + fi
449 +
450 + gallium_enable video_cards_lima lima
451 + gallium_enable video_cards_panfrost panfrost
452 + gallium_enable video_cards_vc4 vc4
453 + gallium_enable video_cards_vivante etnaviv
454 + gallium_enable video_cards_vmware svga
455 + gallium_enable video_cards_nouveau nouveau
456 +
457 + # Only one i915 driver (classic vs gallium). Default to classic.
458 + if ! use classic; then
459 + gallium_enable video_cards_i915 i915
460 + if ! use video_cards_i915 && \
461 + ! use video_cards_i965; then
462 + gallium_enable video_cards_intel i915
463 + fi
464 + fi
465 +
466 + gallium_enable video_cards_iris iris
467 +
468 + gallium_enable video_cards_r300 r300
469 + gallium_enable video_cards_r600 r600
470 + gallium_enable video_cards_radeonsi radeonsi
471 + if ! use video_cards_r300 && \
472 + ! use video_cards_r600; then
473 + gallium_enable video_cards_radeon r300 r600
474 + fi
475 +
476 + gallium_enable video_cards_freedreno freedreno
477 + gallium_enable video_cards_virgl virgl
478 +
479 + # opencl stuff
480 + emesonargs+=(
481 + -Dgallium-opencl="$(usex opencl icd disabled)"
482 + )
483 + fi
484 +
485 + if use vulkan; then
486 + vulkan_enable video_cards_i965 intel
487 + vulkan_enable video_cards_iris intel
488 + vulkan_enable video_cards_radeonsi amd
489 + fi
490 +
491 + if use gallium; then
492 + gallium_enable -- swrast
493 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
494 + else
495 + dri_driver_enable -- swrast
496 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
497 + fi
498 +
499 + driver_list() {
500 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
501 + echo "${drivers//$'\n'/,}"
502 + }
503 +
504 + emesonargs+=(
505 + $(meson_use test build-tests)
506 + -Dglx=$(usex X dri disabled)
507 + -Dshared-glapi=true
508 + $(meson_use dri3)
509 + $(meson_use egl)
510 + $(meson_use gbm)
511 + $(meson_use gles1)
512 + $(meson_use gles2)
513 + $(meson_use libglvnd glvnd)
514 + $(meson_use selinux)
515 + -Dvalgrind=$(usex valgrind auto false)
516 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
517 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
518 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
519 + $(meson_use vulkan-overlay vulkan-overlay-layer)
520 + --buildtype $(usex debug debug plain)
521 + -Db_ndebug=$(usex debug false true)
522 + )
523 + meson_src_configure
524 +}
525 +
526 +multilib_src_compile() {
527 + meson_src_compile
528 +}
529 +
530 +multilib_src_install() {
531 + meson_src_install
532 +
533 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/pkgconfig/{egl,gl}.pc
534 +}
535 +
536 +multilib_src_install_all() {
537 + einstalldocs
538 +}
539 +
540 +multilib_src_test() {
541 + meson test -v -C "${BUILD_DIR}" -t 100
542 +}
543 +
544 +pkg_postinst() {
545 + if ! use libglvnd; then
546 + # Switch to the xorg implementation.
547 + echo
548 + eselect opengl set --use-old ${OPENGL_DIR}
549 + fi
550 +}
551 +
552 +# $1 - VIDEO_CARDS flag (check skipped for "--")
553 +# other args - names of DRI drivers to enable
554 +dri_driver_enable() {
555 + if [[ $1 == -- ]] || use $1; then
556 + shift
557 + DRI_DRIVERS+=("$@")
558 + fi
559 +}
560 +
561 +gallium_enable() {
562 + if [[ $1 == -- ]] || use $1; then
563 + shift
564 + GALLIUM_DRIVERS+=("$@")
565 + fi
566 +}
567 +
568 +vulkan_enable() {
569 + if [[ $1 == -- ]] || use $1; then
570 + shift
571 + VULKAN_DRIVERS+=("$@")
572 + fi
573 +}