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, 28 Nov 2019 00:02:38
Message-Id: 1574899334.6f96660148b625ae1c4dd9ddac2281233b460d3c.mattst88@gentoo
1 commit: 6f96660148b625ae1c4dd9ddac2281233b460d3c
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 28 00:01:35 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 28 00:02:14 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f966601
7
8 media-libs/mesa: Version bump to 19.3.0_rc5
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-19.3.0_rc5.ebuild | 548 +++++++++++++++++++++++++++++++++
14 2 files changed, 549 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index a96940796ae..8fa70a95c80 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,3 +1,4 @@
21 DIST mesa-19.1.8.tar.xz 10945480 BLAKE2B df2ce0561cd0a61f0f35a406a5a9b2384c0c5869efadabfa40b07cf96a592214aa5c6d03423598c531f117075c3b59aa5af6f9b1c5dfa5914aabe41f60b592a0 SHA512 3bcc90c17cf966ce3399434ca2d4f363c5778e52c56b8184d6cdf22ef2e4a4fdb9c3fbff5c98efc856e3535f81259608a6daa74af1f3bdce30ea251d86435c74
22 DIST mesa-19.2.6.tar.xz 11460244 BLAKE2B 5d21d7401d5e8b5d7e1cdeae7b85e6ce35304e249f285a08cd34c2e3396507e7de76367309468f5717e7cc0f7da82bb54159488d5182339fa17cdb31b6ccafc8 SHA512 2e961631ae8ea1cb64d87bede51432445a17d153244d8c76f5eb70cbdc8c069d3f08cac11928d85ce2730d772aff9b3aff089e5e552eb021fdcb65364bb685b6
23 DIST mesa-19.3.0-rc4.tar.xz 11791316 BLAKE2B 52a1524064b6ad7edb9c5486a8e12b9b83d4c956d5f031783fe199c5bc130e67483f890745955631bf9a8841513cb1b9396bf874a2b74970711467d6ee6a50c0 SHA512 4f0cda6302f6069e6e3ea1d8bf1eed865702c0554667c580cc48f9ebbd23cdf7391de5219bb1b34c7dde04c2bd0816a8d23f9339537e06be6f5735b526905f49
24 +DIST mesa-19.3.0-rc5.tar.xz 11792676 BLAKE2B 3ae4147dc91b960e57447b5aea21db2f5062f8ef916ac065519a2d9958be94faf06df8588b63d7fb642767fe0082ff4a5b220f1e59e3e8e7d628f6a132e5392b SHA512 25d59baabddafe63512d9998e3ac21f847a32a2639d6b7f106729a3dc7112fec334e3634bda6a17fd0ce8b993e6bc35a5d15fa33a4c9006aaa941db9f5366424
25
26 diff --git a/media-libs/mesa/mesa-19.3.0_rc5.ebuild b/media-libs/mesa/mesa-19.3.0_rc5.ebuild
27 new file mode 100644
28 index 00000000000..d8de3e17e49
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-19.3.0_rc5.ebuild
31 @@ -0,0 +1,548 @@
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-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.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 + 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 + 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 +"
163 +for card in ${RADEON_CARDS}; do
164 + RDEPEND="${RDEPEND}
165 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
166 + "
167 +done
168 +RDEPEND="${RDEPEND}
169 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
170 +"
171 +
172 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
173 +# we need to *really* make sure we're not pulling one than more slot
174 +# simultaneously.
175 +#
176 +# How to use it:
177 +# 1. List all the working slots (with min versions) in ||, newest first.
178 +# 2. Update the := to specify *max* version, e.g. < 10.
179 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
180 +LLVM_MAX_SLOT="9"
181 +LLVM_DEPSTR="
182 + || (
183 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
184 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
185 + sys-devel/llvm:7[${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 +llvm_check_deps() {
281 + local flags=${MULTILIB_USEDEP}
282 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
283 + then
284 + flags+=",llvm_targets_AMDGPU(-)"
285 + fi
286 +
287 + if use opencl; then
288 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
289 + fi
290 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
291 +}
292 +
293 +pkg_pretend() {
294 + if use opencl; then
295 + if ! use video_cards_r600 &&
296 + ! use video_cards_radeonsi; then
297 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
298 + fi
299 + fi
300 +
301 + if use vaapi; then
302 + if ! use video_cards_r600 &&
303 + ! use video_cards_radeonsi &&
304 + ! use video_cards_nouveau; then
305 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
306 + fi
307 + fi
308 +
309 + if use vdpau; then
310 + if ! use video_cards_r300 &&
311 + ! use video_cards_r600 &&
312 + ! use video_cards_radeonsi &&
313 + ! use video_cards_nouveau; then
314 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
315 + fi
316 + fi
317 +
318 + if use xa; then
319 + if ! use video_cards_freedreno &&
320 + ! use video_cards_nouveau &&
321 + ! use video_cards_vmware; then
322 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
323 + fi
324 + fi
325 +
326 + if use xvmc; then
327 + if ! use video_cards_r600 &&
328 + ! use video_cards_nouveau; then
329 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
330 + fi
331 + fi
332 +
333 + if ! use gallium; then
334 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
335 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
336 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
337 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
338 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
339 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
340 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
341 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
342 + fi
343 +
344 + if ! use llvm; then
345 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
346 + fi
347 +}
348 +
349 +python_check_deps() {
350 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
351 +}
352 +
353 +pkg_setup() {
354 + # warning message for bug 459306
355 + if use llvm && has_version sys-devel/llvm[!debug=]; then
356 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
357 + ewarn "detected! This can cause problems. For details, see bug 459306."
358 + fi
359 +
360 + if use llvm; then
361 + llvm_pkg_setup
362 + fi
363 + python-any-r1_pkg_setup
364 +}
365 +
366 +multilib_src_configure() {
367 + local emesonargs=()
368 +
369 + if use classic; then
370 + # Intel code
371 + dri_driver_enable video_cards_i915 i915
372 + dri_driver_enable video_cards_i965 i965
373 + if ! use video_cards_i915 && \
374 + ! use video_cards_i965; then
375 + dri_driver_enable video_cards_intel i915 i965
376 + fi
377 +
378 + # Nouveau code
379 + dri_driver_enable video_cards_nouveau nouveau
380 +
381 + # ATI code
382 + dri_driver_enable video_cards_r100 r100
383 + dri_driver_enable video_cards_r200 r200
384 + if ! use video_cards_r100 && \
385 + ! use video_cards_r200; then
386 + dri_driver_enable video_cards_radeon r100 r200
387 + fi
388 + fi
389 +
390 + emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
391 +
392 + if use gallium; then
393 + emesonargs+=(
394 + $(meson_use llvm)
395 + $(meson_use lm-sensors lmsensors)
396 + $(meson_use unwind libunwind)
397 + )
398 +
399 + if use video_cards_iris ||
400 + use video_cards_r300 ||
401 + use video_cards_r600 ||
402 + use video_cards_radeonsi ||
403 + use video_cards_nouveau ||
404 + use video_cards_vmware; then
405 + emesonargs+=($(meson_use d3d9 gallium-nine))
406 + else
407 + emesonargs+=(-Dgallium-nine=false)
408 + fi
409 +
410 + if use video_cards_r600 ||
411 + use video_cards_radeonsi ||
412 + use video_cards_nouveau; then
413 + emesonargs+=($(meson_use vaapi gallium-va))
414 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
415 + else
416 + emesonargs+=(-Dgallium-va=false)
417 + fi
418 +
419 + if use video_cards_r300 ||
420 + use video_cards_r600 ||
421 + use video_cards_radeonsi ||
422 + use video_cards_nouveau; then
423 + emesonargs+=($(meson_use vdpau gallium-vdpau))
424 + else
425 + emesonargs+=(-Dgallium-vdpau=false)
426 + fi
427 +
428 + if use video_cards_freedreno ||
429 + use video_cards_nouveau ||
430 + use video_cards_vmware; then
431 + emesonargs+=($(meson_use xa gallium-xa))
432 + else
433 + emesonargs+=(-Dgallium-xa=false)
434 + fi
435 +
436 + if use video_cards_r600 ||
437 + use video_cards_nouveau; then
438 + emesonargs+=($(meson_use xvmc gallium-xvmc))
439 + else
440 + emesonargs+=(-Dgallium-xvmc=false)
441 + fi
442 +
443 + if use video_cards_freedreno ||
444 + use video_cards_lima ||
445 + use video_cards_panfrost ||
446 + use video_cards_vc4 ||
447 + use video_cards_vivante; then
448 + gallium_enable -- kmsro
449 + fi
450 +
451 + gallium_enable video_cards_lima lima
452 + gallium_enable video_cards_panfrost panfrost
453 + gallium_enable video_cards_vc4 vc4
454 + gallium_enable video_cards_vivante etnaviv
455 + gallium_enable video_cards_vmware svga
456 + gallium_enable video_cards_nouveau nouveau
457 +
458 + # Only one i915 driver (classic vs gallium). Default to classic.
459 + if ! use classic; then
460 + gallium_enable video_cards_i915 i915
461 + if ! use video_cards_i915 && \
462 + ! use video_cards_i965; then
463 + gallium_enable video_cards_intel i915
464 + fi
465 + fi
466 +
467 + gallium_enable video_cards_iris iris
468 +
469 + gallium_enable video_cards_r300 r300
470 + gallium_enable video_cards_r600 r600
471 + gallium_enable video_cards_radeonsi radeonsi
472 + if ! use video_cards_r300 && \
473 + ! use video_cards_r600; then
474 + gallium_enable video_cards_radeon r300 r600
475 + fi
476 +
477 + gallium_enable video_cards_freedreno freedreno
478 + gallium_enable video_cards_virgl virgl
479 +
480 + # opencl stuff
481 + emesonargs+=(
482 + -Dgallium-opencl="$(usex opencl icd disabled)"
483 + )
484 + fi
485 +
486 + if use vulkan; then
487 + vulkan_enable video_cards_i965 intel
488 + vulkan_enable video_cards_iris intel
489 + vulkan_enable video_cards_radeonsi amd
490 + fi
491 +
492 + # x86 hardened pax_kernel needs glx-rts, bug 240956
493 + if [[ ${ABI} == x86 ]]; then
494 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
495 + fi
496 +
497 + if use gallium; then
498 + gallium_enable -- swrast
499 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
500 + else
501 + dri_driver_enable -- swrast
502 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
503 + fi
504 +
505 + driver_list() {
506 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
507 + echo "${drivers//$'\n'/,}"
508 + }
509 +
510 + emesonargs+=(
511 + $(meson_use test build-tests)
512 + -Dglx=$(usex X dri disabled)
513 + -Dshared-glapi=true
514 + $(meson_use dri3)
515 + $(meson_use egl)
516 + $(meson_use gbm)
517 + $(meson_use gles1)
518 + $(meson_use gles2)
519 + $(meson_use libglvnd glvnd)
520 + $(meson_use selinux)
521 + -Dvalgrind=$(usex valgrind auto false)
522 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
523 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
524 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
525 + $(meson_use vulkan-overlay vulkan-overlay-layer)
526 + --buildtype $(usex debug debug plain)
527 + -Db_ndebug=$(usex debug false true)
528 + )
529 + meson_src_configure
530 +}
531 +
532 +multilib_src_compile() {
533 + meson_src_compile
534 +}
535 +
536 +multilib_src_install() {
537 + meson_src_install
538 +
539 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/pkgconfig/{egl,gl}.pc
540 +}
541 +
542 +multilib_src_install_all() {
543 + einstalldocs
544 +}
545 +
546 +multilib_src_test() {
547 + meson test -v -C "${BUILD_DIR}" -t 100
548 +}
549 +
550 +pkg_postinst() {
551 + if ! use libglvnd; then
552 + # Switch to the xorg implementation.
553 + echo
554 + eselect opengl set --use-old ${OPENGL_DIR}
555 + fi
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 +}