Gentoo Archives: gentoo-commits

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