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