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 Jan 2021 17:25:35
Message-Id: 1611854723.f7a54ba8433f68cac31fa4778372e82a25a7682d.mattst88@gentoo
1 commit: f7a54ba8433f68cac31fa4778372e82a25a7682d
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 28 17:12:35 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 28 17:25:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7a54ba8
7
8 media-libs/mesa: Version bump to 21.0.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-21.0.0_rc3.ebuild | 556 +++++++++++++++++++++++++++++++++
14 2 files changed, 557 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 8cfbd9c1fbb..07caeedda6a 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -3,3 +3,4 @@ DIST mesa-20.2.6.tar.xz 13886924 BLAKE2B 2bc5d680979b58a77105a8058da5dfea81afe05
21 DIST mesa-20.3.2.tar.xz 14194120 BLAKE2B 545073b7f3f9dd54e087402b599ffa55e37a6a0b2422a52fc22cbe8de0b91a88603bd2241e2308f6891cdab731f0e01c9c9683028819aebcf3251ef3ae3db9bf SHA512 0cabf8ddfd20b56098c8f4c081a3c2d4741ef42f40c929645e74284db99cf2a81137d7d279b7b6a0c15dea83905119ddf612411b36344dc22a488de9f311f5ed
22 DIST mesa-20.3.3.tar.xz 14222700 BLAKE2B 02996b9f784f4c4a4502f8d5a1ef9763799b36206cfbfb56aeeb84837a119457fcfdd2d2efc3bf87fe945bd4dd4747b77fe9af51b290311b86e850fa4d6ac8c6 SHA512 77735462f4ccbe865d0cf7e9db47c42f8bc2600b9a030dca11066d29e43f73c18ca0422e6356129fc14ac1b1018ed752ae4ee45bd31ae706fea58f573a14d346
23 DIST mesa-21.0.0-rc1.tar.xz 14452448 BLAKE2B 1c5738a1ce16fa79931cb57cf2d1605970d95d1f7b635aa73f35ac78da27909c5d651491df64f90c4cd667df5b01550b0eba952d4f768cf862e8121cc75cfa4c SHA512 7157c5fbc9f545836e6b9d81805084450730aaab183466f1c19ef6b0d65ae1b4f04882a87f90982dbfec38da991732b9e0ddba9350be55d675dd409d7c142ed4
24 +DIST mesa-21.0.0-rc3.tar.xz 14488732 BLAKE2B f459fde39b7a1a62166b1d58df309e6295c489eef1324649478a6e21139317068b7cc5fb9ab6d54a31bbfc8c696df81ebc9531e14c40020380f342dc5948036d SHA512 b51495e8ef3a4a2f1b98ad3c4f5037c21b4b7df375138bcc02b24cb4b7ffd7b807d76ac0853d0ecc81c09ceca2a97e5c402352700f297ed7f4369f98d03a0810
25
26 diff --git a/media-libs/mesa/mesa-21.0.0_rc3.ebuild b/media-libs/mesa/mesa-21.0.0_rc3.ebuild
27 new file mode 100644
28 index 00000000000..47d4972b3e9
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-21.0.0_rc3.ebuild
31 @@ -0,0 +1,556 @@
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,9} )
38 +
39 +inherit llvm meson multilib-minimal python-any-r1 linux-info
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://archive.mesa3d.org/${MY_P}.tar.xz"
53 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~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 v3d 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 +llvm
70 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
71 + vulkan-overlay wayland +X xa xvmc zink +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 + osmesa? ( gallium )
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_v3d? ( gallium )
98 + video_cards_vc4? ( gallium )
99 + video_cards_virgl? ( gallium )
100 + video_cards_vivante? ( gallium gbm )
101 + video_cards_vmware? ( gallium )
102 + xa? ( X )
103 + xvmc? ( X )
104 + zink? ( gallium vulkan )
105 +"
106 +
107 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
108 +RDEPEND="
109 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
110 + >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
111 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
112 + gallium? (
113 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
114 + llvm? (
115 + video_cards_radeonsi? (
116 + virtual/libelf:0=[${MULTILIB_USEDEP}]
117 + )
118 + video_cards_r600? (
119 + virtual/libelf:0=[${MULTILIB_USEDEP}]
120 + )
121 + video_cards_radeon? (
122 + virtual/libelf:0=[${MULTILIB_USEDEP}]
123 + )
124 + )
125 + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
126 + opencl? (
127 + >=virtual/opencl-3[${MULTILIB_USEDEP}]
128 + dev-libs/libclc
129 + virtual/libelf:0=[${MULTILIB_USEDEP}]
130 + )
131 + vaapi? (
132 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
133 + )
134 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
135 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
136 + )
137 + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
138 + wayland? (
139 + >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
140 + >=dev-libs/wayland-protocols-1.8
141 + )
142 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
143 + video_cards_intel? (
144 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
145 + )
146 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
147 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
148 + X? (
149 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
150 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
151 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
152 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
153 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
154 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
155 + )
156 + zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
157 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
158 +"
159 +for card in ${RADEON_CARDS}; do
160 + RDEPEND="${RDEPEND}
161 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
162 + "
163 +done
164 +RDEPEND="${RDEPEND}
165 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
166 +"
167 +
168 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
169 +# we need to *really* make sure we're not pulling one than more slot
170 +# simultaneously.
171 +#
172 +# How to use it:
173 +# 1. List all the working slots (with min versions) in ||, newest first.
174 +# 2. Update the := to specify *max* version, e.g. < 10.
175 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
176 +LLVM_MAX_SLOT="11"
177 +LLVM_DEPSTR="
178 + || (
179 + sys-devel/llvm:11[${MULTILIB_USEDEP}]
180 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
181 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
182 + )
183 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
184 +"
185 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
186 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
187 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
188 +RDEPEND="${RDEPEND}
189 + gallium? (
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 +"
242 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
243 +
244 +DEPEND="${RDEPEND}
245 + valgrind? ( dev-util/valgrind )
246 + X? (
247 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
248 + x11-base/xorg-proto
249 + )
250 +"
251 +BDEPEND="
252 + ${PYTHON_DEPS}
253 + opencl? (
254 + >=sys-devel/gcc-4.6
255 + )
256 + sys-devel/bison
257 + sys-devel/flex
258 + virtual/pkgconfig
259 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
260 +"
261 +
262 +S="${WORKDIR}/${MY_P}"
263 +EGIT_CHECKOUT_DIR=${S}
264 +
265 +QA_WX_LOAD="
266 +x86? (
267 + usr/lib*/libglapi.so.0.0.0
268 + usr/lib*/libGLESv1_CM.so.1.1.0
269 + usr/lib*/libGLESv2.so.2.0.0
270 + usr/lib*/libGL.so.1.2.0
271 + usr/lib*/libOSMesa.so.8.0.0
272 + usr/lib/libGLX_mesa.so.0.0.0
273 +)"
274 +
275 +llvm_check_deps() {
276 + local flags=${MULTILIB_USEDEP}
277 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
278 + then
279 + flags+=",llvm_targets_AMDGPU(-)"
280 + fi
281 +
282 + if use opencl; then
283 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
284 + fi
285 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
286 +}
287 +
288 +pkg_pretend() {
289 + if use vulkan; then
290 + if ! use video_cards_i965 &&
291 + ! use video_cards_iris &&
292 + ! use video_cards_radeonsi &&
293 + ! use video_cards_v3d; then
294 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
295 + fi
296 + fi
297 +
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 + if use osmesa && ! use llvm; then
353 + ewarn "OSMesa will be slow without enabling USE=llvm"
354 + fi
355 +}
356 +
357 +python_check_deps() {
358 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
359 +}
360 +
361 +pkg_setup() {
362 + # warning message for bug 459306
363 + if use llvm && has_version sys-devel/llvm[!debug=]; then
364 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
365 + ewarn "detected! This can cause problems. For details, see bug 459306."
366 + fi
367 +
368 + if use video_cards_i965 ||
369 + use video_cards_iris ||
370 + use video_cards_radeonsi; then
371 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
372 + linux-info_pkg_setup
373 + fi
374 +
375 + if use gallium && use llvm; then
376 + llvm_pkg_setup
377 + fi
378 + python-any-r1_pkg_setup
379 +}
380 +
381 +multilib_src_configure() {
382 + local emesonargs=()
383 +
384 + if use classic; then
385 + # Intel code
386 + dri_driver_enable video_cards_i915 i915
387 + dri_driver_enable video_cards_i965 i965
388 + if ! use video_cards_i915 && \
389 + ! use video_cards_i965; then
390 + dri_driver_enable video_cards_intel i915 i965
391 + fi
392 +
393 + # Nouveau code
394 + dri_driver_enable video_cards_nouveau nouveau
395 +
396 + # ATI code
397 + dri_driver_enable video_cards_r100 r100
398 + dri_driver_enable video_cards_r200 r200
399 + if ! use video_cards_r100 && \
400 + ! use video_cards_r200; then
401 + dri_driver_enable video_cards_radeon r100 r200
402 + fi
403 + fi
404 +
405 + local platforms
406 + use X && platforms+="x11"
407 + use wayland && platforms+=",wayland"
408 + emesonargs+=(-Dplatforms=${platforms#,})
409 +
410 + if use X || use egl; then
411 + emesonargs+=(-Dglvnd=true)
412 + else
413 + emesonargs+=(-Dglvnd=false)
414 + fi
415 +
416 + if use gallium; then
417 + emesonargs+=(
418 + $(meson_feature llvm)
419 + $(meson_feature lm-sensors lmsensors)
420 + $(meson_feature unwind libunwind)
421 + )
422 +
423 + if use video_cards_iris ||
424 + use video_cards_r300 ||
425 + use video_cards_r600 ||
426 + use video_cards_radeonsi ||
427 + use video_cards_nouveau ||
428 + use video_cards_vmware; then
429 + emesonargs+=($(meson_use d3d9 gallium-nine))
430 + else
431 + emesonargs+=(-Dgallium-nine=false)
432 + fi
433 +
434 + if use video_cards_r600 ||
435 + use video_cards_radeonsi ||
436 + use video_cards_nouveau; then
437 + emesonargs+=($(meson_feature vaapi gallium-va))
438 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
439 + else
440 + emesonargs+=(-Dgallium-va=disabled)
441 + fi
442 +
443 + if use video_cards_r300 ||
444 + use video_cards_r600 ||
445 + use video_cards_radeonsi ||
446 + use video_cards_nouveau; then
447 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
448 + else
449 + emesonargs+=(-Dgallium-vdpau=disabled)
450 + fi
451 +
452 + if use video_cards_freedreno ||
453 + use video_cards_nouveau ||
454 + use video_cards_vmware; then
455 + emesonargs+=($(meson_feature xa gallium-xa))
456 + else
457 + emesonargs+=(-Dgallium-xa=disabled)
458 + fi
459 +
460 + if use video_cards_r600 ||
461 + use video_cards_nouveau; then
462 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
463 + else
464 + emesonargs+=(-Dgallium-xvmc=disabled)
465 + fi
466 +
467 + if use video_cards_freedreno ||
468 + use video_cards_lima ||
469 + use video_cards_panfrost ||
470 + use video_cards_v3d ||
471 + use video_cards_vc4 ||
472 + use video_cards_vivante; then
473 + gallium_enable -- kmsro
474 + fi
475 +
476 + gallium_enable -- swrast
477 + gallium_enable video_cards_lima lima
478 + gallium_enable video_cards_panfrost panfrost
479 + gallium_enable video_cards_v3d v3d
480 + gallium_enable video_cards_vc4 vc4
481 + gallium_enable video_cards_vivante etnaviv
482 + gallium_enable video_cards_vmware svga
483 + gallium_enable video_cards_nouveau nouveau
484 + gallium_enable zink zink
485 +
486 + # Only one i915 driver (classic vs gallium). Default to classic.
487 + if ! use classic; then
488 + gallium_enable video_cards_i915 i915
489 + if ! use video_cards_i915 && \
490 + ! use video_cards_i965; then
491 + gallium_enable video_cards_intel i915
492 + fi
493 + fi
494 +
495 + gallium_enable video_cards_iris iris
496 +
497 + gallium_enable video_cards_r300 r300
498 + gallium_enable video_cards_r600 r600
499 + gallium_enable video_cards_radeonsi radeonsi
500 + if ! use video_cards_r300 && \
501 + ! use video_cards_r600; then
502 + gallium_enable video_cards_radeon r300 r600
503 + fi
504 +
505 + gallium_enable video_cards_freedreno freedreno
506 + gallium_enable video_cards_virgl virgl
507 +
508 + # opencl stuff
509 + emesonargs+=(
510 + -Dgallium-opencl="$(usex opencl icd disabled)"
511 + )
512 + fi
513 +
514 + if use vulkan; then
515 + vulkan_enable video_cards_i965 intel
516 + vulkan_enable video_cards_iris intel
517 + vulkan_enable video_cards_radeonsi amd
518 + vulkan_enable video_cards_v3d broadcom
519 + fi
520 +
521 + driver_list() {
522 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
523 + echo "${drivers//$'\n'/,}"
524 + }
525 +
526 + emesonargs+=(
527 + $(meson_use test build-tests)
528 + -Dglx=$(usex X dri disabled)
529 + -Dshared-glapi=enabled
530 + $(meson_feature dri3)
531 + $(meson_feature egl)
532 + $(meson_feature gbm)
533 + $(meson_feature gles1)
534 + $(meson_feature gles2)
535 + $(meson_use osmesa)
536 + $(meson_use selinux)
537 + $(meson_feature zstd)
538 + -Dvalgrind=$(usex valgrind auto false)
539 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
540 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
541 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
542 + $(meson_use vulkan vulkan-device-select-layer)
543 + $(meson_use vulkan-overlay vulkan-overlay-layer)
544 + --buildtype $(usex debug debug plain)
545 + -Db_ndebug=$(usex debug false true)
546 + )
547 + meson_src_configure
548 +}
549 +
550 +multilib_src_compile() {
551 + meson_src_compile
552 +}
553 +
554 +multilib_src_install() {
555 + meson_src_install
556 +}
557 +
558 +multilib_src_install_all() {
559 + einstalldocs
560 +}
561 +
562 +multilib_src_test() {
563 + meson_src_test -t 100
564 +}
565 +
566 +# $1 - VIDEO_CARDS flag (check skipped for "--")
567 +# other args - names of DRI drivers to enable
568 +dri_driver_enable() {
569 + if [[ $1 == -- ]] || use $1; then
570 + shift
571 + DRI_DRIVERS+=("$@")
572 + fi
573 +}
574 +
575 +gallium_enable() {
576 + if [[ $1 == -- ]] || use $1; then
577 + shift
578 + GALLIUM_DRIVERS+=("$@")
579 + fi
580 +}
581 +
582 +vulkan_enable() {
583 + if [[ $1 == -- ]] || use $1; then
584 + shift
585 + VULKAN_DRIVERS+=("$@")
586 + fi
587 +}