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, 30 Apr 2020 17:35:47
Message-Id: 1588268080.dbf95d42221567866896f2e3b0ff14f719171724.mattst88@gentoo
1 commit: dbf95d42221567866896f2e3b0ff14f719171724
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 30 17:15:48 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 30 17:34:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbf95d42
7
8 media-libs/mesa: Version bump to 20.0.6
9
10 Closes: https://bugs.gentoo.org/711656
11 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
12
13 media-libs/mesa/Manifest | 1 +
14 media-libs/mesa/mesa-20.0.6.ebuild | 550 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 551 insertions(+)
16
17 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
18 index 24e4ae6cc71..14c6256f537 100644
19 --- a/media-libs/mesa/Manifest
20 +++ b/media-libs/mesa/Manifest
21 @@ -1,3 +1,4 @@
22 DIST mesa-19.3.5.tar.xz 12064980 BLAKE2B a20ebfb149624f13951795e07154ab70dc1856a7a1261b339b0bdf0009511111756c88439e7b8729f768b0b4b298301b9a3c0c10d7f2fab3abd91649c12ba51c SHA512 413929573fab31e1bb2a1a04c0c770161c2db464a5aab3f0567d27603fff889ede70e1f6e197e7ff1c1639dc4cc543457bcf45761f0f8e6dffafccfa773a4e3f
23 DIST mesa-20.0.4.tar.xz 12292888 BLAKE2B a14b747045ee4ff3bc07e527ad43d5b22047d6c9700cf290ba9c95e07bd88b9252bdd14380d4f0033dcb8fb652664987889d972db09462bcc69c8a7e843b606f SHA512 17d8bc3b56779a8e5648d81da9ee97b66bcec015710801edce4e8055fbb314cd9ebc1d112e3035480ba844c7d9ae6b5b1f1eac0cc0817e69e9253a7748451a55
24 DIST mesa-20.0.5.tar.xz 12257484 BLAKE2B 12d2530fa77dffadea74908e0b8e52f19023f0e2d012c607d7d5fc8b1380efad13dee50eee99a453b751340a3633b6260a3f1c82e5b16c03051df2fca6947740 SHA512 6f5780f7574400fea54978b40eb97faca35826a8a7bed96362d7bebcda78e2cadd44585ef8dd7dc126e0cc62cff61bee9b2ea360fedcc09a1fbb4c1f20c6aa08
25 +DIST mesa-20.0.6.tar.xz 12275708 BLAKE2B 9f6d9ae9c260e396670a3980ba83914ad0c1b7dc5f08471a78e4ab76e6ce3c18b96152fefc3846d89840be971180a2f4c176d40beb2c4b1f572011cb4b913f58 SHA512 a93dc3ed57ed7469b7c60cdbdcf4f29c5da4ec3986171c7b534e009e136ca21fec16207ffab38a6747437a9b1060e2e6c4b74c4e5cdc168b9aba0fc1940b5e90
26
27 diff --git a/media-libs/mesa/mesa-20.0.6.ebuild b/media-libs/mesa/mesa-20.0.6.ebuild
28 new file mode 100644
29 index 00000000000..03083871b14
30 --- /dev/null
31 +++ b/media-libs/mesa/mesa-20.0.6.ebuild
32 @@ -0,0 +1,550 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{6,7,8} )
39 +
40 +inherit llvm meson multilib-minimal 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 + inherit git-r3
52 +else
53 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
54 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
55 +fi
56 +
57 +LICENSE="MIT"
58 +SLOT="0"
59 +RESTRICT="
60 + !test? ( test )
61 +"
62 +
63 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
64 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware"
65 +for card in ${VIDEO_CARDS}; do
66 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
67 +done
68 +
69 +IUSE="${IUSE_VIDEO_CARDS}
70 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
71 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
72 + vulkan-overlay wayland +X xa xvmc +zstd"
73 +
74 +REQUIRED_USE="
75 + d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
76 + gles1? ( egl )
77 + gles2? ( egl )
78 + vulkan? ( dri3
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[X?,${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 + >=virtual/opencl-3[${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="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 + )
188 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
189 +"
190 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
191 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
192 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
193 +RDEPEND="${RDEPEND}
194 + gallium? (
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 +"
247 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
248 +
249 +DEPEND="${RDEPEND}
250 + valgrind? ( dev-util/valgrind )
251 + X? (
252 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
253 + x11-base/xorg-proto
254 + )
255 +"
256 +BDEPEND="
257 + ${PYTHON_DEPS}
258 + opencl? (
259 + >=sys-devel/gcc-4.6
260 + )
261 + sys-devel/bison
262 + sys-devel/flex
263 + sys-devel/gettext
264 + virtual/pkgconfig
265 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
266 +"
267 +
268 +S="${WORKDIR}/${MY_P}"
269 +EGIT_CHECKOUT_DIR=${S}
270 +
271 +QA_WX_LOAD="
272 +x86? (
273 + usr/lib*/libglapi.so.0.0.0
274 + usr/lib*/libGLESv1_CM.so.1.1.0
275 + usr/lib*/libGLESv2.so.2.0.0
276 + usr/lib*/libGL.so.1.2.0
277 + usr/lib*/libOSMesa.so.8.0.0
278 + libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
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:${LLVM_SLOT}[${flags}]" || return 1
290 + fi
291 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
292 +}
293 +
294 +pkg_pretend() {
295 + if use vulkan; then
296 + if ! use video_cards_i965 &&
297 + ! use video_cards_iris &&
298 + ! use video_cards_radeonsi; then
299 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
300 + fi
301 + fi
302 +
303 + if use opencl; then
304 + if ! use video_cards_r600 &&
305 + ! use video_cards_radeonsi; then
306 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
307 + fi
308 + fi
309 +
310 + if use vaapi; then
311 + if ! use video_cards_r600 &&
312 + ! use video_cards_radeonsi &&
313 + ! use video_cards_nouveau; then
314 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
315 + fi
316 + fi
317 +
318 + if use vdpau; then
319 + if ! use video_cards_r300 &&
320 + ! use video_cards_r600 &&
321 + ! use video_cards_radeonsi &&
322 + ! use video_cards_nouveau; then
323 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
324 + fi
325 + fi
326 +
327 + if use xa; then
328 + if ! use video_cards_freedreno &&
329 + ! use video_cards_nouveau &&
330 + ! use video_cards_vmware; then
331 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
332 + fi
333 + fi
334 +
335 + if use xvmc; then
336 + if ! use video_cards_r600 &&
337 + ! use video_cards_nouveau; then
338 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
339 + fi
340 + fi
341 +
342 + if ! use gallium; then
343 + use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
344 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
345 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
346 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
347 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
348 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
349 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
350 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
351 + fi
352 +
353 + if ! use llvm; then
354 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
355 + fi
356 +}
357 +
358 +python_check_deps() {
359 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
360 +}
361 +
362 +pkg_setup() {
363 + # warning message for bug 459306
364 + if use llvm && has_version sys-devel/llvm[!debug=]; then
365 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
366 + ewarn "detected! This can cause problems. For details, see bug 459306."
367 + fi
368 +
369 + if use gallium && use llvm; then
370 + llvm_pkg_setup
371 + fi
372 + python-any-r1_pkg_setup
373 +}
374 +
375 +multilib_src_configure() {
376 + local emesonargs=()
377 +
378 + if use classic; then
379 + # Intel code
380 + dri_driver_enable video_cards_i915 i915
381 + dri_driver_enable video_cards_i965 i965
382 + if ! use video_cards_i915 && \
383 + ! use video_cards_i965; then
384 + dri_driver_enable video_cards_intel i915 i965
385 + fi
386 +
387 + # Nouveau code
388 + dri_driver_enable video_cards_nouveau nouveau
389 +
390 + # ATI code
391 + dri_driver_enable video_cards_r100 r100
392 + dri_driver_enable video_cards_r200 r200
393 + if ! use video_cards_r100 && \
394 + ! use video_cards_r200; then
395 + dri_driver_enable video_cards_radeon r100 r200
396 + fi
397 + fi
398 +
399 + emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
400 +
401 + if use gallium; then
402 + emesonargs+=(
403 + $(meson_use llvm)
404 + $(meson_use lm-sensors lmsensors)
405 + $(meson_use unwind libunwind)
406 + )
407 +
408 + if use video_cards_iris ||
409 + use video_cards_r300 ||
410 + use video_cards_r600 ||
411 + use video_cards_radeonsi ||
412 + use video_cards_nouveau ||
413 + use video_cards_vmware; then
414 + emesonargs+=($(meson_use d3d9 gallium-nine))
415 + else
416 + emesonargs+=(-Dgallium-nine=false)
417 + fi
418 +
419 + if use video_cards_r600 ||
420 + use video_cards_radeonsi ||
421 + use video_cards_nouveau; then
422 + emesonargs+=($(meson_use vaapi gallium-va))
423 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
424 + else
425 + emesonargs+=(-Dgallium-va=false)
426 + fi
427 +
428 + if use video_cards_r300 ||
429 + use video_cards_r600 ||
430 + use video_cards_radeonsi ||
431 + use video_cards_nouveau; then
432 + emesonargs+=($(meson_use vdpau gallium-vdpau))
433 + else
434 + emesonargs+=(-Dgallium-vdpau=false)
435 + fi
436 +
437 + if use video_cards_freedreno ||
438 + use video_cards_nouveau ||
439 + use video_cards_vmware; then
440 + emesonargs+=($(meson_use xa gallium-xa))
441 + else
442 + emesonargs+=(-Dgallium-xa=false)
443 + fi
444 +
445 + if use video_cards_r600 ||
446 + use video_cards_nouveau; then
447 + emesonargs+=($(meson_use xvmc gallium-xvmc))
448 + else
449 + emesonargs+=(-Dgallium-xvmc=false)
450 + fi
451 +
452 + if use video_cards_freedreno ||
453 + use video_cards_lima ||
454 + use video_cards_panfrost ||
455 + use video_cards_vc4 ||
456 + use video_cards_vivante; then
457 + gallium_enable -- kmsro
458 + fi
459 +
460 + gallium_enable video_cards_lima lima
461 + gallium_enable video_cards_panfrost panfrost
462 + gallium_enable video_cards_vc4 vc4
463 + gallium_enable video_cards_vivante etnaviv
464 + gallium_enable video_cards_vmware svga
465 + gallium_enable video_cards_nouveau nouveau
466 +
467 + # Only one i915 driver (classic vs gallium). Default to classic.
468 + if ! use classic; then
469 + gallium_enable video_cards_i915 i915
470 + if ! use video_cards_i915 && \
471 + ! use video_cards_i965; then
472 + gallium_enable video_cards_intel i915
473 + fi
474 + fi
475 +
476 + gallium_enable video_cards_iris iris
477 +
478 + gallium_enable video_cards_r300 r300
479 + gallium_enable video_cards_r600 r600
480 + gallium_enable video_cards_radeonsi radeonsi
481 + if ! use video_cards_r300 && \
482 + ! use video_cards_r600; then
483 + gallium_enable video_cards_radeon r300 r600
484 + fi
485 +
486 + gallium_enable video_cards_freedreno freedreno
487 + gallium_enable video_cards_virgl virgl
488 +
489 + # opencl stuff
490 + emesonargs+=(
491 + -Dgallium-opencl="$(usex opencl icd disabled)"
492 + )
493 + fi
494 +
495 + if use vulkan; then
496 + vulkan_enable video_cards_i965 intel
497 + vulkan_enable video_cards_iris intel
498 + vulkan_enable video_cards_radeonsi amd
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 +
545 +multilib_src_install_all() {
546 + einstalldocs
547 +}
548 +
549 +multilib_src_test() {
550 + meson test -v -C "${BUILD_DIR}" -t 100
551 +}
552 +
553 +pkg_postinst() {
554 + if ! use libglvnd; then
555 + # Switch to the xorg implementation.
556 + echo
557 + eselect opengl set --use-old ${OPENGL_DIR}
558 + fi
559 +}
560 +
561 +# $1 - VIDEO_CARDS flag (check skipped for "--")
562 +# other args - names of DRI drivers to enable
563 +dri_driver_enable() {
564 + if [[ $1 == -- ]] || use $1; then
565 + shift
566 + DRI_DRIVERS+=("$@")
567 + fi
568 +}
569 +
570 +gallium_enable() {
571 + if [[ $1 == -- ]] || use $1; then
572 + shift
573 + GALLIUM_DRIVERS+=("$@")
574 + fi
575 +}
576 +
577 +vulkan_enable() {
578 + if [[ $1 == -- ]] || use $1; then
579 + shift
580 + VULKAN_DRIVERS+=("$@")
581 + fi
582 +}