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, 25 Jun 2019 14:39:59
Message-Id: 1561473585.05d0bce3610a6e7aeadf0fa9ebe9286de4acd710.mattst88@gentoo
1 commit: 05d0bce3610a6e7aeadf0fa9ebe9286de4acd710
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 25 14:38:12 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 25 14:39:45 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05d0bce3
7
8 media-libs/mesa: Version bump to 19.1.1
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.1.ebuild | 540 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 541 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 0586b008171..1c34728bb32 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -2,3 +2,4 @@ DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d0
21 DIST mesa-19.0.6.tar.xz 11971284 BLAKE2B 264b3afe0701f288c5ba3f28f902e55f2c4888f79854b12b57faf29a27ed9141c6967cc6807a739604641a8fcfb5feb5315ba7f9ba85d3a3ea80cc2115ee7394 SHA512 320fd6b12ccd5e4a40dfc93546354848a38da09d90e4d5a1dae5d100b8106942acfc25ac3f705a2d3ab3b355162c74c7dfadbdb99a46cf2e5e0761f8542bfeb1
22 DIST mesa-19.0.7.tar.xz 11968692 BLAKE2B 592800fc04544a0d93da229b70ca5640913bbd3a24ef9ce2666a511d0f890b8b7a02b588547c49cdaa6b53c184cea340eb53052482482478e8324f46a9ead0e4 SHA512 eda02c426ad642c1f783aa376533c4f93354e819f99fd0187a88be2afd109effc9365e8d5ffd676202b006399674572d26b806da7f4c96adb8111243330cd121
23 DIST mesa-19.1.0.tar.xz 10926676 BLAKE2B 87d21c2b79e6af7c020ca87d9ece79586d9a86ad4ce79df975b8bab4671d8d4f84b32e5146badeb337713ca6996338740b4d8f77ab4851f7b624fecc495c220e SHA512 25b186ae8037dedea5691e0b77b22f2065f3c877838378651726dfa1b34ef49dcc56f1dbd124e99285e5f14489db936a886a6740495b5b279e8363424bfb3433
24 +DIST mesa-19.1.1.tar.xz 10927620 BLAKE2B 503d7fb37144868c4e71e22fd310b7049265a6babf3b7ccd4f8d5a4db6a3b2e309e9e20006c913e02a0015750eaa9ca303165818b0b3542cdaa59e016817149c SHA512 73b190eeb0b5809217c04f39d90edc0844dac476d8284543013a4a8889a4be805bc15b43c91bbf0d3a36f35dc576e7085255f7012d207c74466e81cee7f67922
25
26 diff --git a/media-libs/mesa/mesa-19.1.1.ebuild b/media-libs/mesa/mesa-19.1.1.ebuild
27 new file mode 100644
28 index 00000000000..d1efde2b6aa
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-19.1.1.ebuild
31 @@ -0,0 +1,540 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
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 + valgrind? ( dev-util/valgrind )
244 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
245 + x11-base/xorg-proto
246 +"
247 +BDEPEND="
248 + ${PYTHON_DEPS}
249 + opencl? (
250 + >=sys-devel/gcc-4.6
251 + )
252 + sys-devel/bison
253 + sys-devel/flex
254 + sys-devel/gettext
255 + virtual/pkgconfig
256 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
257 +"
258 +
259 +S="${WORKDIR}/${MY_P}"
260 +EGIT_CHECKOUT_DIR=${S}
261 +
262 +QA_WX_LOAD="
263 +x86? (
264 + !pic? (
265 + usr/lib*/libglapi.so.0.0.0
266 + usr/lib*/libGLESv1_CM.so.1.0.0
267 + usr/lib*/libGLESv2.so.2.0.0
268 + usr/lib*/libGL.so.1.2.0
269 + usr/lib*/libOSMesa.so.8.0.0
270 + )
271 +)"
272 +
273 +llvm_check_deps() {
274 + local flags=${MULTILIB_USEDEP}
275 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
276 + then
277 + flags+=",llvm_targets_AMDGPU(-)"
278 + fi
279 +
280 + if use opencl; then
281 + has_version "sys-devel/clang[${flags}]" || return 1
282 + fi
283 + has_version "sys-devel/llvm[${flags}]"
284 +}
285 +
286 +pkg_pretend() {
287 + if use opencl; then
288 + if ! use video_cards_r600 &&
289 + ! use video_cards_radeonsi; then
290 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
291 + fi
292 + fi
293 +
294 + if use vaapi; then
295 + if ! use video_cards_r600 &&
296 + ! use video_cards_radeonsi &&
297 + ! use video_cards_nouveau; then
298 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
299 + fi
300 + fi
301 +
302 + if use vdpau; then
303 + if ! use video_cards_r300 &&
304 + ! use video_cards_r600 &&
305 + ! use video_cards_radeonsi &&
306 + ! use video_cards_nouveau; then
307 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
308 + fi
309 + fi
310 +
311 + if use xa; then
312 + if ! use video_cards_freedreno &&
313 + ! use video_cards_nouveau &&
314 + ! use video_cards_vmware; then
315 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
316 + fi
317 + fi
318 +
319 + if use xvmc; then
320 + if ! use video_cards_r600 &&
321 + ! use video_cards_nouveau; then
322 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
323 + fi
324 + fi
325 +
326 + if ! use gallium; then
327 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
328 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
329 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
330 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
331 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
332 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
333 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
334 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
335 + fi
336 +
337 + if ! use llvm; then
338 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
339 + fi
340 +}
341 +
342 +python_check_deps() {
343 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
344 +}
345 +
346 +pkg_setup() {
347 + # warning message for bug 459306
348 + if use llvm && has_version sys-devel/llvm[!debug=]; then
349 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
350 + ewarn "detected! This can cause problems. For details, see bug 459306."
351 + fi
352 +
353 + if use llvm; then
354 + llvm_pkg_setup
355 + fi
356 + python-any-r1_pkg_setup
357 +}
358 +
359 +multilib_src_configure() {
360 + local emesonargs=()
361 +
362 + if use classic; then
363 + # Intel code
364 + dri_driver_enable video_cards_i915 i915
365 + dri_driver_enable video_cards_i965 i965
366 + if ! use video_cards_i915 && \
367 + ! use video_cards_i965; then
368 + dri_driver_enable video_cards_intel i915 i965
369 + fi
370 +
371 + # Nouveau code
372 + dri_driver_enable video_cards_nouveau nouveau
373 +
374 + # ATI code
375 + dri_driver_enable video_cards_r100 r100
376 + dri_driver_enable video_cards_r200 r200
377 + if ! use video_cards_r100 && \
378 + ! use video_cards_r200; then
379 + dri_driver_enable video_cards_radeon r100 r200
380 + fi
381 + fi
382 +
383 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
384 +
385 + if use gallium; then
386 + emesonargs+=(
387 + $(meson_use llvm)
388 + $(meson_use lm_sensors lmsensors)
389 + $(meson_use unwind libunwind)
390 + )
391 +
392 + if use video_cards_iris ||
393 + use video_cards_r300 ||
394 + use video_cards_r600 ||
395 + use video_cards_radeonsi ||
396 + use video_cards_nouveau ||
397 + use video_cards_vmware; then
398 + emesonargs+=($(meson_use d3d9 gallium-nine))
399 + else
400 + emesonargs+=(-Dgallium-nine=false)
401 + fi
402 +
403 + if use video_cards_r600 ||
404 + use video_cards_radeonsi ||
405 + use video_cards_nouveau; then
406 + emesonargs+=($(meson_use vaapi gallium-va))
407 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
408 + else
409 + emesonargs+=(-Dgallium-va=false)
410 + fi
411 +
412 + if use video_cards_r300 ||
413 + use video_cards_r600 ||
414 + use video_cards_radeonsi ||
415 + use video_cards_nouveau; then
416 + emesonargs+=($(meson_use vdpau gallium-vdpau))
417 + else
418 + emesonargs+=(-Dgallium-vdpau=false)
419 + fi
420 +
421 + if use video_cards_freedreno ||
422 + use video_cards_nouveau ||
423 + use video_cards_vmware; then
424 + emesonargs+=($(meson_use xa gallium-xa))
425 + else
426 + emesonargs+=(-Dgallium-xa=false)
427 + fi
428 +
429 + if use video_cards_r600 ||
430 + use video_cards_nouveau; then
431 + emesonargs+=($(meson_use xvmc gallium-xvmc))
432 + else
433 + emesonargs+=(-Dgallium-xvmc=false)
434 + fi
435 +
436 + if use video_cards_freedreno ||
437 + use video_cards_vc4 ||
438 + use video_cards_vivante; then
439 + gallium_enable -- kmsro
440 + fi
441 +
442 + gallium_enable video_cards_vc4 vc4
443 + gallium_enable video_cards_vivante etnaviv
444 + gallium_enable video_cards_vmware svga
445 + gallium_enable video_cards_nouveau nouveau
446 +
447 + # Only one i915 driver (classic vs gallium). Default to classic.
448 + if ! use classic; then
449 + gallium_enable video_cards_i915 i915
450 + if ! use video_cards_i915 && \
451 + ! use video_cards_i965; then
452 + gallium_enable video_cards_intel i915
453 + fi
454 + fi
455 +
456 + gallium_enable video_cards_iris iris
457 +
458 + gallium_enable video_cards_r300 r300
459 + gallium_enable video_cards_r600 r600
460 + gallium_enable video_cards_radeonsi radeonsi
461 + if ! use video_cards_r300 && \
462 + ! use video_cards_r600; then
463 + gallium_enable video_cards_radeon r300 r600
464 + fi
465 +
466 + gallium_enable video_cards_freedreno freedreno
467 + gallium_enable video_cards_virgl virgl
468 +
469 + # opencl stuff
470 + emesonargs+=(
471 + -Dgallium-opencl="$(usex opencl icd disabled)"
472 + )
473 + fi
474 +
475 + if use vulkan; then
476 + vulkan_enable video_cards_i965 intel
477 + vulkan_enable video_cards_iris intel
478 + vulkan_enable video_cards_radeonsi amd
479 + fi
480 +
481 + # x86 hardened pax_kernel needs glx-rts, bug 240956
482 + if [[ ${ABI} == x86 ]]; then
483 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
484 + fi
485 +
486 + # on abi_x86_32 hardened we need to have asm disable
487 + if [[ ${ABI} == x86* ]] && use pic; then
488 + emesonargs+=( -Dasm=false )
489 + fi
490 +
491 + if use gallium; then
492 + gallium_enable -- swrast
493 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
494 + else
495 + dri_driver_enable -- swrast
496 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
497 + fi
498 +
499 + driver_list() {
500 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
501 + echo "${drivers//$'\n'/,}"
502 + }
503 +
504 + emesonargs+=(
505 + $(meson_use test build-tests)
506 + -Dglx=dri
507 + -Dshared-glapi=true
508 + $(meson_use dri3)
509 + $(meson_use egl)
510 + $(meson_use gbm)
511 + $(meson_use gles1)
512 + $(meson_use gles2)
513 + $(meson_use libglvnd glvnd)
514 + $(meson_use selinux)
515 + -Dvalgrind=$(usex valgrind auto false)
516 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
517 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
518 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
519 + $(meson_use vulkan-overlay vulkan-overlay-layer)
520 + --buildtype $(usex debug debug plain)
521 + -Db_ndebug=$(usex debug false true)
522 + )
523 + meson_src_configure
524 +}
525 +
526 +multilib_src_compile() {
527 + meson_src_compile
528 +}
529 +
530 +multilib_src_install() {
531 + meson_src_install
532 +
533 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so*
534 +}
535 +
536 +multilib_src_install_all() {
537 + einstalldocs
538 +}
539 +
540 +multilib_src_test() {
541 + meson test -v -C "${BUILD_DIR}" -t 100
542 +}
543 +
544 +pkg_postinst() {
545 + # Switch to the xorg implementation.
546 + echo
547 + eselect opengl set --use-old ${OPENGL_DIR}
548 +}
549 +
550 +# $1 - VIDEO_CARDS flag (check skipped for "--")
551 +# other args - names of DRI drivers to enable
552 +dri_driver_enable() {
553 + if [[ $1 == -- ]] || use $1; then
554 + shift
555 + DRI_DRIVERS+=("$@")
556 + fi
557 +}
558 +
559 +gallium_enable() {
560 + if [[ $1 == -- ]] || use $1; then
561 + shift
562 + GALLIUM_DRIVERS+=("$@")
563 + fi
564 +}
565 +
566 +vulkan_enable() {
567 + if [[ $1 == -- ]] || use $1; then
568 + shift
569 + VULKAN_DRIVERS+=("$@")
570 + fi
571 +}