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: Wed, 11 Sep 2019 19:56:32
Message-Id: 1568231779.11dd9517e8d41e47272904b613288700fefcbefb.mattst88@gentoo
1 commit: 11dd9517e8d41e47272904b613288700fefcbefb
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 11 19:55:16 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 11 19:56:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11dd9517
7
8 media-libs/mesa: Version bump to 19.2.0_rc3
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-19.2.0_rc3.ebuild | 543 +++++++++++++++++++++++++++++++++
14 2 files changed, 544 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 5af7a5ab200..a0de666dd99 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -5,3 +5,4 @@ DIST mesa-19.1.5.tar.xz 10938452 BLAKE2B 7d21cad04c8172006e73d84148cfeb785b3d5f9
21 DIST mesa-19.1.6.tar.xz 10939908 BLAKE2B cd7204614898621f3b242788667fc64e0ca00f3a5650e60cb8e74ef2760300245734741355874e05c97d482f3bd06a1755fc5e9cee804a6d5a050f20c8bc70a9 SHA512 399ce97a293769893ef9a4a6af1f77c7d835f5405bdbc03bbf9b73e052e4ff3b43dec5dafd6b9fedaaf2c59531aeccaa0f685a8bfdc5719a26c3815fc7f68024
22 DIST mesa-19.2.0-rc1.tar.xz 11452972 BLAKE2B 64a844a06110c64f4badd8d64a63cee4fbb25c6e2bb17062277e54094c8a5342eac7058ae7ba7b0aefc4e0795aac371caac26e54cc3612afaf54d41b94e09b18 SHA512 babafb6ec668834e041a62e966452fe315e4f5afef8e1f7d35e038993c73b32ea6ad9929399edae4686f44cd11704fd9a8801821befc1d1767bc0662d4c39fac
23 DIST mesa-19.2.0-rc2.tar.xz 11456920 BLAKE2B 673ff105395731ca65cc99bee1f73c582b40e05983bd08c46f07384e579c8d449e7f5371461542ebbcfc32022382f206adf7dcc43ed8713cb35e37c1cc69e03c SHA512 a42f7add01afd327838bd57ea4086ad4b9de669c6caf443129e325171bc53e3321c898d8d0075c7e50c4e0fdd094d66a60e35a0620e25e6c52648c5ac0008dcc
24 +DIST mesa-19.2.0-rc3.tar.xz 11458088 BLAKE2B 35fac57dbf0d13f62f32695235ecc7c47b505b4eff55e7b06f61e1cd7a9977675ff9e5e2131e20dae3a666ad13b1f52a9ad36405731885c84cfa66a90fc8232e SHA512 378bb27073d99032c489a0fcc44157017d27d01c24c3bb7e3e32f59b298cf0c7409351d18fbbfb1ccfb799e02f9166450dc73390e98a026f60a4ab0583944d68
25
26 diff --git a/media-libs/mesa/mesa-19.2.0_rc3.ebuild b/media-libs/mesa/mesa-19.2.0_rc3.ebuild
27 new file mode 100644
28 index 00000000000..631e1efea88
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-19.2.0_rc3.ebuild
31 @@ -0,0 +1,543 @@
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 + 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-fbsd ~x86-fbsd ~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 pax_kernel selinux test unwind vaapi valgrind
71 + vdpau vulkan vulkan-overlay wayland +X xa xvmc"
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.99"
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[${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 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
139 + )
140 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
141 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
142 + )
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 +
149 + video_cards_intel? (
150 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
151 + )
152 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
153 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
154 + X? (
155 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
156 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
157 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
158 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
159 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
160 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
161 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
162 + )
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="10"
182 +LLVM_DEPSTR="
183 + || (
184 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
185 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
186 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
187 + sys-devel/llvm:7[${MULTILIB_USEDEP}]
188 + )
189 + sys-devel/llvm:=[${MULTILIB_USEDEP}]
190 +"
191 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
192 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
193 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
194 +RDEPEND="${RDEPEND}
195 + llvm? (
196 + opencl? (
197 + video_cards_r600? (
198 + ${CLANG_DEPSTR_AMDGPU}
199 + )
200 + !video_cards_r600? (
201 + video_cards_radeonsi? (
202 + ${CLANG_DEPSTR_AMDGPU}
203 + )
204 + )
205 + !video_cards_r600? (
206 + !video_cards_radeonsi? (
207 + video_cards_radeon? (
208 + ${CLANG_DEPSTR_AMDGPU}
209 + )
210 + )
211 + )
212 + !video_cards_r600? (
213 + !video_cards_radeon? (
214 + !video_cards_radeonsi? (
215 + ${CLANG_DEPSTR}
216 + )
217 + )
218 + )
219 + )
220 + !opencl? (
221 + video_cards_r600? (
222 + ${LLVM_DEPSTR_AMDGPU}
223 + )
224 + !video_cards_r600? (
225 + video_cards_radeonsi? (
226 + ${LLVM_DEPSTR_AMDGPU}
227 + )
228 + )
229 + !video_cards_r600? (
230 + !video_cards_radeonsi? (
231 + video_cards_radeon? (
232 + ${LLVM_DEPSTR_AMDGPU}
233 + )
234 + )
235 + )
236 + !video_cards_r600? (
237 + !video_cards_radeon? (
238 + !video_cards_radeonsi? (
239 + ${LLVM_DEPSTR}
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 +)"
278 +
279 +llvm_check_deps() {
280 + local flags=${MULTILIB_USEDEP}
281 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
282 + then
283 + flags+=",llvm_targets_AMDGPU(-)"
284 + fi
285 +
286 + if use opencl; then
287 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
288 + fi
289 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
290 +}
291 +
292 +pkg_pretend() {
293 + if use opencl; then
294 + if ! use video_cards_r600 &&
295 + ! use video_cards_radeonsi; then
296 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
297 + fi
298 + fi
299 +
300 + if use vaapi; then
301 + if ! use video_cards_r600 &&
302 + ! use video_cards_radeonsi &&
303 + ! use video_cards_nouveau; then
304 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
305 + fi
306 + fi
307 +
308 + if use vdpau; then
309 + if ! use video_cards_r300 &&
310 + ! use video_cards_r600 &&
311 + ! use video_cards_radeonsi &&
312 + ! use video_cards_nouveau; then
313 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
314 + fi
315 + fi
316 +
317 + if use xa; then
318 + if ! use video_cards_freedreno &&
319 + ! use video_cards_nouveau &&
320 + ! use video_cards_vmware; then
321 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
322 + fi
323 + fi
324 +
325 + if use xvmc; then
326 + if ! use video_cards_r600 &&
327 + ! use video_cards_nouveau; then
328 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
329 + fi
330 + fi
331 +
332 + if ! use gallium; then
333 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
334 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
335 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
336 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
337 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
338 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
339 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
340 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
341 + fi
342 +
343 + if ! use llvm; then
344 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
345 + fi
346 +}
347 +
348 +python_check_deps() {
349 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
350 +}
351 +
352 +pkg_setup() {
353 + # warning message for bug 459306
354 + if use llvm && has_version sys-devel/llvm[!debug=]; then
355 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
356 + ewarn "detected! This can cause problems. For details, see bug 459306."
357 + fi
358 +
359 + if use llvm; then
360 + llvm_pkg_setup
361 + fi
362 + python-any-r1_pkg_setup
363 +}
364 +
365 +multilib_src_configure() {
366 + local emesonargs=()
367 +
368 + if use classic; then
369 + # Intel code
370 + dri_driver_enable video_cards_i915 i915
371 + dri_driver_enable video_cards_i965 i965
372 + if ! use video_cards_i915 && \
373 + ! use video_cards_i965; then
374 + dri_driver_enable video_cards_intel i915 i965
375 + fi
376 +
377 + # Nouveau code
378 + dri_driver_enable video_cards_nouveau nouveau
379 +
380 + # ATI code
381 + dri_driver_enable video_cards_r100 r100
382 + dri_driver_enable video_cards_r200 r200
383 + if ! use video_cards_r100 && \
384 + ! use video_cards_r200; then
385 + dri_driver_enable video_cards_radeon r100 r200
386 + fi
387 + fi
388 +
389 + emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
390 +
391 + if use gallium; then
392 + emesonargs+=(
393 + $(meson_use llvm)
394 + $(meson_use lm_sensors lmsensors)
395 + $(meson_use unwind libunwind)
396 + )
397 +
398 + if use video_cards_iris ||
399 + use video_cards_r300 ||
400 + use video_cards_r600 ||
401 + use video_cards_radeonsi ||
402 + use video_cards_nouveau ||
403 + use video_cards_vmware; then
404 + emesonargs+=($(meson_use d3d9 gallium-nine))
405 + else
406 + emesonargs+=(-Dgallium-nine=false)
407 + fi
408 +
409 + if use video_cards_r600 ||
410 + use video_cards_radeonsi ||
411 + use video_cards_nouveau; then
412 + emesonargs+=($(meson_use vaapi gallium-va))
413 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
414 + else
415 + emesonargs+=(-Dgallium-va=false)
416 + fi
417 +
418 + if use video_cards_r300 ||
419 + use video_cards_r600 ||
420 + use video_cards_radeonsi ||
421 + use video_cards_nouveau; then
422 + emesonargs+=($(meson_use vdpau gallium-vdpau))
423 + else
424 + emesonargs+=(-Dgallium-vdpau=false)
425 + fi
426 +
427 + if use video_cards_freedreno ||
428 + use video_cards_nouveau ||
429 + use video_cards_vmware; then
430 + emesonargs+=($(meson_use xa gallium-xa))
431 + else
432 + emesonargs+=(-Dgallium-xa=false)
433 + fi
434 +
435 + if use video_cards_r600 ||
436 + use video_cards_nouveau; then
437 + emesonargs+=($(meson_use xvmc gallium-xvmc))
438 + else
439 + emesonargs+=(-Dgallium-xvmc=false)
440 + fi
441 +
442 + if use video_cards_freedreno ||
443 + use video_cards_lima ||
444 + use video_cards_panfrost ||
445 + use video_cards_vc4 ||
446 + use video_cards_vivante; then
447 + gallium_enable -- kmsro
448 + fi
449 +
450 + gallium_enable video_cards_lima lima
451 + gallium_enable video_cards_panfrost panfrost
452 + gallium_enable video_cards_vc4 vc4
453 + gallium_enable video_cards_vivante etnaviv
454 + gallium_enable video_cards_vmware svga
455 + gallium_enable video_cards_nouveau nouveau
456 +
457 + # Only one i915 driver (classic vs gallium). Default to classic.
458 + if ! use classic; then
459 + gallium_enable video_cards_i915 i915
460 + if ! use video_cards_i915 && \
461 + ! use video_cards_i965; then
462 + gallium_enable video_cards_intel i915
463 + fi
464 + fi
465 +
466 + gallium_enable video_cards_iris iris
467 +
468 + gallium_enable video_cards_r300 r300
469 + gallium_enable video_cards_r600 r600
470 + gallium_enable video_cards_radeonsi radeonsi
471 + if ! use video_cards_r300 && \
472 + ! use video_cards_r600; then
473 + gallium_enable video_cards_radeon r300 r600
474 + fi
475 +
476 + gallium_enable video_cards_freedreno freedreno
477 + gallium_enable video_cards_virgl virgl
478 +
479 + # opencl stuff
480 + emesonargs+=(
481 + -Dgallium-opencl="$(usex opencl icd disabled)"
482 + )
483 + fi
484 +
485 + if use vulkan; then
486 + vulkan_enable video_cards_i965 intel
487 + vulkan_enable video_cards_iris intel
488 + vulkan_enable video_cards_radeonsi amd
489 + fi
490 +
491 + # x86 hardened pax_kernel needs glx-rts, bug 240956
492 + if [[ ${ABI} == x86 ]]; then
493 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
494 + fi
495 +
496 + if use gallium; then
497 + gallium_enable -- swrast
498 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
499 + else
500 + dri_driver_enable -- swrast
501 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
502 + fi
503 +
504 + driver_list() {
505 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
506 + echo "${drivers//$'\n'/,}"
507 + }
508 +
509 + emesonargs+=(
510 + $(meson_use test build-tests)
511 + -Dglx=$(usex X dri disabled)
512 + -Dshared-glapi=true
513 + $(meson_use dri3)
514 + $(meson_use egl)
515 + $(meson_use gbm)
516 + $(meson_use gles1)
517 + $(meson_use gles2)
518 + $(meson_use libglvnd glvnd)
519 + $(meson_use selinux)
520 + -Dvalgrind=$(usex valgrind auto false)
521 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
522 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
523 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
524 + $(meson_use vulkan-overlay vulkan-overlay-layer)
525 + --buildtype $(usex debug debug plain)
526 + -Db_ndebug=$(usex debug false true)
527 + )
528 + meson_src_configure
529 +}
530 +
531 +multilib_src_compile() {
532 + meson_src_compile
533 +}
534 +
535 +multilib_src_install() {
536 + meson_src_install
537 +}
538 +
539 +multilib_src_install_all() {
540 + einstalldocs
541 +}
542 +
543 +multilib_src_test() {
544 + meson test -v -C "${BUILD_DIR}" -t 100
545 +}
546 +
547 +pkg_postinst() {
548 + # Switch to the xorg implementation.
549 + echo
550 + eselect opengl set --use-old ${OPENGL_DIR}
551 +}
552 +
553 +# $1 - VIDEO_CARDS flag (check skipped for "--")
554 +# other args - names of DRI drivers to enable
555 +dri_driver_enable() {
556 + if [[ $1 == -- ]] || use $1; then
557 + shift
558 + DRI_DRIVERS+=("$@")
559 + fi
560 +}
561 +
562 +gallium_enable() {
563 + if [[ $1 == -- ]] || use $1; then
564 + shift
565 + GALLIUM_DRIVERS+=("$@")
566 + fi
567 +}
568 +
569 +vulkan_enable() {
570 + if [[ $1 == -- ]] || use $1; then
571 + shift
572 + VULKAN_DRIVERS+=("$@")
573 + fi
574 +}