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: Thu, 09 May 2019 21:43:08
Message-Id: 1557438170.9958445019cbf9d2fd7a260cfac4e5b7b1b5b39f.mattst88@gentoo
1 commit: 9958445019cbf9d2fd7a260cfac4e5b7b1b5b39f
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 9 21:42:32 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu May 9 21:42:50 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99584450
7
8 media-libs/mesa: Version bump to 19.0.4
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-19.0.4.ebuild | 525 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 526 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index b31e2c16712..0910a18ad64 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,4 +1,5 @@
21 DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d08f66f2731fe60eff21edfa822b6d7a293fbf9e426acddbb58445b9b0e3c0b1bc8ae05e8b19e802872571449c2 SHA512 3a6dcaba99185e28d162b130bbd760fe87e6072065958189b28f41ea287ef041397897e098d93218a64802cf11c73806f7400a866bd8e5ed69694fa15c147487
22 DIST mesa-19.0.2.tar.xz 11959876 BLAKE2B 4d82a339a1577fb156b48d330157894891326f36cb265421453a5fde5086ee05f83962fde49113f34917f750cfffb40c8bce84bd003fe9d7c1e6900c52dc4d66 SHA512 6b317205efa7d62150fae23489fbad5f062ecde99fb5b210fa7ccbed2e0ef60aee1f1e66e2c606ea5d59193c3218f732556706ab3b645b175044342d88984d51
23 DIST mesa-19.0.3.tar.xz 11963844 BLAKE2B 7d8bae717c0a2a6143d3aee35852145a2032d40ad7f4edcd76eec46392f3917787592d13f9695de54a15ea5bcb3dec3181c418ddfb5b69a3e1b52fb796f04eab SHA512 aa170577252aa4157e4bd49076bbf6207e4aada9fc9f23b255de332e816f9c63e5661f752f2f276dd43e232a8926866004e2a2ff9ad4b411330969c2a9a7ffa0
24 +DIST mesa-19.0.4.tar.xz 11964060 BLAKE2B 5c0d0c6e019792ff6cd195f3b59303e2230fa32c24aa1524c3cccddc56ef6634732e79ff03c7bb20055c0489dbdd7cc103b27989179602f3c9ab332afd531d1a SHA512 431cd9360e1f6376e0966daf82322877b3833032c800f2d86816b37a6f3978d76294a01c3905a01af610582c9541c2a8b52b2e89c56cc954651aa7a790e84ca5
25 DIST mesa-19.1.0-rc1.tar.xz 10877180 BLAKE2B 1ea358595875fbe46b58f5445762cec0c0bd6ee087ce9819237373e2b41aacb64365ac9832b20b9f5fb8838c3d2c6c929cd642bba18b99c7ef153ca124135918 SHA512 a56215882a7c22b7b8fe57d5703914d674841e4045676e2cc2e7834d17f4d5a765516bec4f01eea6772c50e1d979cc430e032302f38c6e7a4274bc43a4d647b1
26
27 diff --git a/media-libs/mesa/mesa-19.0.4.ebuild b/media-libs/mesa/mesa-19.0.4.ebuild
28 new file mode 100644
29 index 00000000000..6e5cc0499b8
30 --- /dev/null
31 +++ b/media-libs/mesa/mesa-19.0.4.ebuild
32 @@ -0,0 +1,525 @@
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 imx intel 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 wayland xa xvmc"
74 +
75 +REQUIRED_USE="
76 + d3d9? ( dri3 || ( 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_radeonsi )
81 + video_cards_radeonsi? ( llvm ) )
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_imx? ( gallium video_cards_vivante )
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 +"
158 +for card in ${RADEON_CARDS}; do
159 + RDEPEND="${RDEPEND}
160 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
161 + "
162 +done
163 +RDEPEND="${RDEPEND}
164 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
165 +"
166 +
167 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
168 +# we need to *really* make sure we're not pulling one than more slot
169 +# simultaneously.
170 +#
171 +# How to use it:
172 +# 1. List all the working slots (with min versions) in ||, newest first.
173 +# 2. Update the := to specify *max* version, e.g. < 9.
174 +# 3. Specify LLVM_MAX_SLOT, e.g. 8.
175 +LLVM_MAX_SLOT="8"
176 +LLVM_DEPSTR="
177 + || (
178 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
179 + sys-devel/llvm:7[${MULTILIB_USEDEP}]
180 + )
181 + <sys-devel/llvm-9:=[${MULTILIB_USEDEP}]
182 +"
183 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
184 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
185 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
186 +RDEPEND="${RDEPEND}
187 + llvm? (
188 + opencl? (
189 + video_cards_r600? (
190 + ${CLANG_DEPSTR_AMDGPU}
191 + )
192 + !video_cards_r600? (
193 + video_cards_radeonsi? (
194 + ${CLANG_DEPSTR_AMDGPU}
195 + )
196 + )
197 + !video_cards_r600? (
198 + !video_cards_radeonsi? (
199 + video_cards_radeon? (
200 + ${CLANG_DEPSTR_AMDGPU}
201 + )
202 + )
203 + )
204 + !video_cards_r600? (
205 + !video_cards_radeon? (
206 + !video_cards_radeonsi? (
207 + ${CLANG_DEPSTR}
208 + )
209 + )
210 + )
211 + )
212 + !opencl? (
213 + video_cards_r600? (
214 + ${LLVM_DEPSTR_AMDGPU}
215 + )
216 + !video_cards_r600? (
217 + video_cards_radeonsi? (
218 + ${LLVM_DEPSTR_AMDGPU}
219 + )
220 + )
221 + !video_cards_r600? (
222 + !video_cards_radeonsi? (
223 + video_cards_radeon? (
224 + ${LLVM_DEPSTR_AMDGPU}
225 + )
226 + )
227 + )
228 + !video_cards_r600? (
229 + !video_cards_radeon? (
230 + !video_cards_radeonsi? (
231 + ${LLVM_DEPSTR}
232 + )
233 + )
234 + )
235 + )
236 + )
237 +"
238 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
239 +
240 +DEPEND="${RDEPEND}
241 + ${PYTHON_DEPS}
242 + opencl? (
243 + >=sys-devel/gcc-4.6
244 + )
245 + sys-devel/bison
246 + sys-devel/flex
247 + sys-devel/gettext
248 + virtual/pkgconfig
249 + valgrind? ( dev-util/valgrind )
250 + x11-base/xorg-proto
251 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
252 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
253 +"
254 +
255 +S="${WORKDIR}/${MY_P}"
256 +EGIT_CHECKOUT_DIR=${S}
257 +
258 +QA_WX_LOAD="
259 +x86? (
260 + !pic? (
261 + usr/lib*/libglapi.so.0.0.0
262 + usr/lib*/libGLESv1_CM.so.1.0.0
263 + usr/lib*/libGLESv2.so.2.0.0
264 + usr/lib*/libGL.so.1.2.0
265 + usr/lib*/libOSMesa.so.8.0.0
266 + )
267 +)"
268 +
269 +llvm_check_deps() {
270 + local flags=${MULTILIB_USEDEP}
271 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
272 + then
273 + flags+=",llvm_targets_AMDGPU(-)"
274 + fi
275 +
276 + if use opencl; then
277 + has_version "sys-devel/clang[${flags}]" || return 1
278 + fi
279 + has_version "sys-devel/llvm[${flags}]"
280 +}
281 +
282 +pkg_pretend() {
283 + if use opencl; then
284 + if ! use video_cards_r600 &&
285 + ! use video_cards_radeonsi; then
286 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
287 + fi
288 + fi
289 +
290 + if use vaapi; then
291 + if ! use video_cards_r600 &&
292 + ! use video_cards_radeonsi &&
293 + ! use video_cards_nouveau; then
294 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
295 + fi
296 + fi
297 +
298 + if use vdpau; then
299 + if ! use video_cards_r300 &&
300 + ! use video_cards_r600 &&
301 + ! use video_cards_radeonsi &&
302 + ! use video_cards_nouveau; then
303 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
304 + fi
305 + fi
306 +
307 + if use xa; then
308 + if ! use video_cards_freedreno &&
309 + ! use video_cards_nouveau &&
310 + ! use video_cards_vmware; then
311 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
312 + fi
313 + fi
314 +
315 + if use xvmc; then
316 + if ! use video_cards_r600 &&
317 + ! use video_cards_nouveau; then
318 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
319 + fi
320 + fi
321 +
322 + if ! use gallium; then
323 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
324 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
325 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
326 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
327 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
328 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
329 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
330 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
331 + fi
332 +
333 + if ! use llvm; then
334 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
335 + fi
336 +}
337 +
338 +python_check_deps() {
339 + has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
340 +}
341 +
342 +pkg_setup() {
343 + # warning message for bug 459306
344 + if use llvm && has_version sys-devel/llvm[!debug=]; then
345 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
346 + ewarn "detected! This can cause problems. For details, see bug 459306."
347 + fi
348 +
349 + if use llvm; then
350 + llvm_pkg_setup
351 + fi
352 + python-any-r1_pkg_setup
353 +}
354 +
355 +multilib_src_configure() {
356 + local emesonargs=()
357 +
358 + if use classic; then
359 + # Intel code
360 + dri_driver_enable video_cards_i915 i915
361 + dri_driver_enable video_cards_i965 i965
362 + if ! use video_cards_i915 && \
363 + ! use video_cards_i965; then
364 + dri_driver_enable video_cards_intel i915 i965
365 + fi
366 +
367 + # Nouveau code
368 + dri_driver_enable video_cards_nouveau nouveau
369 +
370 + # ATI code
371 + dri_driver_enable video_cards_r100 r100
372 + dri_driver_enable video_cards_r200 r200
373 + if ! use video_cards_r100 && \
374 + ! use video_cards_r200; then
375 + dri_driver_enable video_cards_radeon r100 r200
376 + fi
377 + fi
378 +
379 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
380 +
381 + if use gallium; then
382 + emesonargs+=(
383 + $(meson_use llvm)
384 + $(meson_use lm_sensors lmsensors)
385 + $(meson_use unwind libunwind)
386 + )
387 +
388 + if use video_cards_r300 ||
389 + use video_cards_r600 ||
390 + use video_cards_radeonsi ||
391 + use video_cards_nouveau ||
392 + use video_cards_vmware; then
393 + emesonargs+=($(meson_use d3d9 gallium-nine))
394 + else
395 + emesonargs+=(-Dgallium-nine=false)
396 + fi
397 +
398 + if use video_cards_r600 ||
399 + use video_cards_radeonsi ||
400 + use video_cards_nouveau; then
401 + emesonargs+=($(meson_use vaapi gallium-va))
402 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
403 + else
404 + emesonargs+=(-Dgallium-va=false)
405 + fi
406 +
407 + if use video_cards_r300 ||
408 + use video_cards_r600 ||
409 + use video_cards_radeonsi ||
410 + use video_cards_nouveau; then
411 + emesonargs+=($(meson_use vdpau gallium-vdpau))
412 + else
413 + emesonargs+=(-Dgallium-vdpau=false)
414 + fi
415 +
416 + if use video_cards_freedreno ||
417 + use video_cards_nouveau ||
418 + use video_cards_vmware; then
419 + emesonargs+=($(meson_use xa gallium-xa))
420 + else
421 + emesonargs+=(-Dgallium-xa=false)
422 + fi
423 +
424 + if use video_cards_r600 ||
425 + use video_cards_nouveau; then
426 + emesonargs+=($(meson_use xvmc gallium-xvmc))
427 + else
428 + emesonargs+=(-Dgallium-xvmc=false)
429 + fi
430 +
431 + gallium_enable video_cards_vc4 vc4
432 + gallium_enable video_cards_vivante etnaviv
433 + gallium_enable video_cards_vmware svga
434 + gallium_enable video_cards_nouveau nouveau
435 + gallium_enable video_cards_imx imx
436 +
437 + # Only one i915 driver (classic vs gallium). Default to classic.
438 + if ! use classic; then
439 + gallium_enable video_cards_i915 i915
440 + if ! use video_cards_i915 && \
441 + ! use video_cards_i965; then
442 + gallium_enable video_cards_intel i915
443 + fi
444 + fi
445 +
446 + gallium_enable video_cards_r300 r300
447 + gallium_enable video_cards_r600 r600
448 + gallium_enable video_cards_radeonsi radeonsi
449 + if ! use video_cards_r300 && \
450 + ! use video_cards_r600; then
451 + gallium_enable video_cards_radeon r300 r600
452 + fi
453 +
454 + gallium_enable video_cards_freedreno freedreno
455 + gallium_enable video_cards_virgl virgl
456 +
457 + # opencl stuff
458 + emesonargs+=(
459 + -Dgallium-opencl="$(usex opencl icd disabled)"
460 + )
461 + fi
462 +
463 + if use vulkan; then
464 + vulkan_enable video_cards_i965 intel
465 + vulkan_enable video_cards_radeonsi amd
466 + fi
467 +
468 + # x86 hardened pax_kernel needs glx-rts, bug 240956
469 + if [[ ${ABI} == x86 ]]; then
470 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
471 + fi
472 +
473 + # on abi_x86_32 hardened we need to have asm disable
474 + if [[ ${ABI} == x86* ]] && use pic; then
475 + emesonargs+=( -Dasm=false )
476 + fi
477 +
478 + if use gallium; then
479 + gallium_enable -- swrast
480 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
481 + else
482 + dri_driver_enable -- swrast
483 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
484 + fi
485 +
486 + driver_list() {
487 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
488 + echo "${drivers//$'\n'/,}"
489 + }
490 +
491 + emesonargs+=(
492 + $(meson_use test build-tests)
493 + -Dglx=dri
494 + -Dshared-glapi=true
495 + $(meson_use dri3)
496 + $(meson_use egl)
497 + $(meson_use gbm)
498 + $(meson_use gles1)
499 + $(meson_use gles2)
500 + $(meson_use libglvnd glvnd)
501 + $(meson_use selinux)
502 + -Dvalgrind=$(usex valgrind auto false)
503 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
504 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
505 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
506 + --buildtype $(usex debug debug plain)
507 + -Db_ndebug=$(usex debug false true)
508 + )
509 + meson_src_configure
510 +}
511 +
512 +multilib_src_compile() {
513 + meson_src_compile
514 +}
515 +
516 +multilib_src_install() {
517 + meson_src_install
518 +
519 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so*
520 +}
521 +
522 +multilib_src_install_all() {
523 + einstalldocs
524 +}
525 +
526 +multilib_src_test() {
527 + meson test -v -C "${BUILD_DIR}" -t 100
528 +}
529 +
530 +pkg_postinst() {
531 + # Switch to the xorg implementation.
532 + echo
533 + eselect opengl set --use-old ${OPENGL_DIR}
534 +}
535 +
536 +# $1 - VIDEO_CARDS flag (check skipped for "--")
537 +# other args - names of DRI drivers to enable
538 +dri_driver_enable() {
539 + if [[ $1 == -- ]] || use $1; then
540 + shift
541 + DRI_DRIVERS+=("$@")
542 + fi
543 +}
544 +
545 +gallium_enable() {
546 + if [[ $1 == -- ]] || use $1; then
547 + shift
548 + GALLIUM_DRIVERS+=("$@")
549 + fi
550 +}
551 +
552 +vulkan_enable() {
553 + if [[ $1 == -- ]] || use $1; then
554 + shift
555 + VULKAN_DRIVERS+=("$@")
556 + fi
557 +}