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