Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: media-libs/mesa/
Date: Wed, 17 Apr 2019 01:13:05
Message-Id: 1555463572.7cad2187d1a6b1c4656c8326b5e88b5f95737e60.blueness@gentoo
1 commit: 7cad2187d1a6b1c4656c8326b5e88b5f95737e60
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 17 01:12:52 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 17 01:12:52 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7cad2187
7
8 media-libs/mesa: version bump to 18.3.6 follow main tree
9
10 Signed-off-by: Anthony G. Basile <blueness <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-18.3.6.ebuild | 532 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 533 insertions(+)
16
17 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
18 index 39154ad..e20b5bb 100644
19 --- a/media-libs/mesa/Manifest
20 +++ b/media-libs/mesa/Manifest
21 @@ -2,4 +2,5 @@ DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa
22 DIST mesa-18.2.8.tar.xz 11385224 BLAKE2B c6fbf71e2ab6837f91dfa996cf7e89e9cae22e219cac56bd4201f7a62c787ddd2f65e7d162a329971018f0b1a796ee1a5b252ee6b43bb3b27a233d67b6cdf615 SHA512 04d5ada9ba3acea853def3ebcbb53ee76936a4cd4229ae753d2ce1b5cf543bea1e5764f2ef2b19735d47d041ba6b0582841bc89e2c9331fdfbd89386f599a1f7
23 DIST mesa-18.3.4.tar.xz 11875224 BLAKE2B 81d34349c644cc93b3ca525046cdd63a5aa2a16d8f6b841830a138c8e9e375fb0f75a17bd80b4c48ed573f4976dd6612b0773305a3bec982540914365c9925ff SHA512 e4ead944ba053aa05425e9e199d633f576dfa424976253fc32438e8db6da5e8d381122e4c4b7fb18f94177421f208bab5567cfec8d2692d104e266483ca02a99
24 DIST mesa-18.3.5.tar.xz 11882012 BLAKE2B 88279fe2f24c2a47c8857ad34382b7c8b64119632f1ec7ce8d0fe2afe669e01d2e071726f01e28b001be353d8d9ec1f0ef46d3ba1e64239d63221b100745e8ee SHA512 f229ac122eafee98d1a40c54adeb019eb4458cb67063db9ba760b265da0634fe77247c3c8cb5c5de5fd40f8545e35d45000a74af9257ebf4e2028156add8644c
25 +DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d08f66f2731fe60eff21edfa822b6d7a293fbf9e426acddbb58445b9b0e3c0b1bc8ae05e8b19e802872571449c2 SHA512 3a6dcaba99185e28d162b130bbd760fe87e6072065958189b28f41ea287ef041397897e098d93218a64802cf11c73806f7400a866bd8e5ed69694fa15c147487
26 DIST mesa-19.0.2.tar.xz 11959876 BLAKE2B 4d82a339a1577fb156b48d330157894891326f36cb265421453a5fde5086ee05f83962fde49113f34917f750cfffb40c8bce84bd003fe9d7c1e6900c52dc4d66 SHA512 6b317205efa7d62150fae23489fbad5f062ecde99fb5b210fa7ccbed2e0ef60aee1f1e66e2c606ea5d59193c3218f732556706ab3b645b175044342d88984d51
27
28 diff --git a/media-libs/mesa/mesa-18.3.6.ebuild b/media-libs/mesa/mesa-18.3.6.ebuild
29 new file mode 100644
30 index 0000000..f49d518
31 --- /dev/null
32 +++ b/media-libs/mesa/mesa-18.3.6.ebuild
33 @@ -0,0 +1,532 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
40 +
41 +inherit llvm meson multilib-minimal pax-utils python-any-r1
42 +
43 +OPENGL_DIR="xorg-x11"
44 +
45 +MY_P="${P/_/-}"
46 +
47 +DESCRIPTION="OpenGL-like graphic library for Linux"
48 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
49 +
50 +if [[ ${PV} == 9999 ]]; then
51 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
52 + EXPERIMENTAL="true"
53 + inherit git-r3
54 +else
55 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
56 + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
57 +fi
58 +
59 +LICENSE="MIT"
60 +SLOT="0"
61 +RESTRICT="
62 + !test? ( test )
63 +"
64 +
65 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
66 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
67 +for card in ${VIDEO_CARDS}; do
68 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
69 +done
70 +
71 +IUSE="${IUSE_VIDEO_CARDS}
72 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm lm_sensors
73 + opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
74 + vulkan wayland xa xvmc"
75 +
76 +REQUIRED_USE="
77 + d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
78 + gles1? ( egl )
79 + gles2? ( egl )
80 + vulkan? ( dri3
81 + || ( video_cards_i965 video_cards_radeonsi )
82 + video_cards_radeonsi? ( llvm ) )
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_imx? ( gallium video_cards_vivante )
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.96"
104 +RDEPEND="
105 + !app-eselect/eselect-mesa
106 + >=app-eselect/eselect-opengl-1.3.0
107 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
108 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
109 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
110 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
111 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
112 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
113 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
114 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
115 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
116 + gallium? (
117 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
118 + llvm? (
119 + video_cards_radeonsi? (
120 + virtual/libelf:0=[${MULTILIB_USEDEP}]
121 + )
122 + video_cards_r600? (
123 + virtual/libelf:0=[${MULTILIB_USEDEP}]
124 + )
125 + video_cards_radeon? (
126 + virtual/libelf:0=[${MULTILIB_USEDEP}]
127 + )
128 + )
129 + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
130 + opencl? (
131 + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
132 + dev-libs/libclc
133 + virtual/libelf:0=[${MULTILIB_USEDEP}]
134 + )
135 + vaapi? (
136 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
137 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
138 + )
139 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
140 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
141 + )
142 + wayland? (
143 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
144 + >=dev-libs/wayland-protocols-1.8
145 + )
146 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
147 +
148 + video_cards_intel? (
149 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
150 + )
151 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
152 +"
153 +for card in ${RADEON_CARDS}; do
154 + RDEPEND="${RDEPEND}
155 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
156 + "
157 +done
158 +RDEPEND="${RDEPEND}
159 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
160 +"
161 +
162 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
163 +# we need to *really* make sure we're not pulling one than more slot
164 +# simultaneously.
165 +#
166 +# How to use it:
167 +# 1. List all the working slots (with min versions) in ||, newest first.
168 +# 2. Update the := to specify *max* version, e.g. < 8.
169 +# 3. Specify LLVM_MAX_SLOT, e.g. 7.
170 +LLVM_MAX_SLOT="7"
171 +LLVM_DEPSTR="
172 + || (
173 + sys-devel/llvm:7[${MULTILIB_USEDEP}]
174 + sys-devel/llvm:6[${MULTILIB_USEDEP}]
175 + sys-devel/llvm:5[${MULTILIB_USEDEP}]
176 + sys-devel/llvm:4[${MULTILIB_USEDEP}]
177 + )
178 + <sys-devel/llvm-8:=[${MULTILIB_USEDEP}]
179 +"
180 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
181 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
182 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
183 +RDEPEND="${RDEPEND}
184 + llvm? (
185 + opencl? (
186 + video_cards_r600? (
187 + ${CLANG_DEPSTR_AMDGPU}
188 + )
189 + !video_cards_r600? (
190 + video_cards_radeonsi? (
191 + ${CLANG_DEPSTR_AMDGPU}
192 + )
193 + )
194 + !video_cards_r600? (
195 + !video_cards_radeonsi? (
196 + video_cards_radeon? (
197 + ${CLANG_DEPSTR_AMDGPU}
198 + )
199 + )
200 + )
201 + !video_cards_r600? (
202 + !video_cards_radeon? (
203 + !video_cards_radeonsi? (
204 + ${CLANG_DEPSTR}
205 + )
206 + )
207 + )
208 + )
209 + !opencl? (
210 + video_cards_r600? (
211 + ${LLVM_DEPSTR_AMDGPU}
212 + )
213 + !video_cards_r600? (
214 + video_cards_radeonsi? (
215 + ${LLVM_DEPSTR_AMDGPU}
216 + )
217 + )
218 + !video_cards_r600? (
219 + !video_cards_radeonsi? (
220 + video_cards_radeon? (
221 + ${LLVM_DEPSTR_AMDGPU}
222 + )
223 + )
224 + )
225 + !video_cards_r600? (
226 + !video_cards_radeon? (
227 + !video_cards_radeonsi? (
228 + ${LLVM_DEPSTR}
229 + )
230 + )
231 + )
232 + )
233 + )
234 +"
235 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
236 +
237 +DEPEND="${RDEPEND}
238 + ${PYTHON_DEPS}
239 + opencl? (
240 + >=sys-devel/gcc-4.6
241 + )
242 + sys-devel/bison
243 + sys-devel/flex
244 + sys-devel/gettext
245 + virtual/pkgconfig
246 + valgrind? ( dev-util/valgrind )
247 + x11-base/xorg-proto
248 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
249 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
250 +"
251 +
252 +S="${WORKDIR}/${MY_P}"
253 +EGIT_CHECKOUT_DIR=${S}
254 +
255 +QA_WX_LOAD="
256 +x86? (
257 + !pic? (
258 + usr/lib*/libglapi.so.0.0.0
259 + usr/lib*/libGLESv1_CM.so.1.0.0
260 + usr/lib*/libGLESv2.so.2.0.0
261 + usr/lib*/libGL.so.1.2.0
262 + usr/lib*/libOSMesa.so.8.0.0
263 + )
264 +)"
265 +
266 +PATCHES=(
267 + "${FILESDIR}"/${PN}-17-execinfo.patch
268 + "${FILESDIR}"/${PN}-17-musl-string_h.patch
269 + "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
270 + "${FILESDIR}"/${PN}-18-musl-pthread.patch
271 + "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
272 + "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
273 +)
274 +
275 +llvm_check_deps() {
276 + local flags=${MULTILIB_USEDEP}
277 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
278 + then
279 + flags+=",llvm_targets_AMDGPU(-)"
280 + fi
281 +
282 + if use opencl; then
283 + has_version "sys-devel/clang[${flags}]" || return 1
284 + fi
285 + has_version "sys-devel/llvm[${flags}]"
286 +}
287 +
288 +pkg_pretend() {
289 + if use opencl; then
290 + if ! use video_cards_r600 &&
291 + ! use video_cards_radeonsi; then
292 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
293 + fi
294 + fi
295 +
296 + if use vaapi; then
297 + if ! use video_cards_r600 &&
298 + ! use video_cards_radeonsi &&
299 + ! use video_cards_nouveau; then
300 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
301 + fi
302 + fi
303 +
304 + if use vdpau; then
305 + if ! use video_cards_r300 &&
306 + ! use video_cards_r600 &&
307 + ! use video_cards_radeonsi &&
308 + ! use video_cards_nouveau; then
309 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
310 + fi
311 + fi
312 +
313 + if use xa; then
314 + if ! use video_cards_freedreno &&
315 + ! use video_cards_nouveau &&
316 + ! use video_cards_vmware; then
317 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
318 + fi
319 + fi
320 +
321 + if use xvmc; then
322 + if ! use video_cards_r600 &&
323 + ! use video_cards_nouveau; then
324 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
325 + fi
326 + fi
327 +
328 + if ! use gallium; then
329 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
330 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
331 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
332 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
333 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
334 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
335 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
336 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
337 + fi
338 +
339 + if ! use llvm; then
340 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
341 + fi
342 +}
343 +
344 +python_check_deps() {
345 + has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
346 +}
347 +
348 +pkg_setup() {
349 + # warning message for bug 459306
350 + if use llvm && has_version sys-devel/llvm[!debug=]; then
351 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
352 + ewarn "detected! This can cause problems. For details, see bug 459306."
353 + fi
354 +
355 + if use llvm; then
356 + llvm_pkg_setup
357 + fi
358 + python-any-r1_pkg_setup
359 +}
360 +
361 +multilib_src_configure() {
362 + local emesonargs=()
363 +
364 + if use classic; then
365 + # Intel code
366 + dri_driver_enable video_cards_i915 i915
367 + dri_driver_enable video_cards_i965 i965
368 + if ! use video_cards_i915 && \
369 + ! use video_cards_i965; then
370 + dri_driver_enable video_cards_intel i915 i965
371 + fi
372 +
373 + # Nouveau code
374 + dri_driver_enable video_cards_nouveau nouveau
375 +
376 + # ATI code
377 + dri_driver_enable video_cards_r100 r100
378 + dri_driver_enable video_cards_r200 r200
379 + if ! use video_cards_r100 && \
380 + ! use video_cards_r200; then
381 + dri_driver_enable video_cards_radeon r100 r200
382 + fi
383 + fi
384 +
385 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
386 +
387 + if use gallium; then
388 + emesonargs+=(
389 + $(meson_use llvm)
390 + $(meson_use lm_sensors lmsensors)
391 + $(meson_use unwind libunwind)
392 + )
393 +
394 + if use video_cards_r300 ||
395 + use video_cards_r600 ||
396 + use video_cards_radeonsi ||
397 + use video_cards_nouveau ||
398 + use video_cards_vmware; then
399 + emesonargs+=($(meson_use d3d9 gallium-nine))
400 + else
401 + emesonargs+=(-Dgallium-nine=false)
402 + fi
403 +
404 + if use video_cards_r600 ||
405 + use video_cards_radeonsi ||
406 + use video_cards_nouveau; then
407 + emesonargs+=($(meson_use vaapi gallium-va))
408 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
409 + else
410 + emesonargs+=(-Dgallium-va=false)
411 + fi
412 +
413 + if use video_cards_r300 ||
414 + use video_cards_r600 ||
415 + use video_cards_radeonsi ||
416 + use video_cards_nouveau; then
417 + emesonargs+=($(meson_use vdpau gallium-vdpau))
418 + else
419 + emesonargs+=(-Dgallium-vdpau=false)
420 + fi
421 +
422 + if use video_cards_freedreno ||
423 + use video_cards_nouveau ||
424 + use video_cards_vmware; then
425 + emesonargs+=($(meson_use xa gallium-xa))
426 + else
427 + emesonargs+=(-Dgallium-xa=false)
428 + fi
429 +
430 + if use video_cards_r600 ||
431 + use video_cards_nouveau; then
432 + emesonargs+=($(meson_use xvmc gallium-xvmc))
433 + else
434 + emesonargs+=(-Dgallium-xvmc=false)
435 + fi
436 +
437 + gallium_enable video_cards_vc4 vc4
438 + gallium_enable video_cards_vivante etnaviv
439 + gallium_enable video_cards_vmware svga
440 + gallium_enable video_cards_nouveau nouveau
441 + gallium_enable video_cards_imx imx
442 +
443 + # Only one i915 driver (classic vs gallium). Default to classic.
444 + if ! use classic; then
445 + gallium_enable video_cards_i915 i915
446 + if ! use video_cards_i915 && \
447 + ! use video_cards_i965; then
448 + gallium_enable video_cards_intel i915
449 + fi
450 + fi
451 +
452 + gallium_enable video_cards_r300 r300
453 + gallium_enable video_cards_r600 r600
454 + gallium_enable video_cards_radeonsi radeonsi
455 + if ! use video_cards_r300 && \
456 + ! use video_cards_r600; then
457 + gallium_enable video_cards_radeon r300 r600
458 + fi
459 +
460 + gallium_enable video_cards_freedreno freedreno
461 + gallium_enable video_cards_virgl virgl
462 +
463 + # opencl stuff
464 + emesonargs+=(
465 + -Dgallium-opencl="$(usex opencl icd disabled)"
466 + )
467 + fi
468 +
469 + if use vulkan; then
470 + vulkan_enable video_cards_i965 intel
471 + vulkan_enable video_cards_radeonsi amd
472 + fi
473 +
474 + # x86 hardened pax_kernel needs glx-rts, bug 240956
475 + if [[ ${ABI} == x86 ]]; then
476 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
477 + fi
478 +
479 + # Disable glx tls support on musl
480 + if use elibc_musl; then
481 + emesonargs+=( -Dglx-tls=false )
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 selinux)
512 + -Dvalgrind=$(usex valgrind auto false)
513 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
514 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
515 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
516 + --buildtype $(usex debug debug plain)
517 + -Db_ndebug=$(usex debug false true)
518 + )
519 + meson_src_configure
520 +}
521 +
522 +multilib_src_compile() {
523 + meson_src_compile
524 +}
525 +
526 +multilib_src_install() {
527 + meson_src_install
528 +}
529 +
530 +multilib_src_install_all() {
531 + einstalldocs
532 +}
533 +
534 +multilib_src_test() {
535 + meson_src_test
536 +}
537 +
538 +pkg_postinst() {
539 + # Switch to the xorg implementation.
540 + echo
541 + eselect opengl set --use-old ${OPENGL_DIR}
542 +}
543 +
544 +# $1 - VIDEO_CARDS flag (check skipped for "--")
545 +# other args - names of DRI drivers to enable
546 +dri_driver_enable() {
547 + if [[ $1 == -- ]] || use $1; then
548 + shift
549 + DRI_DRIVERS+=("$@")
550 + fi
551 +}
552 +
553 +gallium_enable() {
554 + if [[ $1 == -- ]] || use $1; then
555 + shift
556 + GALLIUM_DRIVERS+=("$@")
557 + fi
558 +}
559 +
560 +vulkan_enable() {
561 + if [[ $1 == -- ]] || use $1; then
562 + shift
563 + VULKAN_DRIVERS+=("$@")
564 + fi
565 +}