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: Mon, 07 Feb 2022 19:03:38
Message-Id: 1644260600.9646fa8bb4e2e7f4d1da0964619b3afb9f512855.mattst88@gentoo
1 commit: 9646fa8bb4e2e7f4d1da0964619b3afb9f512855
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 7 19:00:13 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 7 19:03:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9646fa8b
7
8 media-libs/mesa: Drop old versions
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 4 -
13 media-libs/mesa/mesa-21.2.6.ebuild | 560 -------------------------------------
14 media-libs/mesa/mesa-21.3.2.ebuild | 552 ------------------------------------
15 media-libs/mesa/mesa-21.3.3.ebuild | 552 ------------------------------------
16 media-libs/mesa/mesa-21.3.4.ebuild | 552 ------------------------------------
17 5 files changed, 2220 deletions(-)
18
19 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
20 index d037cd88ca96..5f88a3f537e4 100644
21 --- a/media-libs/mesa/Manifest
22 +++ b/media-libs/mesa/Manifest
23 @@ -1,6 +1,2 @@
24 -DIST mesa-21.2.6.tar.xz 15868208 BLAKE2B aaa6447a2f5a472c2ee2b7d6b12effb79d02804684358fd233aa00bda945c66efa3850931cd9114c51ddd492033b9f66372380395540a11fe40229edfe7ee125 SHA512 e65d77e2609cba85bd2cdbd4ba2072729c1556a43defdd24a91e708e3223f84b23657e63a91b16c5729684ea12fe31f45bae88294c572e057f2981a5d6c0f5a0
25 -DIST mesa-21.3.2.tar.xz 16466760 BLAKE2B 549d37d365b477b3f991ef0602c94b6df826e32dfac8bf76c19157e01ffca84ce1f0fd8311a04bbdc1a6804f562a075945e2662083a3a663ba78fae0d4853ef6 SHA512 35c510cbab70be43bc207720a12fe85b0c010fafa147238f2c22dd873967278f187ee7675a662882ead3598305f1f37804567deb93022a692ca259f563abfdac
26 -DIST mesa-21.3.3.tar.xz 16476044 BLAKE2B 04ae7983c82fbd6dafb405ee717df2406607e4fb1f95996abe5390cb1cbdb6385fb8b00ac9982d1bc7dd10fc18eeb1bc08d7147dc00969bd3bcb347a53ca77ec SHA512 0263d75435f8c16d40eba3eae29bf372e8994816718deec153c582a17c4dd6ef1c67b3236ed31e63f98bf4e1089fac5cfafae9fb84d3e1fa919b274f43e7e673
27 -DIST mesa-21.3.4.tar.xz 16497248 BLAKE2B 3fe2543bb6286a0d84a247785dbb4b5dd6df905eab748a89854589008d9db5aae6c52e473c58cff8d03694d46d3ce2a2680fddc8c978f898dc9bcdec02ca9b6b SHA512 7aeea3dba0d39f4ac9f23c54aa0e6853d48000f50c4dd484618c28debe705cdd765ae8fafb5ddea0773976f7189849d9128be3f2282fea74394b59019cb786b9
28 DIST mesa-21.3.5.tar.xz 16521664 BLAKE2B 4dcf2e40103233332724289434998149c41a86fdaef622c2fc92065d1708a0635ed5a179e5fc8e51d82efe794f4f99c7de734ed61a8804b5e94aecb071656795 SHA512 417d1787f8177567f0c547dde3e24212f7497f2fe7cdaa945fe998cd61ec0e9eb9388feb444e377c4fd8794b056af02aac28d1bbfb9527844391ba49e6893933
29 DIST mesa-22.0.0-rc1.tar.xz 15509952 BLAKE2B 06171bb1fcc67811cb27526b3ae3677315e8f581f4db23f3464aa8b1bb065304782e0234c2b86daf076803a92dd3066217fe1f1f21faf7c85e34c4eb7a6f0027 SHA512 6f8d961c7cde5cbd32bc40bc3dc3d8e9b0cea16dc668d8a2b078c61179b0e95725c719c0f0e8994c43591599724b754646050c68777fd4c97ad4ec5a0ee4a420
30
31 diff --git a/media-libs/mesa/mesa-21.2.6.ebuild b/media-libs/mesa/mesa-21.2.6.ebuild
32 deleted file mode 100644
33 index 922ef8bc5f58..000000000000
34 --- a/media-libs/mesa/mesa-21.2.6.ebuild
35 +++ /dev/null
36 @@ -1,560 +0,0 @@
37 -# Copyright 1999-2021 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=7
41 -
42 -PYTHON_COMPAT=( python3_{7..10} )
43 -
44 -inherit llvm meson-multilib python-any-r1 linux-info
45 -
46 -MY_P="${P/_/-}"
47 -
48 -DESCRIPTION="OpenGL-like graphic library for Linux"
49 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
50 -
51 -if [[ ${PV} == 9999 ]]; then
52 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
53 - inherit git-r3
54 -else
55 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
56 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
57 -fi
58 -
59 -LICENSE="MIT"
60 -SLOT="0"
61 -RESTRICT="
62 - !test? ( test )
63 -"
64 -
65 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
66 -VIDEO_CARDS="${RADEON_CARDS} crocus freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
67 -for card in ${VIDEO_CARDS}; do
68 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
69 -done
70 -
71 -IUSE="${IUSE_VIDEO_CARDS}
72 - +classic cpu_flags_x86_sse2 d3d9 debug +egl +gallium +gbm gles1 +gles2 +llvm
73 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
74 - vulkan-overlay wayland +X xa xvmc zink +zstd"
75 -
76 -REQUIRED_USE="
77 - d3d9? ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
78 - gles1? ( egl )
79 - gles2? ( egl )
80 - osmesa? ( gallium )
81 - vulkan? ( video_cards_radeonsi? ( llvm ) )
82 - vulkan-overlay? ( vulkan )
83 - wayland? ( egl gbm )
84 - video_cards_crocus? ( gallium )
85 - video_cards_freedreno? ( gallium )
86 - video_cards_intel? ( classic )
87 - video_cards_i915? ( || ( classic gallium ) )
88 - video_cards_i965? ( classic )
89 - video_cards_iris? ( gallium )
90 - video_cards_lima? ( gallium )
91 - video_cards_nouveau? ( || ( classic gallium ) )
92 - video_cards_panfrost? ( gallium )
93 - video_cards_radeon? ( || ( classic gallium )
94 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
95 - video_cards_r100? ( classic )
96 - video_cards_r200? ( classic )
97 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
98 - video_cards_r600? ( gallium )
99 - video_cards_radeonsi? ( gallium llvm )
100 - video_cards_v3d? ( gallium )
101 - video_cards_vc4? ( gallium )
102 - video_cards_virgl? ( gallium )
103 - video_cards_vivante? ( gallium gbm )
104 - video_cards_vmware? ( gallium )
105 - xa? ( X )
106 - xvmc? ( X )
107 - zink? ( gallium vulkan )
108 -"
109 -
110 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.107"
111 -RDEPEND="
112 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
113 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
114 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
115 - gallium? (
116 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
117 - llvm? (
118 - video_cards_radeonsi? (
119 - virtual/libelf:0=[${MULTILIB_USEDEP}]
120 - )
121 - video_cards_r600? (
122 - virtual/libelf:0=[${MULTILIB_USEDEP}]
123 - )
124 - video_cards_radeon? (
125 - virtual/libelf:0=[${MULTILIB_USEDEP}]
126 - )
127 - )
128 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
129 - opencl? (
130 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
131 - dev-libs/libclc
132 - virtual/libelf:0=[${MULTILIB_USEDEP}]
133 - )
134 - vaapi? (
135 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
136 - )
137 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
138 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
139 - )
140 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
141 - wayland? (
142 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
143 - >=dev-libs/wayland-protocols-1.8
144 - )
145 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
146 - video_cards_intel? (
147 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
148 - )
149 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
150 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
151 - X? (
152 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
153 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
154 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
155 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
156 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
157 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
158 - )
159 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
160 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
161 -"
162 -for card in ${RADEON_CARDS}; do
163 - RDEPEND="${RDEPEND}
164 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
165 - "
166 -done
167 -RDEPEND="${RDEPEND}
168 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
169 -"
170 -
171 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
172 -# we need to *really* make sure we're not pulling one than more slot
173 -# simultaneously.
174 -#
175 -# How to use it:
176 -# 1. List all the working slots (with min versions) in ||, newest first.
177 -# 2. Update the := to specify *max* version, e.g. < 10.
178 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
179 -LLVM_MAX_SLOT="13"
180 -LLVM_DEPSTR="
181 - || (
182 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
183 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
184 - sys-devel/llvm:11[${MULTILIB_USEDEP}]
185 - )
186 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
187 -"
188 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
189 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
190 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
191 -RDEPEND="${RDEPEND}
192 - gallium? (
193 - llvm? (
194 - opencl? (
195 - video_cards_r600? (
196 - ${CLANG_DEPSTR_AMDGPU}
197 - )
198 - !video_cards_r600? (
199 - video_cards_radeonsi? (
200 - ${CLANG_DEPSTR_AMDGPU}
201 - )
202 - )
203 - !video_cards_r600? (
204 - !video_cards_radeonsi? (
205 - video_cards_radeon? (
206 - ${CLANG_DEPSTR_AMDGPU}
207 - )
208 - )
209 - )
210 - !video_cards_r600? (
211 - !video_cards_radeon? (
212 - !video_cards_radeonsi? (
213 - ${CLANG_DEPSTR}
214 - )
215 - )
216 - )
217 - )
218 - !opencl? (
219 - video_cards_r600? (
220 - ${LLVM_DEPSTR_AMDGPU}
221 - )
222 - !video_cards_r600? (
223 - video_cards_radeonsi? (
224 - ${LLVM_DEPSTR_AMDGPU}
225 - )
226 - )
227 - !video_cards_r600? (
228 - !video_cards_radeonsi? (
229 - video_cards_radeon? (
230 - ${LLVM_DEPSTR_AMDGPU}
231 - )
232 - )
233 - )
234 - !video_cards_r600? (
235 - !video_cards_radeon? (
236 - !video_cards_radeonsi? (
237 - ${LLVM_DEPSTR}
238 - )
239 - )
240 - )
241 - )
242 - )
243 - )
244 -"
245 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
246 -
247 -DEPEND="${RDEPEND}
248 - valgrind? ( dev-util/valgrind )
249 - X? (
250 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
251 - x11-base/xorg-proto
252 - )
253 -"
254 -BDEPEND="
255 - ${PYTHON_DEPS}
256 - opencl? (
257 - >=sys-devel/gcc-4.6
258 - )
259 - sys-devel/bison
260 - sys-devel/flex
261 - virtual/pkgconfig
262 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
263 - wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
264 -"
265 -
266 -S="${WORKDIR}/${MY_P}"
267 -EGIT_CHECKOUT_DIR=${S}
268 -
269 -QA_WX_LOAD="
270 -x86? (
271 - usr/lib*/libglapi.so.0.0.0
272 - usr/lib*/libGLESv1_CM.so.1.1.0
273 - usr/lib*/libGLESv2.so.2.0.0
274 - usr/lib*/libGL.so.1.2.0
275 - usr/lib*/libOSMesa.so.8.0.0
276 - usr/lib/libGLX_mesa.so.0.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 vulkan; then
294 - if ! use video_cards_freedreno &&
295 - ! use video_cards_i965 &&
296 - ! use video_cards_iris &&
297 - ! use video_cards_radeonsi &&
298 - ! use video_cards_v3d; then
299 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, i965, iris, radeonsi, or v3d"
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 - if use osmesa && ! use llvm; then
358 - ewarn "OSMesa will be slow without enabling USE=llvm"
359 - fi
360 -}
361 -
362 -python_check_deps() {
363 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
364 -}
365 -
366 -pkg_setup() {
367 - # warning message for bug 459306
368 - if use llvm && has_version sys-devel/llvm[!debug=]; then
369 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
370 - ewarn "detected! This can cause problems. For details, see bug 459306."
371 - fi
372 -
373 - if use video_cards_i965 ||
374 - use video_cards_iris ||
375 - use video_cards_radeonsi; then
376 - if kernel_is -ge 5 11 3; then
377 - CONFIG_CHECK="~KCMP"
378 - elif kernel_is -ge 5 11; then
379 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
380 - elif kernel_is -ge 5 10 20; then
381 - CONFIG_CHECK="~KCMP"
382 - else
383 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
384 - fi
385 - linux-info_pkg_setup
386 - fi
387 -
388 - if use gallium && use llvm; then
389 - llvm_pkg_setup
390 - fi
391 - python-any-r1_pkg_setup
392 -}
393 -
394 -multilib_src_configure() {
395 - local emesonargs=()
396 -
397 - if use classic; then
398 - # Intel code
399 - dri_driver_enable video_cards_i915 i915
400 - dri_driver_enable video_cards_i965 i965
401 - if ! use video_cards_i915 && \
402 - ! use video_cards_i965; then
403 - dri_driver_enable video_cards_intel i915 i965
404 - fi
405 -
406 - # Nouveau code
407 - dri_driver_enable video_cards_nouveau nouveau
408 -
409 - # ATI code
410 - dri_driver_enable video_cards_r100 r100
411 - dri_driver_enable video_cards_r200 r200
412 - if ! use video_cards_r100 && \
413 - ! use video_cards_r200; then
414 - dri_driver_enable video_cards_radeon r100 r200
415 - fi
416 - fi
417 -
418 - local platforms
419 - use X && platforms+="x11"
420 - use wayland && platforms+=",wayland"
421 - emesonargs+=(-Dplatforms=${platforms#,})
422 -
423 - if use X || use egl; then
424 - emesonargs+=(-Dglvnd=true)
425 - else
426 - emesonargs+=(-Dglvnd=false)
427 - fi
428 -
429 - if use gallium; then
430 - emesonargs+=(
431 - $(meson_feature llvm)
432 - $(meson_feature lm-sensors lmsensors)
433 - $(meson_feature unwind libunwind)
434 - )
435 -
436 - if use video_cards_iris ||
437 - use video_cards_r300 ||
438 - use video_cards_r600 ||
439 - use video_cards_radeonsi ||
440 - use video_cards_nouveau ||
441 - use video_cards_vmware; then
442 - emesonargs+=($(meson_use d3d9 gallium-nine))
443 - else
444 - emesonargs+=(-Dgallium-nine=false)
445 - fi
446 -
447 - if use video_cards_r600 ||
448 - use video_cards_radeonsi ||
449 - use video_cards_nouveau; then
450 - emesonargs+=($(meson_feature vaapi gallium-va))
451 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
452 - else
453 - emesonargs+=(-Dgallium-va=disabled)
454 - fi
455 -
456 - if use video_cards_r300 ||
457 - use video_cards_r600 ||
458 - use video_cards_radeonsi ||
459 - use video_cards_nouveau; then
460 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
461 - else
462 - emesonargs+=(-Dgallium-vdpau=disabled)
463 - fi
464 -
465 - if use video_cards_freedreno ||
466 - use video_cards_nouveau ||
467 - use video_cards_vmware; then
468 - emesonargs+=($(meson_feature xa gallium-xa))
469 - else
470 - emesonargs+=(-Dgallium-xa=disabled)
471 - fi
472 -
473 - if use video_cards_r600 ||
474 - use video_cards_nouveau; then
475 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
476 - else
477 - emesonargs+=(-Dgallium-xvmc=disabled)
478 - fi
479 -
480 - if use video_cards_freedreno ||
481 - use video_cards_lima ||
482 - use video_cards_panfrost ||
483 - use video_cards_v3d ||
484 - use video_cards_vc4 ||
485 - use video_cards_vivante; then
486 - gallium_enable -- kmsro
487 - fi
488 -
489 - gallium_enable -- swrast
490 - gallium_enable video_cards_lima lima
491 - gallium_enable video_cards_panfrost panfrost
492 - gallium_enable video_cards_v3d v3d
493 - gallium_enable video_cards_vc4 vc4
494 - gallium_enable video_cards_vivante etnaviv
495 - gallium_enable video_cards_vmware svga
496 - gallium_enable video_cards_nouveau nouveau
497 - gallium_enable zink zink
498 -
499 - # Only one i915 driver (classic vs gallium). Default to classic.
500 - if ! use classic; then
501 - gallium_enable video_cards_i915 i915
502 - if ! use video_cards_i915 && \
503 - ! use video_cards_i965; then
504 - gallium_enable video_cards_intel i915
505 - fi
506 - fi
507 -
508 - gallium_enable video_cards_crocus crocus
509 - gallium_enable video_cards_iris iris
510 -
511 - gallium_enable video_cards_r300 r300
512 - gallium_enable video_cards_r600 r600
513 - gallium_enable video_cards_radeonsi radeonsi
514 - if ! use video_cards_r300 && \
515 - ! use video_cards_r600; then
516 - gallium_enable video_cards_radeon r300 r600
517 - fi
518 -
519 - gallium_enable video_cards_freedreno freedreno
520 - gallium_enable video_cards_virgl virgl
521 -
522 - # opencl stuff
523 - emesonargs+=(
524 - -Dgallium-opencl="$(usex opencl icd disabled)"
525 - )
526 - fi
527 -
528 - if use vulkan; then
529 - vulkan_enable video_cards_freedreno freedreno
530 - vulkan_enable video_cards_i965 intel
531 - vulkan_enable video_cards_iris intel
532 - vulkan_enable video_cards_radeonsi amd
533 - vulkan_enable video_cards_v3d broadcom
534 - fi
535 -
536 - driver_list() {
537 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
538 - echo "${drivers//$'\n'/,}"
539 - }
540 -
541 - local vulkan_layers
542 - use vulkan && vulkan_layers+="device-select"
543 - use vulkan-overlay && vulkan_layers+=",overlay"
544 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
545 -
546 - emesonargs+=(
547 - $(meson_use test build-tests)
548 - -Dglx=$(usex X dri disabled)
549 - -Dshared-glapi=enabled
550 - -Ddri3=enabled
551 - $(meson_feature egl)
552 - $(meson_feature gbm)
553 - $(meson_feature gles1)
554 - $(meson_feature gles2)
555 - $(meson_use osmesa)
556 - $(meson_use selinux)
557 - $(meson_feature zstd)
558 - $(meson_use video_cards_crocus prefer-crocus)
559 - $(meson_use video_cards_iris prefer-iris)
560 - $(meson_use cpu_flags_x86_sse2 sse2)
561 - -Dvalgrind=$(usex valgrind auto disabled)
562 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
563 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
564 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
565 - --buildtype $(usex debug debug plain)
566 - -Db_ndebug=$(usex debug false true)
567 - )
568 - meson_src_configure
569 -}
570 -
571 -multilib_src_test() {
572 - meson_src_test -t 100
573 -}
574 -
575 -# $1 - VIDEO_CARDS flag (check skipped for "--")
576 -# other args - names of DRI drivers to enable
577 -dri_driver_enable() {
578 - if [[ $1 == -- ]] || use $1; then
579 - shift
580 - DRI_DRIVERS+=("$@")
581 - fi
582 -}
583 -
584 -gallium_enable() {
585 - if [[ $1 == -- ]] || use $1; then
586 - shift
587 - GALLIUM_DRIVERS+=("$@")
588 - fi
589 -}
590 -
591 -vulkan_enable() {
592 - if [[ $1 == -- ]] || use $1; then
593 - shift
594 - VULKAN_DRIVERS+=("$@")
595 - fi
596 -}
597
598 diff --git a/media-libs/mesa/mesa-21.3.2.ebuild b/media-libs/mesa/mesa-21.3.2.ebuild
599 deleted file mode 100644
600 index 4fb71e92fcad..000000000000
601 --- a/media-libs/mesa/mesa-21.3.2.ebuild
602 +++ /dev/null
603 @@ -1,552 +0,0 @@
604 -# Copyright 1999-2021 Gentoo Authors
605 -# Distributed under the terms of the GNU General Public License v2
606 -
607 -EAPI=7
608 -
609 -PYTHON_COMPAT=( python3_{7..10} )
610 -
611 -inherit llvm meson-multilib python-any-r1 linux-info
612 -
613 -MY_P="${P/_/-}"
614 -
615 -DESCRIPTION="OpenGL-like graphic library for Linux"
616 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
617 -
618 -if [[ ${PV} == 9999 ]]; then
619 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
620 - inherit git-r3
621 -else
622 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
623 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
624 -fi
625 -
626 -LICENSE="MIT"
627 -SLOT="0"
628 -RESTRICT="
629 - !test? ( test )
630 -"
631 -
632 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
633 -VIDEO_CARDS="${RADEON_CARDS} crocus freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
634 -for card in ${VIDEO_CARDS}; do
635 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
636 -done
637 -
638 -IUSE="${IUSE_VIDEO_CARDS}
639 - +classic cpu_flags_x86_sse2 d3d9 debug +gallium gles1 +gles2 +llvm
640 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
641 - vulkan-overlay wayland +X xa xvmc zink +zstd"
642 -
643 -REQUIRED_USE="
644 - d3d9? ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
645 - osmesa? ( gallium )
646 - vulkan? ( video_cards_radeonsi? ( llvm ) )
647 - vulkan-overlay? ( vulkan )
648 - video_cards_crocus? ( gallium )
649 - video_cards_freedreno? ( gallium )
650 - video_cards_intel? ( classic )
651 - video_cards_i915? ( || ( classic gallium ) )
652 - video_cards_i965? ( classic )
653 - video_cards_iris? ( gallium )
654 - video_cards_lima? ( gallium )
655 - video_cards_nouveau? ( || ( classic gallium ) )
656 - video_cards_panfrost? ( gallium )
657 - video_cards_radeon? ( || ( classic gallium )
658 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
659 - video_cards_r100? ( classic )
660 - video_cards_r200? ( classic )
661 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
662 - video_cards_r600? ( gallium )
663 - video_cards_radeonsi? ( gallium llvm )
664 - video_cards_v3d? ( gallium )
665 - video_cards_vc4? ( gallium )
666 - video_cards_virgl? ( gallium )
667 - video_cards_vivante? ( gallium )
668 - video_cards_vmware? ( gallium )
669 - xa? ( X )
670 - xvmc? ( X )
671 - zink? ( gallium vulkan )
672 -"
673 -
674 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.107"
675 -RDEPEND="
676 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
677 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
678 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
679 - gallium? (
680 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
681 - llvm? (
682 - video_cards_radeonsi? (
683 - virtual/libelf:0=[${MULTILIB_USEDEP}]
684 - )
685 - video_cards_r600? (
686 - virtual/libelf:0=[${MULTILIB_USEDEP}]
687 - )
688 - video_cards_radeon? (
689 - virtual/libelf:0=[${MULTILIB_USEDEP}]
690 - )
691 - )
692 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
693 - opencl? (
694 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
695 - dev-libs/libclc
696 - virtual/libelf:0=[${MULTILIB_USEDEP}]
697 - )
698 - vaapi? (
699 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
700 - )
701 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
702 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
703 - )
704 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
705 - wayland? (
706 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
707 - >=dev-libs/wayland-protocols-1.8
708 - )
709 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
710 - video_cards_intel? (
711 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
712 - )
713 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
714 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
715 - X? (
716 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
717 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
718 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
719 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
720 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
721 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
722 - )
723 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
724 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
725 -"
726 -for card in ${RADEON_CARDS}; do
727 - RDEPEND="${RDEPEND}
728 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
729 - "
730 -done
731 -RDEPEND="${RDEPEND}
732 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
733 -"
734 -
735 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
736 -# we need to *really* make sure we're not pulling one than more slot
737 -# simultaneously.
738 -#
739 -# How to use it:
740 -# 1. List all the working slots (with min versions) in ||, newest first.
741 -# 2. Update the := to specify *max* version, e.g. < 10.
742 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
743 -LLVM_MAX_SLOT="13"
744 -LLVM_DEPSTR="
745 - || (
746 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
747 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
748 - sys-devel/llvm:11[${MULTILIB_USEDEP}]
749 - )
750 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
751 -"
752 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
753 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
754 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
755 -RDEPEND="${RDEPEND}
756 - gallium? (
757 - llvm? (
758 - opencl? (
759 - video_cards_r600? (
760 - ${CLANG_DEPSTR_AMDGPU}
761 - )
762 - !video_cards_r600? (
763 - video_cards_radeonsi? (
764 - ${CLANG_DEPSTR_AMDGPU}
765 - )
766 - )
767 - !video_cards_r600? (
768 - !video_cards_radeonsi? (
769 - video_cards_radeon? (
770 - ${CLANG_DEPSTR_AMDGPU}
771 - )
772 - )
773 - )
774 - !video_cards_r600? (
775 - !video_cards_radeon? (
776 - !video_cards_radeonsi? (
777 - ${CLANG_DEPSTR}
778 - )
779 - )
780 - )
781 - )
782 - !opencl? (
783 - video_cards_r600? (
784 - ${LLVM_DEPSTR_AMDGPU}
785 - )
786 - !video_cards_r600? (
787 - video_cards_radeonsi? (
788 - ${LLVM_DEPSTR_AMDGPU}
789 - )
790 - )
791 - !video_cards_r600? (
792 - !video_cards_radeonsi? (
793 - video_cards_radeon? (
794 - ${LLVM_DEPSTR_AMDGPU}
795 - )
796 - )
797 - )
798 - !video_cards_r600? (
799 - !video_cards_radeon? (
800 - !video_cards_radeonsi? (
801 - ${LLVM_DEPSTR}
802 - )
803 - )
804 - )
805 - )
806 - )
807 - )
808 -"
809 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
810 -
811 -DEPEND="${RDEPEND}
812 - valgrind? ( dev-util/valgrind )
813 - X? (
814 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
815 - x11-base/xorg-proto
816 - )
817 -"
818 -BDEPEND="
819 - ${PYTHON_DEPS}
820 - opencl? (
821 - >=sys-devel/gcc-4.6
822 - )
823 - sys-devel/bison
824 - sys-devel/flex
825 - virtual/pkgconfig
826 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
827 - wayland? ( dev-util/wayland-scanner )
828 -"
829 -
830 -S="${WORKDIR}/${MY_P}"
831 -EGIT_CHECKOUT_DIR=${S}
832 -
833 -QA_WX_LOAD="
834 -x86? (
835 - usr/lib*/libglapi.so.0.0.0
836 - usr/lib*/libGLESv1_CM.so.1.1.0
837 - usr/lib*/libGLESv2.so.2.0.0
838 - usr/lib*/libGL.so.1.2.0
839 - usr/lib*/libOSMesa.so.8.0.0
840 - usr/lib/libGLX_mesa.so.0.0.0
841 -)"
842 -
843 -llvm_check_deps() {
844 - local flags=${MULTILIB_USEDEP}
845 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
846 - then
847 - flags+=",llvm_targets_AMDGPU(-)"
848 - fi
849 -
850 - if use opencl; then
851 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
852 - fi
853 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
854 -}
855 -
856 -pkg_pretend() {
857 - if use vulkan; then
858 - if ! use video_cards_freedreno &&
859 - ! use video_cards_i965 &&
860 - ! use video_cards_iris &&
861 - ! use video_cards_radeonsi &&
862 - ! use video_cards_v3d; then
863 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, i965, iris, radeonsi, or v3d"
864 - fi
865 - fi
866 -
867 - if use opencl; then
868 - if ! use video_cards_r600 &&
869 - ! use video_cards_radeonsi; then
870 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
871 - fi
872 - fi
873 -
874 - if use vaapi; then
875 - if ! use video_cards_r600 &&
876 - ! use video_cards_radeonsi &&
877 - ! use video_cards_nouveau; then
878 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
879 - fi
880 - fi
881 -
882 - if use vdpau; then
883 - if ! use video_cards_r300 &&
884 - ! use video_cards_r600 &&
885 - ! use video_cards_radeonsi &&
886 - ! use video_cards_nouveau; then
887 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
888 - fi
889 - fi
890 -
891 - if use xa; then
892 - if ! use video_cards_freedreno &&
893 - ! use video_cards_nouveau &&
894 - ! use video_cards_vmware; then
895 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
896 - fi
897 - fi
898 -
899 - if use xvmc; then
900 - if ! use video_cards_r600 &&
901 - ! use video_cards_nouveau; then
902 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
903 - fi
904 - fi
905 -
906 - if ! use gallium; then
907 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
908 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
909 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
910 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
911 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
912 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
913 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
914 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
915 - fi
916 -
917 - if ! use llvm; then
918 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
919 - fi
920 -
921 - if use osmesa && ! use llvm; then
922 - ewarn "OSMesa will be slow without enabling USE=llvm"
923 - fi
924 -}
925 -
926 -python_check_deps() {
927 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
928 -}
929 -
930 -pkg_setup() {
931 - # warning message for bug 459306
932 - if use llvm && has_version sys-devel/llvm[!debug=]; then
933 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
934 - ewarn "detected! This can cause problems. For details, see bug 459306."
935 - fi
936 -
937 - if use video_cards_i965 ||
938 - use video_cards_iris ||
939 - use video_cards_radeonsi; then
940 - if kernel_is -ge 5 11 3; then
941 - CONFIG_CHECK="~KCMP"
942 - elif kernel_is -ge 5 11; then
943 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
944 - elif kernel_is -ge 5 10 20; then
945 - CONFIG_CHECK="~KCMP"
946 - else
947 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
948 - fi
949 - linux-info_pkg_setup
950 - fi
951 -
952 - if use gallium && use llvm; then
953 - llvm_pkg_setup
954 - fi
955 - python-any-r1_pkg_setup
956 -}
957 -
958 -multilib_src_configure() {
959 - local emesonargs=()
960 -
961 - if use classic; then
962 - # Intel code
963 - dri_driver_enable video_cards_i915 i915
964 - dri_driver_enable video_cards_i965 i965
965 - if ! use video_cards_i915 && \
966 - ! use video_cards_i965; then
967 - dri_driver_enable video_cards_intel i915 i965
968 - fi
969 -
970 - # Nouveau code
971 - dri_driver_enable video_cards_nouveau nouveau
972 -
973 - # ATI code
974 - dri_driver_enable video_cards_r100 r100
975 - dri_driver_enable video_cards_r200 r200
976 - if ! use video_cards_r100 && \
977 - ! use video_cards_r200; then
978 - dri_driver_enable video_cards_radeon r100 r200
979 - fi
980 - fi
981 -
982 - local platforms
983 - use X && platforms+="x11"
984 - use wayland && platforms+=",wayland"
985 - emesonargs+=(-Dplatforms=${platforms#,})
986 -
987 - if use gallium; then
988 - emesonargs+=(
989 - $(meson_feature llvm)
990 - $(meson_feature lm-sensors lmsensors)
991 - $(meson_feature unwind libunwind)
992 - )
993 -
994 - if use video_cards_iris ||
995 - use video_cards_r300 ||
996 - use video_cards_r600 ||
997 - use video_cards_radeonsi ||
998 - use video_cards_nouveau ||
999 - use video_cards_vmware; then
1000 - emesonargs+=($(meson_use d3d9 gallium-nine))
1001 - else
1002 - emesonargs+=(-Dgallium-nine=false)
1003 - fi
1004 -
1005 - if use video_cards_r600 ||
1006 - use video_cards_radeonsi ||
1007 - use video_cards_nouveau; then
1008 - emesonargs+=($(meson_feature vaapi gallium-va))
1009 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1010 - else
1011 - emesonargs+=(-Dgallium-va=disabled)
1012 - fi
1013 -
1014 - if use video_cards_r300 ||
1015 - use video_cards_r600 ||
1016 - use video_cards_radeonsi ||
1017 - use video_cards_nouveau; then
1018 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
1019 - else
1020 - emesonargs+=(-Dgallium-vdpau=disabled)
1021 - fi
1022 -
1023 - if use video_cards_freedreno ||
1024 - use video_cards_nouveau ||
1025 - use video_cards_vmware; then
1026 - emesonargs+=($(meson_feature xa gallium-xa))
1027 - else
1028 - emesonargs+=(-Dgallium-xa=disabled)
1029 - fi
1030 -
1031 - if use video_cards_r600 ||
1032 - use video_cards_nouveau; then
1033 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
1034 - else
1035 - emesonargs+=(-Dgallium-xvmc=disabled)
1036 - fi
1037 -
1038 - if use video_cards_freedreno ||
1039 - use video_cards_lima ||
1040 - use video_cards_panfrost ||
1041 - use video_cards_v3d ||
1042 - use video_cards_vc4 ||
1043 - use video_cards_vivante; then
1044 - gallium_enable -- kmsro
1045 - fi
1046 -
1047 - gallium_enable -- swrast
1048 - gallium_enable video_cards_lima lima
1049 - gallium_enable video_cards_panfrost panfrost
1050 - gallium_enable video_cards_v3d v3d
1051 - gallium_enable video_cards_vc4 vc4
1052 - gallium_enable video_cards_vivante etnaviv
1053 - gallium_enable video_cards_vmware svga
1054 - gallium_enable video_cards_nouveau nouveau
1055 - gallium_enable zink zink
1056 -
1057 - # Only one i915 driver (classic vs gallium). Default to classic.
1058 - if ! use classic; then
1059 - gallium_enable video_cards_i915 i915
1060 - if ! use video_cards_i915 && \
1061 - ! use video_cards_i965; then
1062 - gallium_enable video_cards_intel i915
1063 - fi
1064 - fi
1065 -
1066 - gallium_enable video_cards_crocus crocus
1067 - gallium_enable video_cards_iris iris
1068 -
1069 - gallium_enable video_cards_r300 r300
1070 - gallium_enable video_cards_r600 r600
1071 - gallium_enable video_cards_radeonsi radeonsi
1072 - if ! use video_cards_r300 && \
1073 - ! use video_cards_r600; then
1074 - gallium_enable video_cards_radeon r300 r600
1075 - fi
1076 -
1077 - gallium_enable video_cards_freedreno freedreno
1078 - gallium_enable video_cards_virgl virgl
1079 -
1080 - # opencl stuff
1081 - emesonargs+=(
1082 - -Dgallium-opencl="$(usex opencl icd disabled)"
1083 - )
1084 - fi
1085 -
1086 - if use vulkan; then
1087 - vulkan_enable video_cards_freedreno freedreno
1088 - vulkan_enable video_cards_i965 intel
1089 - vulkan_enable video_cards_iris intel
1090 - vulkan_enable video_cards_radeonsi amd
1091 - vulkan_enable video_cards_v3d broadcom
1092 - fi
1093 -
1094 - driver_list() {
1095 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1096 - echo "${drivers//$'\n'/,}"
1097 - }
1098 -
1099 - local vulkan_layers
1100 - use vulkan && vulkan_layers+="device-select"
1101 - use vulkan-overlay && vulkan_layers+=",overlay"
1102 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
1103 -
1104 - emesonargs+=(
1105 - $(meson_use test build-tests)
1106 - -Dglx=$(usex X dri disabled)
1107 - -Dshared-glapi=enabled
1108 - -Ddri3=enabled
1109 - -Degl=true
1110 - -Dgbm=true
1111 - -Dglvnd=true
1112 - $(meson_feature gles1)
1113 - $(meson_feature gles2)
1114 - $(meson_use osmesa)
1115 - $(meson_use selinux)
1116 - $(meson_feature zstd)
1117 - $(meson_use video_cards_crocus prefer-crocus)
1118 - $(meson_use video_cards_iris prefer-iris)
1119 - $(meson_use cpu_flags_x86_sse2 sse2)
1120 - -Dvalgrind=$(usex valgrind auto disabled)
1121 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1122 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1123 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1124 - --buildtype $(usex debug debug plain)
1125 - -Db_ndebug=$(usex debug false true)
1126 - )
1127 - meson_src_configure
1128 -}
1129 -
1130 -multilib_src_test() {
1131 - meson_src_test -t 100
1132 -}
1133 -
1134 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1135 -# other args - names of DRI drivers to enable
1136 -dri_driver_enable() {
1137 - if [[ $1 == -- ]] || use $1; then
1138 - shift
1139 - DRI_DRIVERS+=("$@")
1140 - fi
1141 -}
1142 -
1143 -gallium_enable() {
1144 - if [[ $1 == -- ]] || use $1; then
1145 - shift
1146 - GALLIUM_DRIVERS+=("$@")
1147 - fi
1148 -}
1149 -
1150 -vulkan_enable() {
1151 - if [[ $1 == -- ]] || use $1; then
1152 - shift
1153 - VULKAN_DRIVERS+=("$@")
1154 - fi
1155 -}
1156
1157 diff --git a/media-libs/mesa/mesa-21.3.3.ebuild b/media-libs/mesa/mesa-21.3.3.ebuild
1158 deleted file mode 100644
1159 index 4fb71e92fcad..000000000000
1160 --- a/media-libs/mesa/mesa-21.3.3.ebuild
1161 +++ /dev/null
1162 @@ -1,552 +0,0 @@
1163 -# Copyright 1999-2021 Gentoo Authors
1164 -# Distributed under the terms of the GNU General Public License v2
1165 -
1166 -EAPI=7
1167 -
1168 -PYTHON_COMPAT=( python3_{7..10} )
1169 -
1170 -inherit llvm meson-multilib python-any-r1 linux-info
1171 -
1172 -MY_P="${P/_/-}"
1173 -
1174 -DESCRIPTION="OpenGL-like graphic library for Linux"
1175 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1176 -
1177 -if [[ ${PV} == 9999 ]]; then
1178 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1179 - inherit git-r3
1180 -else
1181 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
1182 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1183 -fi
1184 -
1185 -LICENSE="MIT"
1186 -SLOT="0"
1187 -RESTRICT="
1188 - !test? ( test )
1189 -"
1190 -
1191 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1192 -VIDEO_CARDS="${RADEON_CARDS} crocus freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
1193 -for card in ${VIDEO_CARDS}; do
1194 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1195 -done
1196 -
1197 -IUSE="${IUSE_VIDEO_CARDS}
1198 - +classic cpu_flags_x86_sse2 d3d9 debug +gallium gles1 +gles2 +llvm
1199 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
1200 - vulkan-overlay wayland +X xa xvmc zink +zstd"
1201 -
1202 -REQUIRED_USE="
1203 - d3d9? ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1204 - osmesa? ( gallium )
1205 - vulkan? ( video_cards_radeonsi? ( llvm ) )
1206 - vulkan-overlay? ( vulkan )
1207 - video_cards_crocus? ( gallium )
1208 - video_cards_freedreno? ( gallium )
1209 - video_cards_intel? ( classic )
1210 - video_cards_i915? ( || ( classic gallium ) )
1211 - video_cards_i965? ( classic )
1212 - video_cards_iris? ( gallium )
1213 - video_cards_lima? ( gallium )
1214 - video_cards_nouveau? ( || ( classic gallium ) )
1215 - video_cards_panfrost? ( gallium )
1216 - video_cards_radeon? ( || ( classic gallium )
1217 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1218 - video_cards_r100? ( classic )
1219 - video_cards_r200? ( classic )
1220 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1221 - video_cards_r600? ( gallium )
1222 - video_cards_radeonsi? ( gallium llvm )
1223 - video_cards_v3d? ( gallium )
1224 - video_cards_vc4? ( gallium )
1225 - video_cards_virgl? ( gallium )
1226 - video_cards_vivante? ( gallium )
1227 - video_cards_vmware? ( gallium )
1228 - xa? ( X )
1229 - xvmc? ( X )
1230 - zink? ( gallium vulkan )
1231 -"
1232 -
1233 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.107"
1234 -RDEPEND="
1235 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1236 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
1237 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1238 - gallium? (
1239 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1240 - llvm? (
1241 - video_cards_radeonsi? (
1242 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1243 - )
1244 - video_cards_r600? (
1245 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1246 - )
1247 - video_cards_radeon? (
1248 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1249 - )
1250 - )
1251 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
1252 - opencl? (
1253 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
1254 - dev-libs/libclc
1255 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1256 - )
1257 - vaapi? (
1258 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1259 - )
1260 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1261 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1262 - )
1263 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
1264 - wayland? (
1265 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
1266 - >=dev-libs/wayland-protocols-1.8
1267 - )
1268 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1269 - video_cards_intel? (
1270 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1271 - )
1272 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1273 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
1274 - X? (
1275 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1276 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1277 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1278 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1279 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1280 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1281 - )
1282 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
1283 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
1284 -"
1285 -for card in ${RADEON_CARDS}; do
1286 - RDEPEND="${RDEPEND}
1287 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1288 - "
1289 -done
1290 -RDEPEND="${RDEPEND}
1291 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1292 -"
1293 -
1294 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1295 -# we need to *really* make sure we're not pulling one than more slot
1296 -# simultaneously.
1297 -#
1298 -# How to use it:
1299 -# 1. List all the working slots (with min versions) in ||, newest first.
1300 -# 2. Update the := to specify *max* version, e.g. < 10.
1301 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
1302 -LLVM_MAX_SLOT="13"
1303 -LLVM_DEPSTR="
1304 - || (
1305 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
1306 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
1307 - sys-devel/llvm:11[${MULTILIB_USEDEP}]
1308 - )
1309 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1310 -"
1311 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1312 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1313 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1314 -RDEPEND="${RDEPEND}
1315 - gallium? (
1316 - llvm? (
1317 - opencl? (
1318 - video_cards_r600? (
1319 - ${CLANG_DEPSTR_AMDGPU}
1320 - )
1321 - !video_cards_r600? (
1322 - video_cards_radeonsi? (
1323 - ${CLANG_DEPSTR_AMDGPU}
1324 - )
1325 - )
1326 - !video_cards_r600? (
1327 - !video_cards_radeonsi? (
1328 - video_cards_radeon? (
1329 - ${CLANG_DEPSTR_AMDGPU}
1330 - )
1331 - )
1332 - )
1333 - !video_cards_r600? (
1334 - !video_cards_radeon? (
1335 - !video_cards_radeonsi? (
1336 - ${CLANG_DEPSTR}
1337 - )
1338 - )
1339 - )
1340 - )
1341 - !opencl? (
1342 - video_cards_r600? (
1343 - ${LLVM_DEPSTR_AMDGPU}
1344 - )
1345 - !video_cards_r600? (
1346 - video_cards_radeonsi? (
1347 - ${LLVM_DEPSTR_AMDGPU}
1348 - )
1349 - )
1350 - !video_cards_r600? (
1351 - !video_cards_radeonsi? (
1352 - video_cards_radeon? (
1353 - ${LLVM_DEPSTR_AMDGPU}
1354 - )
1355 - )
1356 - )
1357 - !video_cards_r600? (
1358 - !video_cards_radeon? (
1359 - !video_cards_radeonsi? (
1360 - ${LLVM_DEPSTR}
1361 - )
1362 - )
1363 - )
1364 - )
1365 - )
1366 - )
1367 -"
1368 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1369 -
1370 -DEPEND="${RDEPEND}
1371 - valgrind? ( dev-util/valgrind )
1372 - X? (
1373 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1374 - x11-base/xorg-proto
1375 - )
1376 -"
1377 -BDEPEND="
1378 - ${PYTHON_DEPS}
1379 - opencl? (
1380 - >=sys-devel/gcc-4.6
1381 - )
1382 - sys-devel/bison
1383 - sys-devel/flex
1384 - virtual/pkgconfig
1385 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1386 - wayland? ( dev-util/wayland-scanner )
1387 -"
1388 -
1389 -S="${WORKDIR}/${MY_P}"
1390 -EGIT_CHECKOUT_DIR=${S}
1391 -
1392 -QA_WX_LOAD="
1393 -x86? (
1394 - usr/lib*/libglapi.so.0.0.0
1395 - usr/lib*/libGLESv1_CM.so.1.1.0
1396 - usr/lib*/libGLESv2.so.2.0.0
1397 - usr/lib*/libGL.so.1.2.0
1398 - usr/lib*/libOSMesa.so.8.0.0
1399 - usr/lib/libGLX_mesa.so.0.0.0
1400 -)"
1401 -
1402 -llvm_check_deps() {
1403 - local flags=${MULTILIB_USEDEP}
1404 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1405 - then
1406 - flags+=",llvm_targets_AMDGPU(-)"
1407 - fi
1408 -
1409 - if use opencl; then
1410 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1411 - fi
1412 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1413 -}
1414 -
1415 -pkg_pretend() {
1416 - if use vulkan; then
1417 - if ! use video_cards_freedreno &&
1418 - ! use video_cards_i965 &&
1419 - ! use video_cards_iris &&
1420 - ! use video_cards_radeonsi &&
1421 - ! use video_cards_v3d; then
1422 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, i965, iris, radeonsi, or v3d"
1423 - fi
1424 - fi
1425 -
1426 - if use opencl; then
1427 - if ! use video_cards_r600 &&
1428 - ! use video_cards_radeonsi; then
1429 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1430 - fi
1431 - fi
1432 -
1433 - if use vaapi; then
1434 - if ! use video_cards_r600 &&
1435 - ! use video_cards_radeonsi &&
1436 - ! use video_cards_nouveau; then
1437 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1438 - fi
1439 - fi
1440 -
1441 - if use vdpau; then
1442 - if ! use video_cards_r300 &&
1443 - ! use video_cards_r600 &&
1444 - ! use video_cards_radeonsi &&
1445 - ! use video_cards_nouveau; then
1446 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1447 - fi
1448 - fi
1449 -
1450 - if use xa; then
1451 - if ! use video_cards_freedreno &&
1452 - ! use video_cards_nouveau &&
1453 - ! use video_cards_vmware; then
1454 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1455 - fi
1456 - fi
1457 -
1458 - if use xvmc; then
1459 - if ! use video_cards_r600 &&
1460 - ! use video_cards_nouveau; then
1461 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1462 - fi
1463 - fi
1464 -
1465 - if ! use gallium; then
1466 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
1467 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1468 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1469 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1470 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1471 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1472 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1473 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1474 - fi
1475 -
1476 - if ! use llvm; then
1477 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1478 - fi
1479 -
1480 - if use osmesa && ! use llvm; then
1481 - ewarn "OSMesa will be slow without enabling USE=llvm"
1482 - fi
1483 -}
1484 -
1485 -python_check_deps() {
1486 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
1487 -}
1488 -
1489 -pkg_setup() {
1490 - # warning message for bug 459306
1491 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1492 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1493 - ewarn "detected! This can cause problems. For details, see bug 459306."
1494 - fi
1495 -
1496 - if use video_cards_i965 ||
1497 - use video_cards_iris ||
1498 - use video_cards_radeonsi; then
1499 - if kernel_is -ge 5 11 3; then
1500 - CONFIG_CHECK="~KCMP"
1501 - elif kernel_is -ge 5 11; then
1502 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1503 - elif kernel_is -ge 5 10 20; then
1504 - CONFIG_CHECK="~KCMP"
1505 - else
1506 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1507 - fi
1508 - linux-info_pkg_setup
1509 - fi
1510 -
1511 - if use gallium && use llvm; then
1512 - llvm_pkg_setup
1513 - fi
1514 - python-any-r1_pkg_setup
1515 -}
1516 -
1517 -multilib_src_configure() {
1518 - local emesonargs=()
1519 -
1520 - if use classic; then
1521 - # Intel code
1522 - dri_driver_enable video_cards_i915 i915
1523 - dri_driver_enable video_cards_i965 i965
1524 - if ! use video_cards_i915 && \
1525 - ! use video_cards_i965; then
1526 - dri_driver_enable video_cards_intel i915 i965
1527 - fi
1528 -
1529 - # Nouveau code
1530 - dri_driver_enable video_cards_nouveau nouveau
1531 -
1532 - # ATI code
1533 - dri_driver_enable video_cards_r100 r100
1534 - dri_driver_enable video_cards_r200 r200
1535 - if ! use video_cards_r100 && \
1536 - ! use video_cards_r200; then
1537 - dri_driver_enable video_cards_radeon r100 r200
1538 - fi
1539 - fi
1540 -
1541 - local platforms
1542 - use X && platforms+="x11"
1543 - use wayland && platforms+=",wayland"
1544 - emesonargs+=(-Dplatforms=${platforms#,})
1545 -
1546 - if use gallium; then
1547 - emesonargs+=(
1548 - $(meson_feature llvm)
1549 - $(meson_feature lm-sensors lmsensors)
1550 - $(meson_feature unwind libunwind)
1551 - )
1552 -
1553 - if use video_cards_iris ||
1554 - use video_cards_r300 ||
1555 - use video_cards_r600 ||
1556 - use video_cards_radeonsi ||
1557 - use video_cards_nouveau ||
1558 - use video_cards_vmware; then
1559 - emesonargs+=($(meson_use d3d9 gallium-nine))
1560 - else
1561 - emesonargs+=(-Dgallium-nine=false)
1562 - fi
1563 -
1564 - if use video_cards_r600 ||
1565 - use video_cards_radeonsi ||
1566 - use video_cards_nouveau; then
1567 - emesonargs+=($(meson_feature vaapi gallium-va))
1568 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1569 - else
1570 - emesonargs+=(-Dgallium-va=disabled)
1571 - fi
1572 -
1573 - if use video_cards_r300 ||
1574 - use video_cards_r600 ||
1575 - use video_cards_radeonsi ||
1576 - use video_cards_nouveau; then
1577 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
1578 - else
1579 - emesonargs+=(-Dgallium-vdpau=disabled)
1580 - fi
1581 -
1582 - if use video_cards_freedreno ||
1583 - use video_cards_nouveau ||
1584 - use video_cards_vmware; then
1585 - emesonargs+=($(meson_feature xa gallium-xa))
1586 - else
1587 - emesonargs+=(-Dgallium-xa=disabled)
1588 - fi
1589 -
1590 - if use video_cards_r600 ||
1591 - use video_cards_nouveau; then
1592 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
1593 - else
1594 - emesonargs+=(-Dgallium-xvmc=disabled)
1595 - fi
1596 -
1597 - if use video_cards_freedreno ||
1598 - use video_cards_lima ||
1599 - use video_cards_panfrost ||
1600 - use video_cards_v3d ||
1601 - use video_cards_vc4 ||
1602 - use video_cards_vivante; then
1603 - gallium_enable -- kmsro
1604 - fi
1605 -
1606 - gallium_enable -- swrast
1607 - gallium_enable video_cards_lima lima
1608 - gallium_enable video_cards_panfrost panfrost
1609 - gallium_enable video_cards_v3d v3d
1610 - gallium_enable video_cards_vc4 vc4
1611 - gallium_enable video_cards_vivante etnaviv
1612 - gallium_enable video_cards_vmware svga
1613 - gallium_enable video_cards_nouveau nouveau
1614 - gallium_enable zink zink
1615 -
1616 - # Only one i915 driver (classic vs gallium). Default to classic.
1617 - if ! use classic; then
1618 - gallium_enable video_cards_i915 i915
1619 - if ! use video_cards_i915 && \
1620 - ! use video_cards_i965; then
1621 - gallium_enable video_cards_intel i915
1622 - fi
1623 - fi
1624 -
1625 - gallium_enable video_cards_crocus crocus
1626 - gallium_enable video_cards_iris iris
1627 -
1628 - gallium_enable video_cards_r300 r300
1629 - gallium_enable video_cards_r600 r600
1630 - gallium_enable video_cards_radeonsi radeonsi
1631 - if ! use video_cards_r300 && \
1632 - ! use video_cards_r600; then
1633 - gallium_enable video_cards_radeon r300 r600
1634 - fi
1635 -
1636 - gallium_enable video_cards_freedreno freedreno
1637 - gallium_enable video_cards_virgl virgl
1638 -
1639 - # opencl stuff
1640 - emesonargs+=(
1641 - -Dgallium-opencl="$(usex opencl icd disabled)"
1642 - )
1643 - fi
1644 -
1645 - if use vulkan; then
1646 - vulkan_enable video_cards_freedreno freedreno
1647 - vulkan_enable video_cards_i965 intel
1648 - vulkan_enable video_cards_iris intel
1649 - vulkan_enable video_cards_radeonsi amd
1650 - vulkan_enable video_cards_v3d broadcom
1651 - fi
1652 -
1653 - driver_list() {
1654 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1655 - echo "${drivers//$'\n'/,}"
1656 - }
1657 -
1658 - local vulkan_layers
1659 - use vulkan && vulkan_layers+="device-select"
1660 - use vulkan-overlay && vulkan_layers+=",overlay"
1661 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
1662 -
1663 - emesonargs+=(
1664 - $(meson_use test build-tests)
1665 - -Dglx=$(usex X dri disabled)
1666 - -Dshared-glapi=enabled
1667 - -Ddri3=enabled
1668 - -Degl=true
1669 - -Dgbm=true
1670 - -Dglvnd=true
1671 - $(meson_feature gles1)
1672 - $(meson_feature gles2)
1673 - $(meson_use osmesa)
1674 - $(meson_use selinux)
1675 - $(meson_feature zstd)
1676 - $(meson_use video_cards_crocus prefer-crocus)
1677 - $(meson_use video_cards_iris prefer-iris)
1678 - $(meson_use cpu_flags_x86_sse2 sse2)
1679 - -Dvalgrind=$(usex valgrind auto disabled)
1680 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1681 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1682 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1683 - --buildtype $(usex debug debug plain)
1684 - -Db_ndebug=$(usex debug false true)
1685 - )
1686 - meson_src_configure
1687 -}
1688 -
1689 -multilib_src_test() {
1690 - meson_src_test -t 100
1691 -}
1692 -
1693 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1694 -# other args - names of DRI drivers to enable
1695 -dri_driver_enable() {
1696 - if [[ $1 == -- ]] || use $1; then
1697 - shift
1698 - DRI_DRIVERS+=("$@")
1699 - fi
1700 -}
1701 -
1702 -gallium_enable() {
1703 - if [[ $1 == -- ]] || use $1; then
1704 - shift
1705 - GALLIUM_DRIVERS+=("$@")
1706 - fi
1707 -}
1708 -
1709 -vulkan_enable() {
1710 - if [[ $1 == -- ]] || use $1; then
1711 - shift
1712 - VULKAN_DRIVERS+=("$@")
1713 - fi
1714 -}
1715
1716 diff --git a/media-libs/mesa/mesa-21.3.4.ebuild b/media-libs/mesa/mesa-21.3.4.ebuild
1717 deleted file mode 100644
1718 index 2b4968b37dec..000000000000
1719 --- a/media-libs/mesa/mesa-21.3.4.ebuild
1720 +++ /dev/null
1721 @@ -1,552 +0,0 @@
1722 -# Copyright 1999-2022 Gentoo Authors
1723 -# Distributed under the terms of the GNU General Public License v2
1724 -
1725 -EAPI=7
1726 -
1727 -PYTHON_COMPAT=( python3_{7..10} )
1728 -
1729 -inherit llvm meson-multilib python-any-r1 linux-info
1730 -
1731 -MY_P="${P/_/-}"
1732 -
1733 -DESCRIPTION="OpenGL-like graphic library for Linux"
1734 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1735 -
1736 -if [[ ${PV} == 9999 ]]; then
1737 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1738 - inherit git-r3
1739 -else
1740 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
1741 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1742 -fi
1743 -
1744 -LICENSE="MIT"
1745 -SLOT="0"
1746 -RESTRICT="
1747 - !test? ( test )
1748 -"
1749 -
1750 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1751 -VIDEO_CARDS="${RADEON_CARDS} crocus freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
1752 -for card in ${VIDEO_CARDS}; do
1753 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1754 -done
1755 -
1756 -IUSE="${IUSE_VIDEO_CARDS}
1757 - +classic cpu_flags_x86_sse2 d3d9 debug +gallium gles1 +gles2 +llvm
1758 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
1759 - vulkan-overlay wayland +X xa xvmc zink +zstd"
1760 -
1761 -REQUIRED_USE="
1762 - d3d9? ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1763 - osmesa? ( gallium )
1764 - vulkan? ( video_cards_radeonsi? ( llvm ) )
1765 - vulkan-overlay? ( vulkan )
1766 - video_cards_crocus? ( gallium )
1767 - video_cards_freedreno? ( gallium )
1768 - video_cards_intel? ( classic )
1769 - video_cards_i915? ( || ( classic gallium ) )
1770 - video_cards_i965? ( classic )
1771 - video_cards_iris? ( gallium )
1772 - video_cards_lima? ( gallium )
1773 - video_cards_nouveau? ( || ( classic gallium ) )
1774 - video_cards_panfrost? ( gallium )
1775 - video_cards_radeon? ( || ( classic gallium )
1776 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1777 - video_cards_r100? ( classic )
1778 - video_cards_r200? ( classic )
1779 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1780 - video_cards_r600? ( gallium )
1781 - video_cards_radeonsi? ( gallium llvm )
1782 - video_cards_v3d? ( gallium )
1783 - video_cards_vc4? ( gallium )
1784 - video_cards_virgl? ( gallium )
1785 - video_cards_vivante? ( gallium )
1786 - video_cards_vmware? ( gallium )
1787 - xa? ( X )
1788 - xvmc? ( X )
1789 - zink? ( gallium vulkan )
1790 -"
1791 -
1792 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.107"
1793 -RDEPEND="
1794 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1795 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
1796 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1797 - gallium? (
1798 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1799 - llvm? (
1800 - video_cards_radeonsi? (
1801 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1802 - )
1803 - video_cards_r600? (
1804 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1805 - )
1806 - video_cards_radeon? (
1807 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1808 - )
1809 - )
1810 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
1811 - opencl? (
1812 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
1813 - dev-libs/libclc
1814 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1815 - )
1816 - vaapi? (
1817 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1818 - )
1819 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1820 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1821 - )
1822 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
1823 - wayland? (
1824 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
1825 - >=dev-libs/wayland-protocols-1.8
1826 - )
1827 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1828 - video_cards_intel? (
1829 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1830 - )
1831 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1832 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
1833 - X? (
1834 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1835 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1836 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1837 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1838 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1839 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1840 - )
1841 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
1842 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
1843 -"
1844 -for card in ${RADEON_CARDS}; do
1845 - RDEPEND="${RDEPEND}
1846 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1847 - "
1848 -done
1849 -RDEPEND="${RDEPEND}
1850 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1851 -"
1852 -
1853 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1854 -# we need to *really* make sure we're not pulling one than more slot
1855 -# simultaneously.
1856 -#
1857 -# How to use it:
1858 -# 1. List all the working slots (with min versions) in ||, newest first.
1859 -# 2. Update the := to specify *max* version, e.g. < 10.
1860 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
1861 -LLVM_MAX_SLOT="13"
1862 -LLVM_DEPSTR="
1863 - || (
1864 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
1865 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
1866 - sys-devel/llvm:11[${MULTILIB_USEDEP}]
1867 - )
1868 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1869 -"
1870 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1871 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1872 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1873 -RDEPEND="${RDEPEND}
1874 - gallium? (
1875 - llvm? (
1876 - opencl? (
1877 - video_cards_r600? (
1878 - ${CLANG_DEPSTR_AMDGPU}
1879 - )
1880 - !video_cards_r600? (
1881 - video_cards_radeonsi? (
1882 - ${CLANG_DEPSTR_AMDGPU}
1883 - )
1884 - )
1885 - !video_cards_r600? (
1886 - !video_cards_radeonsi? (
1887 - video_cards_radeon? (
1888 - ${CLANG_DEPSTR_AMDGPU}
1889 - )
1890 - )
1891 - )
1892 - !video_cards_r600? (
1893 - !video_cards_radeon? (
1894 - !video_cards_radeonsi? (
1895 - ${CLANG_DEPSTR}
1896 - )
1897 - )
1898 - )
1899 - )
1900 - !opencl? (
1901 - video_cards_r600? (
1902 - ${LLVM_DEPSTR_AMDGPU}
1903 - )
1904 - !video_cards_r600? (
1905 - video_cards_radeonsi? (
1906 - ${LLVM_DEPSTR_AMDGPU}
1907 - )
1908 - )
1909 - !video_cards_r600? (
1910 - !video_cards_radeonsi? (
1911 - video_cards_radeon? (
1912 - ${LLVM_DEPSTR_AMDGPU}
1913 - )
1914 - )
1915 - )
1916 - !video_cards_r600? (
1917 - !video_cards_radeon? (
1918 - !video_cards_radeonsi? (
1919 - ${LLVM_DEPSTR}
1920 - )
1921 - )
1922 - )
1923 - )
1924 - )
1925 - )
1926 -"
1927 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1928 -
1929 -DEPEND="${RDEPEND}
1930 - valgrind? ( dev-util/valgrind )
1931 - X? (
1932 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1933 - x11-base/xorg-proto
1934 - )
1935 -"
1936 -BDEPEND="
1937 - ${PYTHON_DEPS}
1938 - opencl? (
1939 - >=sys-devel/gcc-4.6
1940 - )
1941 - sys-devel/bison
1942 - sys-devel/flex
1943 - virtual/pkgconfig
1944 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1945 - wayland? ( dev-util/wayland-scanner )
1946 -"
1947 -
1948 -S="${WORKDIR}/${MY_P}"
1949 -EGIT_CHECKOUT_DIR=${S}
1950 -
1951 -QA_WX_LOAD="
1952 -x86? (
1953 - usr/lib*/libglapi.so.0.0.0
1954 - usr/lib*/libGLESv1_CM.so.1.1.0
1955 - usr/lib*/libGLESv2.so.2.0.0
1956 - usr/lib*/libGL.so.1.2.0
1957 - usr/lib*/libOSMesa.so.8.0.0
1958 - usr/lib/libGLX_mesa.so.0.0.0
1959 -)"
1960 -
1961 -llvm_check_deps() {
1962 - local flags=${MULTILIB_USEDEP}
1963 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1964 - then
1965 - flags+=",llvm_targets_AMDGPU(-)"
1966 - fi
1967 -
1968 - if use opencl; then
1969 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1970 - fi
1971 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1972 -}
1973 -
1974 -pkg_pretend() {
1975 - if use vulkan; then
1976 - if ! use video_cards_freedreno &&
1977 - ! use video_cards_i965 &&
1978 - ! use video_cards_iris &&
1979 - ! use video_cards_radeonsi &&
1980 - ! use video_cards_v3d; then
1981 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, i965, iris, radeonsi, or v3d"
1982 - fi
1983 - fi
1984 -
1985 - if use opencl; then
1986 - if ! use video_cards_r600 &&
1987 - ! use video_cards_radeonsi; then
1988 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1989 - fi
1990 - fi
1991 -
1992 - if use vaapi; then
1993 - if ! use video_cards_r600 &&
1994 - ! use video_cards_radeonsi &&
1995 - ! use video_cards_nouveau; then
1996 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1997 - fi
1998 - fi
1999 -
2000 - if use vdpau; then
2001 - if ! use video_cards_r300 &&
2002 - ! use video_cards_r600 &&
2003 - ! use video_cards_radeonsi &&
2004 - ! use video_cards_nouveau; then
2005 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
2006 - fi
2007 - fi
2008 -
2009 - if use xa; then
2010 - if ! use video_cards_freedreno &&
2011 - ! use video_cards_nouveau &&
2012 - ! use video_cards_vmware; then
2013 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
2014 - fi
2015 - fi
2016 -
2017 - if use xvmc; then
2018 - if ! use video_cards_r600 &&
2019 - ! use video_cards_nouveau; then
2020 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2021 - fi
2022 - fi
2023 -
2024 - if ! use gallium; then
2025 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
2026 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
2027 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
2028 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
2029 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
2030 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
2031 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
2032 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
2033 - fi
2034 -
2035 - if ! use llvm; then
2036 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2037 - fi
2038 -
2039 - if use osmesa && ! use llvm; then
2040 - ewarn "OSMesa will be slow without enabling USE=llvm"
2041 - fi
2042 -}
2043 -
2044 -python_check_deps() {
2045 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
2046 -}
2047 -
2048 -pkg_setup() {
2049 - # warning message for bug 459306
2050 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2051 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2052 - ewarn "detected! This can cause problems. For details, see bug 459306."
2053 - fi
2054 -
2055 - if use video_cards_i965 ||
2056 - use video_cards_iris ||
2057 - use video_cards_radeonsi; then
2058 - if kernel_is -ge 5 11 3; then
2059 - CONFIG_CHECK="~KCMP"
2060 - elif kernel_is -ge 5 11; then
2061 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
2062 - elif kernel_is -ge 5 10 20; then
2063 - CONFIG_CHECK="~KCMP"
2064 - else
2065 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
2066 - fi
2067 - linux-info_pkg_setup
2068 - fi
2069 -
2070 - if use gallium && use llvm; then
2071 - llvm_pkg_setup
2072 - fi
2073 - python-any-r1_pkg_setup
2074 -}
2075 -
2076 -multilib_src_configure() {
2077 - local emesonargs=()
2078 -
2079 - if use classic; then
2080 - # Intel code
2081 - dri_driver_enable video_cards_i915 i915
2082 - dri_driver_enable video_cards_i965 i965
2083 - if ! use video_cards_i915 && \
2084 - ! use video_cards_i965; then
2085 - dri_driver_enable video_cards_intel i915 i965
2086 - fi
2087 -
2088 - # Nouveau code
2089 - dri_driver_enable video_cards_nouveau nouveau
2090 -
2091 - # ATI code
2092 - dri_driver_enable video_cards_r100 r100
2093 - dri_driver_enable video_cards_r200 r200
2094 - if ! use video_cards_r100 && \
2095 - ! use video_cards_r200; then
2096 - dri_driver_enable video_cards_radeon r100 r200
2097 - fi
2098 - fi
2099 -
2100 - local platforms
2101 - use X && platforms+="x11"
2102 - use wayland && platforms+=",wayland"
2103 - emesonargs+=(-Dplatforms=${platforms#,})
2104 -
2105 - if use gallium; then
2106 - emesonargs+=(
2107 - $(meson_feature llvm)
2108 - $(meson_feature lm-sensors lmsensors)
2109 - $(meson_feature unwind libunwind)
2110 - )
2111 -
2112 - if use video_cards_iris ||
2113 - use video_cards_r300 ||
2114 - use video_cards_r600 ||
2115 - use video_cards_radeonsi ||
2116 - use video_cards_nouveau ||
2117 - use video_cards_vmware; then
2118 - emesonargs+=($(meson_use d3d9 gallium-nine))
2119 - else
2120 - emesonargs+=(-Dgallium-nine=false)
2121 - fi
2122 -
2123 - if use video_cards_r600 ||
2124 - use video_cards_radeonsi ||
2125 - use video_cards_nouveau; then
2126 - emesonargs+=($(meson_feature vaapi gallium-va))
2127 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
2128 - else
2129 - emesonargs+=(-Dgallium-va=disabled)
2130 - fi
2131 -
2132 - if use video_cards_r300 ||
2133 - use video_cards_r600 ||
2134 - use video_cards_radeonsi ||
2135 - use video_cards_nouveau; then
2136 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
2137 - else
2138 - emesonargs+=(-Dgallium-vdpau=disabled)
2139 - fi
2140 -
2141 - if use video_cards_freedreno ||
2142 - use video_cards_nouveau ||
2143 - use video_cards_vmware; then
2144 - emesonargs+=($(meson_feature xa gallium-xa))
2145 - else
2146 - emesonargs+=(-Dgallium-xa=disabled)
2147 - fi
2148 -
2149 - if use video_cards_r600 ||
2150 - use video_cards_nouveau; then
2151 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
2152 - else
2153 - emesonargs+=(-Dgallium-xvmc=disabled)
2154 - fi
2155 -
2156 - if use video_cards_freedreno ||
2157 - use video_cards_lima ||
2158 - use video_cards_panfrost ||
2159 - use video_cards_v3d ||
2160 - use video_cards_vc4 ||
2161 - use video_cards_vivante; then
2162 - gallium_enable -- kmsro
2163 - fi
2164 -
2165 - gallium_enable -- swrast
2166 - gallium_enable video_cards_lima lima
2167 - gallium_enable video_cards_panfrost panfrost
2168 - gallium_enable video_cards_v3d v3d
2169 - gallium_enable video_cards_vc4 vc4
2170 - gallium_enable video_cards_vivante etnaviv
2171 - gallium_enable video_cards_vmware svga
2172 - gallium_enable video_cards_nouveau nouveau
2173 - gallium_enable zink zink
2174 -
2175 - # Only one i915 driver (classic vs gallium). Default to classic.
2176 - if ! use classic; then
2177 - gallium_enable video_cards_i915 i915
2178 - if ! use video_cards_i915 && \
2179 - ! use video_cards_i965; then
2180 - gallium_enable video_cards_intel i915
2181 - fi
2182 - fi
2183 -
2184 - gallium_enable video_cards_crocus crocus
2185 - gallium_enable video_cards_iris iris
2186 -
2187 - gallium_enable video_cards_r300 r300
2188 - gallium_enable video_cards_r600 r600
2189 - gallium_enable video_cards_radeonsi radeonsi
2190 - if ! use video_cards_r300 && \
2191 - ! use video_cards_r600; then
2192 - gallium_enable video_cards_radeon r300 r600
2193 - fi
2194 -
2195 - gallium_enable video_cards_freedreno freedreno
2196 - gallium_enable video_cards_virgl virgl
2197 -
2198 - # opencl stuff
2199 - emesonargs+=(
2200 - -Dgallium-opencl="$(usex opencl icd disabled)"
2201 - )
2202 - fi
2203 -
2204 - if use vulkan; then
2205 - vulkan_enable video_cards_freedreno freedreno
2206 - vulkan_enable video_cards_i965 intel
2207 - vulkan_enable video_cards_iris intel
2208 - vulkan_enable video_cards_radeonsi amd
2209 - vulkan_enable video_cards_v3d broadcom
2210 - fi
2211 -
2212 - driver_list() {
2213 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2214 - echo "${drivers//$'\n'/,}"
2215 - }
2216 -
2217 - local vulkan_layers
2218 - use vulkan && vulkan_layers+="device-select"
2219 - use vulkan-overlay && vulkan_layers+=",overlay"
2220 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
2221 -
2222 - emesonargs+=(
2223 - $(meson_use test build-tests)
2224 - -Dglx=$(usex X dri disabled)
2225 - -Dshared-glapi=enabled
2226 - -Ddri3=enabled
2227 - -Degl=true
2228 - -Dgbm=true
2229 - -Dglvnd=true
2230 - $(meson_feature gles1)
2231 - $(meson_feature gles2)
2232 - $(meson_use osmesa)
2233 - $(meson_use selinux)
2234 - $(meson_feature zstd)
2235 - $(meson_use video_cards_crocus prefer-crocus)
2236 - $(meson_use video_cards_iris prefer-iris)
2237 - $(meson_use cpu_flags_x86_sse2 sse2)
2238 - -Dvalgrind=$(usex valgrind auto disabled)
2239 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2240 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2241 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2242 - --buildtype $(usex debug debug plain)
2243 - -Db_ndebug=$(usex debug false true)
2244 - )
2245 - meson_src_configure
2246 -}
2247 -
2248 -multilib_src_test() {
2249 - meson_src_test -t 100
2250 -}
2251 -
2252 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2253 -# other args - names of DRI drivers to enable
2254 -dri_driver_enable() {
2255 - if [[ $1 == -- ]] || use $1; then
2256 - shift
2257 - DRI_DRIVERS+=("$@")
2258 - fi
2259 -}
2260 -
2261 -gallium_enable() {
2262 - if [[ $1 == -- ]] || use $1; then
2263 - shift
2264 - GALLIUM_DRIVERS+=("$@")
2265 - fi
2266 -}
2267 -
2268 -vulkan_enable() {
2269 - if [[ $1 == -- ]] || use $1; then
2270 - shift
2271 - VULKAN_DRIVERS+=("$@")
2272 - fi
2273 -}