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, 07 May 2019 18:02:38
Message-Id: 1557251876.8b8977ecde1e18ddefc95db8175121cc1b4442f4.mattst88@gentoo
1 commit: 8b8977ecde1e18ddefc95db8175121cc1b4442f4
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 7 17:57:56 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue May 7 17:57:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b8977ec
7
8 media-libs/mesa: Version bump to 19.1.0_rc1
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11 Package-Manager: Portage-2.3.62, Repoman-2.3.11
12
13 media-libs/mesa/Manifest | 1 +
14 media-libs/mesa/mesa-19.1.0_rc1.ebuild | 537 +++++++++++++++++++++++++++++++++
15 2 files changed, 538 insertions(+)
16
17 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
18 index 4f877199c71..b31e2c16712 100644
19 --- a/media-libs/mesa/Manifest
20 +++ b/media-libs/mesa/Manifest
21 @@ -1,3 +1,4 @@
22 DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d08f66f2731fe60eff21edfa822b6d7a293fbf9e426acddbb58445b9b0e3c0b1bc8ae05e8b19e802872571449c2 SHA512 3a6dcaba99185e28d162b130bbd760fe87e6072065958189b28f41ea287ef041397897e098d93218a64802cf11c73806f7400a866bd8e5ed69694fa15c147487
23 DIST mesa-19.0.2.tar.xz 11959876 BLAKE2B 4d82a339a1577fb156b48d330157894891326f36cb265421453a5fde5086ee05f83962fde49113f34917f750cfffb40c8bce84bd003fe9d7c1e6900c52dc4d66 SHA512 6b317205efa7d62150fae23489fbad5f062ecde99fb5b210fa7ccbed2e0ef60aee1f1e66e2c606ea5d59193c3218f732556706ab3b645b175044342d88984d51
24 DIST mesa-19.0.3.tar.xz 11963844 BLAKE2B 7d8bae717c0a2a6143d3aee35852145a2032d40ad7f4edcd76eec46392f3917787592d13f9695de54a15ea5bcb3dec3181c418ddfb5b69a3e1b52fb796f04eab SHA512 aa170577252aa4157e4bd49076bbf6207e4aada9fc9f23b255de332e816f9c63e5661f752f2f276dd43e232a8926866004e2a2ff9ad4b411330969c2a9a7ffa0
25 +DIST mesa-19.1.0-rc1.tar.xz 10877180 BLAKE2B 1ea358595875fbe46b58f5445762cec0c0bd6ee087ce9819237373e2b41aacb64365ac9832b20b9f5fb8838c3d2c6c929cd642bba18b99c7ef153ca124135918 SHA512 a56215882a7c22b7b8fe57d5703914d674841e4045676e2cc2e7834d17f4d5a765516bec4f01eea6772c50e1d979cc430e032302f38c6e7a4274bc43a4d647b1
26
27 diff --git a/media-libs/mesa/mesa-19.1.0_rc1.ebuild b/media-libs/mesa/mesa-19.1.0_rc1.ebuild
28 new file mode 100644
29 index 00000000000..b8a32420fa6
30 --- /dev/null
31 +++ b/media-libs/mesa/mesa-19.1.0_rc1.ebuild
32 @@ -0,0 +1,537 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
39 +
40 +inherit llvm meson multilib-minimal pax-utils python-any-r1
41 +
42 +OPENGL_DIR="xorg-x11"
43 +
44 +MY_P="${P/_/-}"
45 +
46 +DESCRIPTION="OpenGL-like graphic library for Linux"
47 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
48 +
49 +if [[ ${PV} == 9999 ]]; then
50 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
51 + EXPERIMENTAL="true"
52 + inherit git-r3
53 +else
54 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
55 + 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"
56 +fi
57 +
58 +LICENSE="MIT"
59 +SLOT="0"
60 +RESTRICT="
61 + !test? ( test )
62 +"
63 +
64 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
65 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris nouveau vc4 virgl vivante vmware"
66 +for card in ${VIDEO_CARDS}; do
67 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
68 +done
69 +
70 +IUSE="${IUSE_VIDEO_CARDS}
71 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
72 + lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind
73 + vdpau vulkan vulkan-overlay wayland xa xvmc"
74 +
75 +REQUIRED_USE="
76 + d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
77 + gles1? ( egl )
78 + gles2? ( egl )
79 + vulkan? ( dri3
80 + || ( video_cards_i965 video_cards_iris video_cards_radeonsi )
81 + video_cards_radeonsi? ( llvm ) )
82 + vulkan-overlay? ( vulkan )
83 + wayland? ( egl gbm )
84 + video_cards_freedreno? ( gallium )
85 + video_cards_intel? ( classic )
86 + video_cards_i915? ( || ( classic gallium ) )
87 + video_cards_i965? ( classic )
88 + video_cards_iris? ( gallium )
89 + video_cards_nouveau? ( || ( classic 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 +"
102 +
103 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.97"
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 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
109 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
110 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
111 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
112 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
113 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
114 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
115 + libglvnd? (
116 + media-libs/libglvnd[${MULTILIB_USEDEP}]
117 + !app-eselect/eselect-opengl
118 + )
119 + !libglvnd? (
120 + >=app-eselect/eselect-opengl-1.3.0
121 + )
122 + gallium? (
123 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
124 + llvm? (
125 + video_cards_radeonsi? (
126 + virtual/libelf:0=[${MULTILIB_USEDEP}]
127 + )
128 + video_cards_r600? (
129 + virtual/libelf:0=[${MULTILIB_USEDEP}]
130 + )
131 + video_cards_radeon? (
132 + virtual/libelf:0=[${MULTILIB_USEDEP}]
133 + )
134 + )
135 + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
136 + opencl? (
137 + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
138 + dev-libs/libclc
139 + virtual/libelf:0=[${MULTILIB_USEDEP}]
140 + )
141 + vaapi? (
142 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
143 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
144 + )
145 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
146 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
147 + )
148 + wayland? (
149 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
150 + >=dev-libs/wayland-protocols-1.8
151 + )
152 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
153 +
154 + video_cards_intel? (
155 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
156 + )
157 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
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 +}