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, 06 Aug 2020 06:39:53
Message-Id: 1596695977.ed8440e0bc91e9b2c7e62704c29717ecd47b6b71.mattst88@gentoo
1 commit: ed8440e0bc91e9b2c7e62704c29717ecd47b6b71
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 6 06:37:08 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 6 06:39:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed8440e0
7
8 media-libs/mesa: Version bump to 20.1.5
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-20.1.5.ebuild | 557 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 558 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 18e393957ee..c33d10e2db8 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,2 +1,3 @@
21 DIST mesa-20.0.8.tar.xz 12360736 BLAKE2B 19e3f8a40b34b5f17ed76077c5d92f728a134b2479c43d86674ed1818ab99639a9b732041f67488251df808564f6abe5b587d756ef9c7c13dcada87cd0fc05de SHA512 d906330c412899907dd05a84034a929107fccaf3044814c4b1f30ba5690cbcf1587b5f17534c6345111f3cb7cf292afd5984a60486643ff6f534b57cec615374
22 DIST mesa-20.1.4.tar.xz 12758452 BLAKE2B 2f4e4563382a455f7fd6ac0bb32c91901c4ca4fa297da7769b40722713316ba9a6b8acc7bd5ae9df46b9ffea6bee13cdf2a8dd4fe747ac61dc052391aeae18d9 SHA512 f4d79694cda8531e7560147caf5d18bce5c685cd6c61264dced5adaa9043be9c83d3a2bd623ebffedc8d4258b9b1f97d84d9aeea307aa77cf99d0bc47c987155
23 +DIST mesa-20.1.5.tar.xz 12783368 BLAKE2B f452832b3ed3468d01b7129cd782f3b58752a6de511679c9bd7eca7a5728630202a185e61f435c172f84d4ef6ffd05bbf7873e5f8c4cc64572d3b5a38e5ebf28 SHA512 47796bf2cccfd054ff25f571747754e0ab9b42fe87644ea320b3d9497d63b3013e9b7e59ea0516bbd1a38b5594e0d185bf5a36230ea5c5974e7ff889cee2601e
24
25 diff --git a/media-libs/mesa/mesa-20.1.5.ebuild b/media-libs/mesa/mesa-20.1.5.ebuild
26 new file mode 100644
27 index 00000000000..f50ead67947
28 --- /dev/null
29 +++ b/media-libs/mesa/mesa-20.1.5.ebuild
30 @@ -0,0 +1,557 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{6,7,8} )
37 +
38 +inherit llvm meson multilib-minimal python-any-r1 linux-info
39 +
40 +OPENGL_DIR="xorg-x11"
41 +
42 +MY_P="${P/_/-}"
43 +
44 +DESCRIPTION="OpenGL-like graphic library for Linux"
45 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
46 +
47 +if [[ ${PV} == 9999 ]]; then
48 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
49 + inherit git-r3
50 +else
51 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
52 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
53 +fi
54 +
55 +LICENSE="MIT"
56 +SLOT="0"
57 +RESTRICT="
58 + !test? ( test )
59 +"
60 +
61 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
62 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware"
63 +for card in ${VIDEO_CARDS}; do
64 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
65 +done
66 +
67 +IUSE="${IUSE_VIDEO_CARDS}
68 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
69 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
70 + vulkan-overlay wayland +X xa xvmc +zstd"
71 +
72 +REQUIRED_USE="
73 + d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
74 + gles1? ( egl )
75 + gles2? ( egl )
76 + vulkan? ( dri3
77 + video_cards_radeonsi? ( llvm ) )
78 + vulkan-overlay? ( vulkan )
79 + wayland? ( egl gbm )
80 + video_cards_freedreno? ( gallium )
81 + video_cards_intel? ( classic )
82 + video_cards_i915? ( || ( classic gallium ) )
83 + video_cards_i965? ( classic )
84 + video_cards_iris? ( gallium )
85 + video_cards_lima? ( gallium )
86 + video_cards_nouveau? ( || ( classic gallium ) )
87 + video_cards_panfrost? ( gallium )
88 + video_cards_radeon? ( || ( classic gallium )
89 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
90 + video_cards_r100? ( classic )
91 + video_cards_r200? ( classic )
92 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
93 + video_cards_r600? ( gallium )
94 + video_cards_radeonsi? ( gallium llvm )
95 + video_cards_vc4? ( gallium )
96 + video_cards_virgl? ( gallium )
97 + video_cards_vivante? ( gallium gbm )
98 + video_cards_vmware? ( gallium )
99 + xa? ( X )
100 + xvmc? ( X )
101 +"
102 +
103 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
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 + libglvnd? (
109 + >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
110 + !app-eselect/eselect-opengl
111 + )
112 + !libglvnd? (
113 + >=app-eselect/eselect-opengl-1.3.0
114 + )
115 + gallium? (
116 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
117 + llvm? (
118 + video_cards_radeonsi? (
119 + virtual/libelf:0=[${MULTILIB_USEDEP}]
120 + )
121 + video_cards_r600? (
122 + virtual/libelf:0=[${MULTILIB_USEDEP}]
123 + )
124 + video_cards_radeon? (
125 + virtual/libelf:0=[${MULTILIB_USEDEP}]
126 + )
127 + )
128 + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
129 + opencl? (
130 + >=virtual/opencl-3[${MULTILIB_USEDEP}]
131 + dev-libs/libclc
132 + virtual/libelf:0=[${MULTILIB_USEDEP}]
133 + )
134 + vaapi? (
135 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
136 + )
137 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
138 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
139 + )
140 + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
141 + wayland? (
142 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
143 + >=dev-libs/wayland-protocols-1.8
144 + )
145 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
146 + video_cards_intel? (
147 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
148 + )
149 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
150 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
151 + X? (
152 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
153 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
154 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
155 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
156 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
157 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
158 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
159 + )
160 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
161 +"
162 +for card in ${RADEON_CARDS}; do
163 + RDEPEND="${RDEPEND}
164 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
165 + "
166 +done
167 +RDEPEND="${RDEPEND}
168 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
169 +"
170 +
171 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
172 +# we need to *really* make sure we're not pulling one than more slot
173 +# simultaneously.
174 +#
175 +# How to use it:
176 +# 1. List all the working slots (with min versions) in ||, newest first.
177 +# 2. Update the := to specify *max* version, e.g. < 10.
178 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
179 +LLVM_MAX_SLOT="10"
180 +LLVM_DEPSTR="
181 + || (
182 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
183 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
184 + )
185 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
186 +"
187 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
188 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
189 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
190 +RDEPEND="${RDEPEND}
191 + gallium? (
192 + llvm? (
193 + opencl? (
194 + video_cards_r600? (
195 + ${CLANG_DEPSTR_AMDGPU}
196 + )
197 + !video_cards_r600? (
198 + video_cards_radeonsi? (
199 + ${CLANG_DEPSTR_AMDGPU}
200 + )
201 + )
202 + !video_cards_r600? (
203 + !video_cards_radeonsi? (
204 + video_cards_radeon? (
205 + ${CLANG_DEPSTR_AMDGPU}
206 + )
207 + )
208 + )
209 + !video_cards_r600? (
210 + !video_cards_radeon? (
211 + !video_cards_radeonsi? (
212 + ${CLANG_DEPSTR}
213 + )
214 + )
215 + )
216 + )
217 + !opencl? (
218 + video_cards_r600? (
219 + ${LLVM_DEPSTR_AMDGPU}
220 + )
221 + !video_cards_r600? (
222 + video_cards_radeonsi? (
223 + ${LLVM_DEPSTR_AMDGPU}
224 + )
225 + )
226 + !video_cards_r600? (
227 + !video_cards_radeonsi? (
228 + video_cards_radeon? (
229 + ${LLVM_DEPSTR_AMDGPU}
230 + )
231 + )
232 + )
233 + !video_cards_r600? (
234 + !video_cards_radeon? (
235 + !video_cards_radeonsi? (
236 + ${LLVM_DEPSTR}
237 + )
238 + )
239 + )
240 + )
241 + )
242 + )
243 +"
244 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
245 +
246 +DEPEND="${RDEPEND}
247 + valgrind? ( dev-util/valgrind )
248 + X? (
249 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
250 + x11-base/xorg-proto
251 + )
252 +"
253 +BDEPEND="
254 + ${PYTHON_DEPS}
255 + opencl? (
256 + >=sys-devel/gcc-4.6
257 + )
258 + sys-devel/bison
259 + sys-devel/flex
260 + sys-devel/gettext
261 + virtual/pkgconfig
262 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
263 +"
264 +
265 +S="${WORKDIR}/${MY_P}"
266 +EGIT_CHECKOUT_DIR=${S}
267 +
268 +QA_WX_LOAD="
269 +x86? (
270 + usr/lib*/libglapi.so.0.0.0
271 + usr/lib*/libGLESv1_CM.so.1.1.0
272 + usr/lib*/libGLESv2.so.2.0.0
273 + usr/lib*/libGL.so.1.2.0
274 + usr/lib*/libOSMesa.so.8.0.0
275 + libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
276 +)"
277 +
278 +llvm_check_deps() {
279 + local flags=${MULTILIB_USEDEP}
280 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
281 + then
282 + flags+=",llvm_targets_AMDGPU(-)"
283 + fi
284 +
285 + if use opencl; then
286 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
287 + fi
288 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
289 +}
290 +
291 +pkg_pretend() {
292 + if use vulkan; then
293 + if ! use video_cards_i965 &&
294 + ! use video_cards_iris &&
295 + ! use video_cards_radeonsi; then
296 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
297 + fi
298 + fi
299 +
300 + if use opencl; then
301 + if ! use video_cards_r600 &&
302 + ! use video_cards_radeonsi; then
303 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
304 + fi
305 + fi
306 +
307 + if use vaapi; then
308 + if ! use video_cards_r600 &&
309 + ! use video_cards_radeonsi &&
310 + ! use video_cards_nouveau; then
311 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
312 + fi
313 + fi
314 +
315 + if use vdpau; then
316 + if ! use video_cards_r300 &&
317 + ! use video_cards_r600 &&
318 + ! use video_cards_radeonsi &&
319 + ! use video_cards_nouveau; then
320 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
321 + fi
322 + fi
323 +
324 + if use xa; then
325 + if ! use video_cards_freedreno &&
326 + ! use video_cards_nouveau &&
327 + ! use video_cards_vmware; then
328 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
329 + fi
330 + fi
331 +
332 + if use xvmc; then
333 + if ! use video_cards_r600 &&
334 + ! use video_cards_nouveau; then
335 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
336 + fi
337 + fi
338 +
339 + if ! use gallium; then
340 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
341 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
342 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
343 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
344 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
345 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
346 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
347 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
348 + fi
349 +
350 + if ! use llvm; then
351 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
352 + fi
353 +}
354 +
355 +python_check_deps() {
356 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
357 +}
358 +
359 +pkg_setup() {
360 + # warning message for bug 459306
361 + if use llvm && has_version sys-devel/llvm[!debug=]; then
362 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
363 + ewarn "detected! This can cause problems. For details, see bug 459306."
364 + fi
365 +
366 + if use video_cards_i965 ||
367 + use video_cards_iris ||
368 + use video_cards_radeonsi; then
369 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
370 + linux-info_pkg_setup
371 + fi
372 +
373 + if use gallium && use llvm; then
374 + llvm_pkg_setup
375 + fi
376 + python-any-r1_pkg_setup
377 +}
378 +
379 +multilib_src_configure() {
380 + local emesonargs=()
381 +
382 + if use classic; then
383 + # Intel code
384 + dri_driver_enable video_cards_i915 i915
385 + dri_driver_enable video_cards_i965 i965
386 + if ! use video_cards_i915 && \
387 + ! use video_cards_i965; then
388 + dri_driver_enable video_cards_intel i915 i965
389 + fi
390 +
391 + # Nouveau code
392 + dri_driver_enable video_cards_nouveau nouveau
393 +
394 + # ATI code
395 + dri_driver_enable video_cards_r100 r100
396 + dri_driver_enable video_cards_r200 r200
397 + if ! use video_cards_r100 && \
398 + ! use video_cards_r200; then
399 + dri_driver_enable video_cards_radeon r100 r200
400 + fi
401 + fi
402 +
403 + emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
404 +
405 + if use gallium; then
406 + emesonargs+=(
407 + $(meson_use llvm)
408 + $(meson_use lm-sensors lmsensors)
409 + $(meson_use unwind libunwind)
410 + )
411 +
412 + if use video_cards_iris ||
413 + use video_cards_r300 ||
414 + use video_cards_r600 ||
415 + use video_cards_radeonsi ||
416 + use video_cards_nouveau ||
417 + use video_cards_vmware; then
418 + emesonargs+=($(meson_use d3d9 gallium-nine))
419 + else
420 + emesonargs+=(-Dgallium-nine=false)
421 + fi
422 +
423 + if use video_cards_r600 ||
424 + use video_cards_radeonsi ||
425 + use video_cards_nouveau; then
426 + emesonargs+=($(meson_use vaapi gallium-va))
427 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
428 + else
429 + emesonargs+=(-Dgallium-va=false)
430 + fi
431 +
432 + if use video_cards_r300 ||
433 + use video_cards_r600 ||
434 + use video_cards_radeonsi ||
435 + use video_cards_nouveau; then
436 + emesonargs+=($(meson_use vdpau gallium-vdpau))
437 + else
438 + emesonargs+=(-Dgallium-vdpau=false)
439 + fi
440 +
441 + if use video_cards_freedreno ||
442 + use video_cards_nouveau ||
443 + use video_cards_vmware; then
444 + emesonargs+=($(meson_use xa gallium-xa))
445 + else
446 + emesonargs+=(-Dgallium-xa=false)
447 + fi
448 +
449 + if use video_cards_r600 ||
450 + use video_cards_nouveau; then
451 + emesonargs+=($(meson_use xvmc gallium-xvmc))
452 + else
453 + emesonargs+=(-Dgallium-xvmc=false)
454 + fi
455 +
456 + if use video_cards_freedreno ||
457 + use video_cards_lima ||
458 + use video_cards_panfrost ||
459 + use video_cards_vc4 ||
460 + use video_cards_vivante; then
461 + gallium_enable -- kmsro
462 + fi
463 +
464 + gallium_enable video_cards_lima lima
465 + gallium_enable video_cards_panfrost panfrost
466 + gallium_enable video_cards_vc4 vc4
467 + gallium_enable video_cards_vivante etnaviv
468 + gallium_enable video_cards_vmware svga
469 + gallium_enable video_cards_nouveau nouveau
470 +
471 + # Only one i915 driver (classic vs gallium). Default to classic.
472 + if ! use classic; then
473 + gallium_enable video_cards_i915 i915
474 + if ! use video_cards_i915 && \
475 + ! use video_cards_i965; then
476 + gallium_enable video_cards_intel i915
477 + fi
478 + fi
479 +
480 + gallium_enable video_cards_iris iris
481 +
482 + gallium_enable video_cards_r300 r300
483 + gallium_enable video_cards_r600 r600
484 + gallium_enable video_cards_radeonsi radeonsi
485 + if ! use video_cards_r300 && \
486 + ! use video_cards_r600; then
487 + gallium_enable video_cards_radeon r300 r600
488 + fi
489 +
490 + gallium_enable video_cards_freedreno freedreno
491 + gallium_enable video_cards_virgl virgl
492 +
493 + # opencl stuff
494 + emesonargs+=(
495 + -Dgallium-opencl="$(usex opencl icd disabled)"
496 + )
497 + fi
498 +
499 + if use vulkan; then
500 + vulkan_enable video_cards_i965 intel
501 + vulkan_enable video_cards_iris intel
502 + vulkan_enable video_cards_radeonsi amd
503 + fi
504 +
505 + if use gallium; then
506 + gallium_enable -- swrast
507 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
508 + else
509 + dri_driver_enable -- swrast
510 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
511 + fi
512 +
513 + driver_list() {
514 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
515 + echo "${drivers//$'\n'/,}"
516 + }
517 +
518 + emesonargs+=(
519 + $(meson_use test build-tests)
520 + -Dglx=$(usex X dri disabled)
521 + -Dshared-glapi=true
522 + $(meson_use dri3)
523 + $(meson_use egl)
524 + $(meson_use gbm)
525 + $(meson_use gles1)
526 + $(meson_use gles2)
527 + $(meson_use libglvnd glvnd)
528 + $(meson_use selinux)
529 + $(meson_use zstd)
530 + -Dvalgrind=$(usex valgrind auto false)
531 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
532 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
533 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
534 + $(meson_use vulkan vulkan-device-select-layer)
535 + $(meson_use vulkan-overlay vulkan-overlay-layer)
536 + --buildtype $(usex debug debug plain)
537 + -Db_ndebug=$(usex debug false true)
538 + )
539 + meson_src_configure
540 +}
541 +
542 +multilib_src_compile() {
543 + meson_src_compile
544 +}
545 +
546 +multilib_src_install() {
547 + meson_src_install
548 +}
549 +
550 +multilib_src_install_all() {
551 + einstalldocs
552 +}
553 +
554 +multilib_src_test() {
555 + meson test -v -C "${BUILD_DIR}" -t 100
556 +}
557 +
558 +pkg_postinst() {
559 + if ! use libglvnd; then
560 + # Switch to the xorg implementation.
561 + echo
562 + eselect opengl set --use-old ${OPENGL_DIR}
563 + fi
564 +}
565 +
566 +# $1 - VIDEO_CARDS flag (check skipped for "--")
567 +# other args - names of DRI drivers to enable
568 +dri_driver_enable() {
569 + if [[ $1 == -- ]] || use $1; then
570 + shift
571 + DRI_DRIVERS+=("$@")
572 + fi
573 +}
574 +
575 +gallium_enable() {
576 + if [[ $1 == -- ]] || use $1; then
577 + shift
578 + GALLIUM_DRIVERS+=("$@")
579 + fi
580 +}
581 +
582 +vulkan_enable() {
583 + if [[ $1 == -- ]] || use $1; then
584 + shift
585 + VULKAN_DRIVERS+=("$@")
586 + fi
587 +}