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, 22 May 2019 03:52:58
Message-Id: 1558497028.9fc3a769a5860a12993074d984ef73d2bc964aaf.mattst88@gentoo
1 commit: 9fc3a769a5860a12993074d984ef73d2bc964aaf
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 22 03:49:51 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed May 22 03:50:28 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fc3a769
7
8 media-libs/mesa: Version bump to 19.1.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-19.1.0_rc3.ebuild | 538 +++++++++++++++++++++++++++++++++
14 2 files changed, 539 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index f41fbd8c57f..de61a6c6d41 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -5,3 +5,4 @@ DIST mesa-19.0.4.tar.xz 11964060 BLAKE2B 5c0d0c6e019792ff6cd195f3b59303e2230fa32
21 DIST mesa-19.0.5.tar.xz 11967816 BLAKE2B 941f99194492fcdf4545d06d4f2d576a1a2b206aa9211dd8c3a018877a42dfac4a6d7b4103e781e4c4211661c118b663225252567e22226a866386a8e242f177 SHA512 aecd5ee54ac0316d5e318dbea0abdc06f23e67d75d36eb82d6cf6a396c9e850e1ccf4fa8815f8c4097b6039ebb1524673189350cbfd4b766ce75ce17c26d9d8d
22 DIST mesa-19.1.0-rc1.tar.xz 10877180 BLAKE2B 1ea358595875fbe46b58f5445762cec0c0bd6ee087ce9819237373e2b41aacb64365ac9832b20b9f5fb8838c3d2c6c929cd642bba18b99c7ef153ca124135918 SHA512 a56215882a7c22b7b8fe57d5703914d674841e4045676e2cc2e7834d17f4d5a765516bec4f01eea6772c50e1d979cc430e032302f38c6e7a4274bc43a4d647b1
23 DIST mesa-19.1.0-rc2.tar.xz 10876808 BLAKE2B 2da9603ea7ec5c1de94ee24c3200f570e4ea127601f370230dc1bf1b64167c6d405fbd6bdb4cdae6be46ed0ff1610f12c0445c3f5a65dd6559e91b6f664872ca SHA512 4d04bec48cbfb17d6dbe7b7700083612e46cbaad3e3630d6219fd1988f5e793cdb5100b8c2531a94b6078f8bb239fef27ed440122d12a2473be5be8648b6a8b1
24 +DIST mesa-19.1.0-rc3.tar.xz 10878280 BLAKE2B 0b95b82d46a2c72185652fef76a50ec82b51a2f8efa9ca72e2c10eb0443e9ba43c5906de37d2479dc97ed48a8932eebea27de7e08321d7d3205b188af9f64642 SHA512 740d5d13458b54e1942bfe7165938ec414aa7949aa60109ba872236f3b483c7305ac76b1b48c38dc6fd7691748106447757ac081f364952cc9e00f45fa9e2ea5
25
26 diff --git a/media-libs/mesa/mesa-19.1.0_rc3.ebuild b/media-libs/mesa/mesa-19.1.0_rc3.ebuild
27 new file mode 100644
28 index 00000000000..20146f77c70
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-19.1.0_rc3.ebuild
31 @@ -0,0 +1,538 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
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 + EXPERIMENTAL="true"
51 + inherit git-r3
52 +else
53 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
54 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
55 +fi
56 +
57 +LICENSE="MIT"
58 +SLOT="0"
59 +RESTRICT="
60 + !test? ( test )
61 +"
62 +
63 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
64 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris nouveau vc4 virgl vivante vmware"
65 +for card in ${VIDEO_CARDS}; do
66 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
67 +done
68 +
69 +IUSE="${IUSE_VIDEO_CARDS}
70 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
71 + lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind
72 + vdpau vulkan vulkan-overlay wayland xa xvmc"
73 +
74 +REQUIRED_USE="
75 + d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
76 + gles1? ( egl )
77 + gles2? ( egl )
78 + vulkan? ( dri3
79 + || ( video_cards_i965 video_cards_iris video_cards_radeonsi )
80 + video_cards_radeonsi? ( llvm ) )
81 + vulkan-overlay? ( vulkan )
82 + wayland? ( egl gbm )
83 + video_cards_freedreno? ( gallium )
84 + video_cards_intel? ( classic )
85 + video_cards_i915? ( || ( classic gallium ) )
86 + video_cards_i965? ( classic )
87 + video_cards_iris? ( gallium )
88 + video_cards_nouveau? ( || ( classic 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_vc4? ( gallium )
97 + video_cards_virgl? ( gallium )
98 + video_cards_vivante? ( gallium gbm )
99 + video_cards_vmware? ( gallium )
100 +"
101 +
102 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.97"
103 +RDEPEND="
104 + !app-eselect/eselect-mesa
105 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
106 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
107 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
108 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
109 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
110 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
111 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
112 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
113 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
114 + libglvnd? (
115 + media-libs/libglvnd[${MULTILIB_USEDEP}]
116 + !app-eselect/eselect-opengl
117 + )
118 + !libglvnd? (
119 + >=app-eselect/eselect-opengl-1.3.0
120 + )
121 + gallium? (
122 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
123 + llvm? (
124 + video_cards_radeonsi? (
125 + virtual/libelf:0=[${MULTILIB_USEDEP}]
126 + )
127 + video_cards_r600? (
128 + virtual/libelf:0=[${MULTILIB_USEDEP}]
129 + )
130 + video_cards_radeon? (
131 + virtual/libelf:0=[${MULTILIB_USEDEP}]
132 + )
133 + )
134 + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
135 + opencl? (
136 + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
137 + dev-libs/libclc
138 + virtual/libelf:0=[${MULTILIB_USEDEP}]
139 + )
140 + vaapi? (
141 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
142 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
143 + )
144 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
145 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
146 + )
147 + wayland? (
148 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
149 + >=dev-libs/wayland-protocols-1.8
150 + )
151 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
152 +
153 + video_cards_intel? (
154 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
155 + )
156 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
157 + vulkan-overlay? ( dev-util/glslang:0=[${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="9"
177 +LLVM_DEPSTR="
178 + || (
179 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
180 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
181 + sys-devel/llvm:7[${MULTILIB_USEDEP}]
182 + )
183 + sys-devel/llvm:=[${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 + llvm? (
190 + opencl? (
191 + video_cards_r600? (
192 + ${CLANG_DEPSTR_AMDGPU}
193 + )
194 + !video_cards_r600? (
195 + video_cards_radeonsi? (
196 + ${CLANG_DEPSTR_AMDGPU}
197 + )
198 + )
199 + !video_cards_r600? (
200 + !video_cards_radeonsi? (
201 + video_cards_radeon? (
202 + ${CLANG_DEPSTR_AMDGPU}
203 + )
204 + )
205 + )
206 + !video_cards_r600? (
207 + !video_cards_radeon? (
208 + !video_cards_radeonsi? (
209 + ${CLANG_DEPSTR}
210 + )
211 + )
212 + )
213 + )
214 + !opencl? (
215 + video_cards_r600? (
216 + ${LLVM_DEPSTR_AMDGPU}
217 + )
218 + !video_cards_r600? (
219 + video_cards_radeonsi? (
220 + ${LLVM_DEPSTR_AMDGPU}
221 + )
222 + )
223 + !video_cards_r600? (
224 + !video_cards_radeonsi? (
225 + video_cards_radeon? (
226 + ${LLVM_DEPSTR_AMDGPU}
227 + )
228 + )
229 + )
230 + !video_cards_r600? (
231 + !video_cards_radeon? (
232 + !video_cards_radeonsi? (
233 + ${LLVM_DEPSTR}
234 + )
235 + )
236 + )
237 + )
238 + )
239 +"
240 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
241 +
242 +DEPEND="${RDEPEND}
243 + ${PYTHON_DEPS}
244 + opencl? (
245 + >=sys-devel/gcc-4.6
246 + )
247 + sys-devel/bison
248 + sys-devel/flex
249 + sys-devel/gettext
250 + virtual/pkgconfig
251 + valgrind? ( dev-util/valgrind )
252 + x11-base/xorg-proto
253 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
254 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
255 +"
256 +
257 +S="${WORKDIR}/${MY_P}"
258 +EGIT_CHECKOUT_DIR=${S}
259 +
260 +QA_WX_LOAD="
261 +x86? (
262 + !pic? (
263 + usr/lib*/libglapi.so.0.0.0
264 + usr/lib*/libGLESv1_CM.so.1.0.0
265 + usr/lib*/libGLESv2.so.2.0.0
266 + usr/lib*/libGL.so.1.2.0
267 + usr/lib*/libOSMesa.so.8.0.0
268 + )
269 +)"
270 +
271 +llvm_check_deps() {
272 + local flags=${MULTILIB_USEDEP}
273 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
274 + then
275 + flags+=",llvm_targets_AMDGPU(-)"
276 + fi
277 +
278 + if use opencl; then
279 + has_version "sys-devel/clang[${flags}]" || return 1
280 + fi
281 + has_version "sys-devel/llvm[${flags}]"
282 +}
283 +
284 +pkg_pretend() {
285 + if use opencl; then
286 + if ! use video_cards_r600 &&
287 + ! use video_cards_radeonsi; then
288 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
289 + fi
290 + fi
291 +
292 + if use vaapi; then
293 + if ! use video_cards_r600 &&
294 + ! use video_cards_radeonsi &&
295 + ! use video_cards_nouveau; then
296 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
297 + fi
298 + fi
299 +
300 + if use vdpau; then
301 + if ! use video_cards_r300 &&
302 + ! use video_cards_r600 &&
303 + ! use video_cards_radeonsi &&
304 + ! use video_cards_nouveau; then
305 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
306 + fi
307 + fi
308 +
309 + if use xa; then
310 + if ! use video_cards_freedreno &&
311 + ! use video_cards_nouveau &&
312 + ! use video_cards_vmware; then
313 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
314 + fi
315 + fi
316 +
317 + if use xvmc; then
318 + if ! use video_cards_r600 &&
319 + ! use video_cards_nouveau; then
320 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
321 + fi
322 + fi
323 +
324 + if ! use gallium; then
325 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
326 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
327 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
328 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
329 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
330 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
331 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
332 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
333 + fi
334 +
335 + if ! use llvm; then
336 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
337 + fi
338 +}
339 +
340 +python_check_deps() {
341 + has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
342 +}
343 +
344 +pkg_setup() {
345 + # warning message for bug 459306
346 + if use llvm && has_version sys-devel/llvm[!debug=]; then
347 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
348 + ewarn "detected! This can cause problems. For details, see bug 459306."
349 + fi
350 +
351 + if use llvm; then
352 + llvm_pkg_setup
353 + fi
354 + python-any-r1_pkg_setup
355 +}
356 +
357 +multilib_src_configure() {
358 + local emesonargs=()
359 +
360 + if use classic; then
361 + # Intel code
362 + dri_driver_enable video_cards_i915 i915
363 + dri_driver_enable video_cards_i965 i965
364 + if ! use video_cards_i915 && \
365 + ! use video_cards_i965; then
366 + dri_driver_enable video_cards_intel i915 i965
367 + fi
368 +
369 + # Nouveau code
370 + dri_driver_enable video_cards_nouveau nouveau
371 +
372 + # ATI code
373 + dri_driver_enable video_cards_r100 r100
374 + dri_driver_enable video_cards_r200 r200
375 + if ! use video_cards_r100 && \
376 + ! use video_cards_r200; then
377 + dri_driver_enable video_cards_radeon r100 r200
378 + fi
379 + fi
380 +
381 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
382 +
383 + if use gallium; then
384 + emesonargs+=(
385 + $(meson_use llvm)
386 + $(meson_use lm_sensors lmsensors)
387 + $(meson_use unwind libunwind)
388 + )
389 +
390 + if use video_cards_iris ||
391 + use video_cards_r300 ||
392 + use video_cards_r600 ||
393 + use video_cards_radeonsi ||
394 + use video_cards_nouveau ||
395 + use video_cards_vmware; then
396 + emesonargs+=($(meson_use d3d9 gallium-nine))
397 + else
398 + emesonargs+=(-Dgallium-nine=false)
399 + fi
400 +
401 + if use video_cards_r600 ||
402 + use video_cards_radeonsi ||
403 + use video_cards_nouveau; then
404 + emesonargs+=($(meson_use vaapi gallium-va))
405 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
406 + else
407 + emesonargs+=(-Dgallium-va=false)
408 + fi
409 +
410 + if use video_cards_r300 ||
411 + use video_cards_r600 ||
412 + use video_cards_radeonsi ||
413 + use video_cards_nouveau; then
414 + emesonargs+=($(meson_use vdpau gallium-vdpau))
415 + else
416 + emesonargs+=(-Dgallium-vdpau=false)
417 + fi
418 +
419 + if use video_cards_freedreno ||
420 + use video_cards_nouveau ||
421 + use video_cards_vmware; then
422 + emesonargs+=($(meson_use xa gallium-xa))
423 + else
424 + emesonargs+=(-Dgallium-xa=false)
425 + fi
426 +
427 + if use video_cards_r600 ||
428 + use video_cards_nouveau; then
429 + emesonargs+=($(meson_use xvmc gallium-xvmc))
430 + else
431 + emesonargs+=(-Dgallium-xvmc=false)
432 + fi
433 +
434 + if use video_cards_freedreno ||
435 + use video_cards_vc4 ||
436 + use video_cards_vivante; then
437 + gallium_enable -- kmsro
438 + fi
439 +
440 + gallium_enable video_cards_vc4 vc4
441 + gallium_enable video_cards_vivante etnaviv
442 + gallium_enable video_cards_vmware svga
443 + gallium_enable video_cards_nouveau nouveau
444 +
445 + # Only one i915 driver (classic vs gallium). Default to classic.
446 + if ! use classic; then
447 + gallium_enable video_cards_i915 i915
448 + if ! use video_cards_i915 && \
449 + ! use video_cards_i965; then
450 + gallium_enable video_cards_intel i915
451 + fi
452 + fi
453 +
454 + gallium_enable video_cards_iris iris
455 +
456 + gallium_enable video_cards_r300 r300
457 + gallium_enable video_cards_r600 r600
458 + gallium_enable video_cards_radeonsi radeonsi
459 + if ! use video_cards_r300 && \
460 + ! use video_cards_r600; then
461 + gallium_enable video_cards_radeon r300 r600
462 + fi
463 +
464 + gallium_enable video_cards_freedreno freedreno
465 + gallium_enable video_cards_virgl virgl
466 +
467 + # opencl stuff
468 + emesonargs+=(
469 + -Dgallium-opencl="$(usex opencl icd disabled)"
470 + )
471 + fi
472 +
473 + if use vulkan; then
474 + vulkan_enable video_cards_i965 intel
475 + vulkan_enable video_cards_iris intel
476 + vulkan_enable video_cards_radeonsi amd
477 + fi
478 +
479 + # x86 hardened pax_kernel needs glx-rts, bug 240956
480 + if [[ ${ABI} == x86 ]]; then
481 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
482 + fi
483 +
484 + # on abi_x86_32 hardened we need to have asm disable
485 + if [[ ${ABI} == x86* ]] && use pic; then
486 + emesonargs+=( -Dasm=false )
487 + fi
488 +
489 + if use gallium; then
490 + gallium_enable -- swrast
491 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
492 + else
493 + dri_driver_enable -- swrast
494 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
495 + fi
496 +
497 + driver_list() {
498 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
499 + echo "${drivers//$'\n'/,}"
500 + }
501 +
502 + emesonargs+=(
503 + $(meson_use test build-tests)
504 + -Dglx=dri
505 + -Dshared-glapi=true
506 + $(meson_use dri3)
507 + $(meson_use egl)
508 + $(meson_use gbm)
509 + $(meson_use gles1)
510 + $(meson_use gles2)
511 + $(meson_use libglvnd glvnd)
512 + $(meson_use selinux)
513 + -Dvalgrind=$(usex valgrind auto false)
514 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
515 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
516 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
517 + $(meson_use vulkan-overlay vulkan-overlay-layer)
518 + --buildtype $(usex debug debug plain)
519 + -Db_ndebug=$(usex debug false true)
520 + )
521 + meson_src_configure
522 +}
523 +
524 +multilib_src_compile() {
525 + meson_src_compile
526 +}
527 +
528 +multilib_src_install() {
529 + meson_src_install
530 +
531 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so*
532 +}
533 +
534 +multilib_src_install_all() {
535 + einstalldocs
536 +}
537 +
538 +multilib_src_test() {
539 + meson test -v -C "${BUILD_DIR}" -t 100
540 +}
541 +
542 +pkg_postinst() {
543 + # Switch to the xorg implementation.
544 + echo
545 + eselect opengl set --use-old ${OPENGL_DIR}
546 +}
547 +
548 +# $1 - VIDEO_CARDS flag (check skipped for "--")
549 +# other args - names of DRI drivers to enable
550 +dri_driver_enable() {
551 + if [[ $1 == -- ]] || use $1; then
552 + shift
553 + DRI_DRIVERS+=("$@")
554 + fi
555 +}
556 +
557 +gallium_enable() {
558 + if [[ $1 == -- ]] || use $1; then
559 + shift
560 + GALLIUM_DRIVERS+=("$@")
561 + fi
562 +}
563 +
564 +vulkan_enable() {
565 + if [[ $1 == -- ]] || use $1; then
566 + shift
567 + VULKAN_DRIVERS+=("$@")
568 + fi
569 +}