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: Wed, 26 Jun 2019 04:52:58
Message-Id: 1561524759.9cb98b471103056538a82e9a0b69d452c6385b6a.anarchy@gentoo
1 commit: 9cb98b471103056538a82e9a0b69d452c6385b6a
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 26 04:52:39 2019 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 26 04:52:39 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=9cb98b47
7
8 media-libs/mesa: Version Bump 19.1.1
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.16
11 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
12
13 media-libs/mesa/Manifest | 1 +
14 media-libs/mesa/mesa-19.1.1.ebuild | 547 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 548 insertions(+)
16
17 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
18 index 13c85f4..6f98f60 100644
19 --- a/media-libs/mesa/Manifest
20 +++ b/media-libs/mesa/Manifest
21 @@ -5,3 +5,4 @@ DIST mesa-18.3.5.tar.xz 11882012 BLAKE2B 88279fe2f24c2a47c8857ad34382b7c8b641196
22 DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d08f66f2731fe60eff21edfa822b6d7a293fbf9e426acddbb58445b9b0e3c0b1bc8ae05e8b19e802872571449c2 SHA512 3a6dcaba99185e28d162b130bbd760fe87e6072065958189b28f41ea287ef041397897e098d93218a64802cf11c73806f7400a866bd8e5ed69694fa15c147487
23 DIST mesa-19.0.3.tar.xz 11963844 BLAKE2B 7d8bae717c0a2a6143d3aee35852145a2032d40ad7f4edcd76eec46392f3917787592d13f9695de54a15ea5bcb3dec3181c418ddfb5b69a3e1b52fb796f04eab SHA512 aa170577252aa4157e4bd49076bbf6207e4aada9fc9f23b255de332e816f9c63e5661f752f2f276dd43e232a8926866004e2a2ff9ad4b411330969c2a9a7ffa0
24 DIST mesa-19.1.0.tar.xz 10926676 BLAKE2B 87d21c2b79e6af7c020ca87d9ece79586d9a86ad4ce79df975b8bab4671d8d4f84b32e5146badeb337713ca6996338740b4d8f77ab4851f7b624fecc495c220e SHA512 25b186ae8037dedea5691e0b77b22f2065f3c877838378651726dfa1b34ef49dcc56f1dbd124e99285e5f14489db936a886a6740495b5b279e8363424bfb3433
25 +DIST mesa-19.1.1.tar.xz 10927620 BLAKE2B 503d7fb37144868c4e71e22fd310b7049265a6babf3b7ccd4f8d5a4db6a3b2e309e9e20006c913e02a0015750eaa9ca303165818b0b3542cdaa59e016817149c SHA512 73b190eeb0b5809217c04f39d90edc0844dac476d8284543013a4a8889a4be805bc15b43c91bbf0d3a36f35dc576e7085255f7012d207c74466e81cee7f67922
26
27 diff --git a/media-libs/mesa/mesa-19.1.1.ebuild b/media-libs/mesa/mesa-19.1.1.ebuild
28 new file mode 100644
29 index 0000000..b492bda
30 --- /dev/null
31 +++ b/media-libs/mesa/mesa-19.1.1.ebuild
32 @@ -0,0 +1,547 @@
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 +PATCHES=(
275 + "${FILESDIR}"/${PN}-19.1.0-execinfo.patch
276 + "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
277 + "${FILESDIR}"/${PN}-18-musl-pthread.patch
278 + "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
279 +)
280 +
281 +llvm_check_deps() {
282 + local flags=${MULTILIB_USEDEP}
283 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
284 + then
285 + flags+=",llvm_targets_AMDGPU(-)"
286 + fi
287 +
288 + if use opencl; then
289 + has_version "sys-devel/clang[${flags}]" || return 1
290 + fi
291 + has_version "sys-devel/llvm[${flags}]"
292 +}
293 +
294 +pkg_pretend() {
295 + if use opencl; then
296 + if ! use video_cards_r600 &&
297 + ! use video_cards_radeonsi; then
298 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
299 + fi
300 + fi
301 +
302 + if use vaapi; then
303 + if ! use video_cards_r600 &&
304 + ! use video_cards_radeonsi &&
305 + ! use video_cards_nouveau; then
306 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
307 + fi
308 + fi
309 +
310 + if use vdpau; then
311 + if ! use video_cards_r300 &&
312 + ! use video_cards_r600 &&
313 + ! use video_cards_radeonsi &&
314 + ! use video_cards_nouveau; then
315 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
316 + fi
317 + fi
318 +
319 + if use xa; then
320 + if ! use video_cards_freedreno &&
321 + ! use video_cards_nouveau &&
322 + ! use video_cards_vmware; then
323 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
324 + fi
325 + fi
326 +
327 + if use xvmc; then
328 + if ! use video_cards_r600 &&
329 + ! use video_cards_nouveau; then
330 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
331 + fi
332 + fi
333 +
334 + if ! use gallium; then
335 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
336 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
337 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
338 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
339 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
340 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
341 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
342 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
343 + fi
344 +
345 + if ! use llvm; then
346 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
347 + fi
348 +}
349 +
350 +python_check_deps() {
351 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
352 +}
353 +
354 +pkg_setup() {
355 + # warning message for bug 459306
356 + if use llvm && has_version sys-devel/llvm[!debug=]; then
357 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
358 + ewarn "detected! This can cause problems. For details, see bug 459306."
359 + fi
360 +
361 + if use llvm; then
362 + llvm_pkg_setup
363 + fi
364 + python-any-r1_pkg_setup
365 +}
366 +
367 +multilib_src_configure() {
368 + local emesonargs=()
369 +
370 + if use classic; then
371 + # Intel code
372 + dri_driver_enable video_cards_i915 i915
373 + dri_driver_enable video_cards_i965 i965
374 + if ! use video_cards_i915 && \
375 + ! use video_cards_i965; then
376 + dri_driver_enable video_cards_intel i915 i965
377 + fi
378 +
379 + # Nouveau code
380 + dri_driver_enable video_cards_nouveau nouveau
381 +
382 + # ATI code
383 + dri_driver_enable video_cards_r100 r100
384 + dri_driver_enable video_cards_r200 r200
385 + if ! use video_cards_r100 && \
386 + ! use video_cards_r200; then
387 + dri_driver_enable video_cards_radeon r100 r200
388 + fi
389 + fi
390 +
391 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
392 +
393 + if use gallium; then
394 + emesonargs+=(
395 + $(meson_use llvm)
396 + $(meson_use lm_sensors lmsensors)
397 + $(meson_use unwind libunwind)
398 + )
399 +
400 + if use video_cards_iris ||
401 + use video_cards_r300 ||
402 + use video_cards_r600 ||
403 + use video_cards_radeonsi ||
404 + use video_cards_nouveau ||
405 + use video_cards_vmware; then
406 + emesonargs+=($(meson_use d3d9 gallium-nine))
407 + else
408 + emesonargs+=(-Dgallium-nine=false)
409 + fi
410 +
411 + if use video_cards_r600 ||
412 + use video_cards_radeonsi ||
413 + use video_cards_nouveau; then
414 + emesonargs+=($(meson_use vaapi gallium-va))
415 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
416 + else
417 + emesonargs+=(-Dgallium-va=false)
418 + fi
419 +
420 + if use video_cards_r300 ||
421 + use video_cards_r600 ||
422 + use video_cards_radeonsi ||
423 + use video_cards_nouveau; then
424 + emesonargs+=($(meson_use vdpau gallium-vdpau))
425 + else
426 + emesonargs+=(-Dgallium-vdpau=false)
427 + fi
428 +
429 + if use video_cards_freedreno ||
430 + use video_cards_nouveau ||
431 + use video_cards_vmware; then
432 + emesonargs+=($(meson_use xa gallium-xa))
433 + else
434 + emesonargs+=(-Dgallium-xa=false)
435 + fi
436 +
437 + if use video_cards_r600 ||
438 + use video_cards_nouveau; then
439 + emesonargs+=($(meson_use xvmc gallium-xvmc))
440 + else
441 + emesonargs+=(-Dgallium-xvmc=false)
442 + fi
443 +
444 + if use video_cards_freedreno ||
445 + use video_cards_vc4 ||
446 + use video_cards_vivante; then
447 + gallium_enable -- kmsro
448 + fi
449 +
450 + gallium_enable video_cards_vc4 vc4
451 + gallium_enable video_cards_vivante etnaviv
452 + gallium_enable video_cards_vmware svga
453 + gallium_enable video_cards_nouveau nouveau
454 +
455 + # Only one i915 driver (classic vs gallium). Default to classic.
456 + if ! use classic; then
457 + gallium_enable video_cards_i915 i915
458 + if ! use video_cards_i915 && \
459 + ! use video_cards_i965; then
460 + gallium_enable video_cards_intel i915
461 + fi
462 + fi
463 +
464 + gallium_enable video_cards_iris iris
465 +
466 + gallium_enable video_cards_r300 r300
467 + gallium_enable video_cards_r600 r600
468 + gallium_enable video_cards_radeonsi radeonsi
469 + if ! use video_cards_r300 && \
470 + ! use video_cards_r600; then
471 + gallium_enable video_cards_radeon r300 r600
472 + fi
473 +
474 + gallium_enable video_cards_freedreno freedreno
475 + gallium_enable video_cards_virgl virgl
476 +
477 + # opencl stuff
478 + emesonargs+=(
479 + -Dgallium-opencl="$(usex opencl icd disabled)"
480 + )
481 + fi
482 +
483 + if use vulkan; then
484 + vulkan_enable video_cards_i965 intel
485 + vulkan_enable video_cards_iris intel
486 + vulkan_enable video_cards_radeonsi amd
487 + fi
488 +
489 + # x86 hardened pax_kernel needs glx-rts, bug 240956
490 + if [[ ${ABI} == x86 ]]; then
491 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
492 + fi
493 +
494 + # on abi_x86_32 hardened we need to have asm disable
495 + if [[ ${ABI} == x86* ]] && use pic; then
496 + emesonargs+=( -Dasm=false )
497 + fi
498 +
499 + if use gallium; then
500 + gallium_enable -- swrast
501 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
502 + else
503 + dri_driver_enable -- swrast
504 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
505 + fi
506 +
507 + driver_list() {
508 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
509 + echo "${drivers//$'\n'/,}"
510 + }
511 +
512 + emesonargs+=(
513 + $(meson_use test build-tests)
514 + -Dglx=dri
515 + -Dshared-glapi=true
516 + $(meson_use dri3)
517 + $(meson_use egl)
518 + $(meson_use gbm)
519 + $(meson_use gles1)
520 + $(meson_use gles2)
521 + $(meson_use libglvnd glvnd)
522 + $(meson_use selinux)
523 + -Dvalgrind=$(usex valgrind auto false)
524 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
525 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
526 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
527 + $(meson_use vulkan-overlay vulkan-overlay-layer)
528 + --buildtype $(usex debug debug plain)
529 + -Db_ndebug=$(usex debug false true)
530 + )
531 + meson_src_configure
532 +}
533 +
534 +multilib_src_compile() {
535 + meson_src_compile
536 +}
537 +
538 +multilib_src_install() {
539 + meson_src_install
540 +
541 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so*
542 +}
543 +
544 +multilib_src_install_all() {
545 + einstalldocs
546 +}
547 +
548 +multilib_src_test() {
549 + meson test -v -C "${BUILD_DIR}" -t 100
550 +}
551 +
552 +pkg_postinst() {
553 + # Switch to the xorg implementation.
554 + echo
555 + eselect opengl set --use-old ${OPENGL_DIR}
556 +}
557 +
558 +# $1 - VIDEO_CARDS flag (check skipped for "--")
559 +# other args - names of DRI drivers to enable
560 +dri_driver_enable() {
561 + if [[ $1 == -- ]] || use $1; then
562 + shift
563 + DRI_DRIVERS+=("$@")
564 + fi
565 +}
566 +
567 +gallium_enable() {
568 + if [[ $1 == -- ]] || use $1; then
569 + shift
570 + GALLIUM_DRIVERS+=("$@")
571 + fi
572 +}
573 +
574 +vulkan_enable() {
575 + if [[ $1 == -- ]] || use $1; then
576 + shift
577 + VULKAN_DRIVERS+=("$@")
578 + fi
579 +}