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, 06 May 2022 16:37:52
Message-Id: 1651855062.a97d5369833c13c30c0809656aaba0e054dc92e4.mattst88@gentoo
1 commit: a97d5369833c13c30c0809656aaba0e054dc92e4
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 6 16:35:32 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri May 6 16:37:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a97d5369
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.7.ebuild | 560 ---------------------------------
14 media-libs/mesa/mesa-22.0.0.ebuild | 463 ---------------------------
15 media-libs/mesa/mesa-22.0.1.ebuild | 463 ---------------------------
16 media-libs/mesa/mesa-22.0.2.ebuild | 463 ---------------------------
17 media-libs/mesa/mesa-22.1.0_rc3.ebuild | 463 ---------------------------
18 6 files changed, 2417 deletions(-)
19
20 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
21 index df2e498244fd..6548fa474541 100644
22 --- a/media-libs/mesa/Manifest
23 +++ b/media-libs/mesa/Manifest
24 @@ -1,8 +1,3 @@
25 -DIST mesa-21.3.7.tar.xz 16569592 BLAKE2B 7c5a3f144b1ce9e8bbb3560ae2bf46afda9d5c4a3e7b825d406f9a5090dfd51e2b3cc6ee2c10df09c817f5836ffbd09bfc86fbaf63bcc907caef290fd44baee6 SHA512 0991543e9435457fa4d077517408b3f197be32ed61a6c7ca34ddb3906eed208791f1a57227f74115f99df18e612efab1d2c6809b7cf426d273633b53d4aefc88
26 DIST mesa-21.3.8.tar.xz 16593540 BLAKE2B 89a471af3354ae0cf0597c1b6bcd2aff8074d58c16504154291f86cd9a9701f98883cf1077f60a8f17d24be800691a5bfb7ef4ddb10dfa355181bf87805b660c SHA512 0462c44fa8e358dafd03088411452bc172a365902795b3198df1e6cfbf1d87675ef5b72b572de7f15e5ee87b30ce5b2f217c81ea72b376962f6428c6ff83f2e9
27 -DIST mesa-22.0.0.tar.xz 15565680 BLAKE2B 65dd09e1864f353f07ab01cb21cb89f858a071d74043b1913b0abe3ee3b3a992ca3878d40ffe52cc45546770d5ad9e198c93a24a8564ffeb9c8a05da38af300c SHA512 9faef66adbacba24d11dfe8e2d1a753295798883a10a7cc91e6df9d678c64a8286a12e60c0d8576d944a8cc76f00c30d27c3a71d3458bbe3dbcd66c88a454c3b
28 -DIST mesa-22.0.1.tar.xz 15634448 BLAKE2B c102643a81f47b36da24148564968dd5578b01970d14769eeb501d00ba43f49052893625ac7a8d67638f3d9bfe610440f300eb5657322387d8e5dc15b62f13b2 SHA512 cc8012b8f3fcbecfbb153d0e009e6522c3776023501da8499c06f1eaa9ab0a555ca597e16e4d7a2b954b05c8c0737ae6567e0d8549fb63aa86ae587eb31cd01e
29 -DIST mesa-22.0.2.tar.xz 15688840 BLAKE2B f2ad5beae09577d87f3c47dacbe5ae13a8674054be3de7e69828ef905cc3f0b4e92f4f96eef44b35f98578a290d0e19a3469b76afd4d4e69c06dbb26a2c16490 SHA512 939ddf9acd280e1b20b3540349b3ad07bbeee5d821198f1d667e86634449bf5d0a0df5832753b8b3f8816709c2f02959cce25f3d26a33cc758dd8e25d158ddb8
30 DIST mesa-22.0.3.tar.xz 15711916 BLAKE2B 2ecf9bc2293861e93abcc66cd5df6651a9eb7e533573273063df76ef01d0a39d6097c7a49ec682439bd6f4f0dfd55cd8e61051a731405759174c55b91dbd7725 SHA512 3982cd2fadca5349b2513885ed734c2422e3f2dced85f471f245b120ffaf018acafcd929dc5ec317f2c568bb5f619f5a3475d3a92495f766a2eefb225efcac14
31 -DIST mesa-22.1.0-rc3.tar.xz 15836596 BLAKE2B 8497a74192b80d703f6f87c6411ae24f90a710cf2924b68897eb0d52ac8080d4a76f6224bc912e16d273dee43347420e4b9d54e5e2442a7bf0e409ef5cf656dd SHA512 2ae88d14a8dfdb1b8f720371cb3ce1af775b43a615fd6225b39676948486f4b39c0e9acd989679ea2a12ee803370fd2cd8c1152e8bcec0aa4bbb4e5b7fc78dad
32 DIST mesa-22.1.0-rc4.tar.xz 15852292 BLAKE2B 87b18ab81f58e7778fa0df902a6f020bf9e0e910be7ddc2d7d4af72c68211b7543be8f123a2952c0d640e5c13a277a0ce72c9163d61e7286159ba31ac8854c46 SHA512 755027304eef52b88da94e035c391ed75cdf780099fb5d2c0e4e48b69da3713a9250ba29bbea4e468f280f5112b975cd49fe11a7a89b957c30071bfb0151fc6d
33
34 diff --git a/media-libs/mesa/mesa-21.3.7.ebuild b/media-libs/mesa/mesa-21.3.7.ebuild
35 deleted file mode 100644
36 index f94b6c9c9f55..000000000000
37 --- a/media-libs/mesa/mesa-21.3.7.ebuild
38 +++ /dev/null
39 @@ -1,560 +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 - $(meson_use test build-tests)
551 - -Dglx=$(usex X dri disabled)
552 - -Dshared-glapi=enabled
553 - -Ddri3=enabled
554 - $(meson_feature egl)
555 - $(meson_feature gbm)
556 - $(meson_feature gles1)
557 - $(meson_feature gles2)
558 - $(meson_use osmesa)
559 - $(meson_use selinux)
560 - $(meson_feature zstd)
561 - $(meson_use video_cards_crocus prefer-crocus)
562 - $(meson_use video_cards_iris prefer-iris)
563 - $(meson_use cpu_flags_x86_sse2 sse2)
564 - -Dvalgrind=$(usex valgrind auto disabled)
565 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
566 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
567 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
568 - --buildtype $(usex debug debug plain)
569 - -Db_ndebug=$(usex debug false true)
570 - )
571 - meson_src_configure
572 -}
573 -
574 -multilib_src_test() {
575 - meson_src_test -t 100
576 -}
577 -
578 -# $1 - VIDEO_CARDS flag (check skipped for "--")
579 -# other args - names of DRI drivers to enable
580 -dri_driver_enable() {
581 - if [[ $1 == -- ]] || use $1; then
582 - shift
583 - DRI_DRIVERS+=("$@")
584 - fi
585 -}
586 -
587 -gallium_enable() {
588 - if [[ $1 == -- ]] || use $1; then
589 - shift
590 - GALLIUM_DRIVERS+=("$@")
591 - fi
592 -}
593 -
594 -vulkan_enable() {
595 - if [[ $1 == -- ]] || use $1; then
596 - shift
597 - VULKAN_DRIVERS+=("$@")
598 - fi
599 -}
600
601 diff --git a/media-libs/mesa/mesa-22.0.0.ebuild b/media-libs/mesa/mesa-22.0.0.ebuild
602 deleted file mode 100644
603 index 15b5138f55fb..000000000000
604 --- a/media-libs/mesa/mesa-22.0.0.ebuild
605 +++ /dev/null
606 @@ -1,463 +0,0 @@
607 -# Copyright 1999-2022 Gentoo Authors
608 -# Distributed under the terms of the GNU General Public License v2
609 -
610 -EAPI=7
611 -
612 -PYTHON_COMPAT=( python3_{8..10} )
613 -
614 -inherit llvm meson-multilib python-any-r1 linux-info
615 -
616 -MY_P="${P/_/-}"
617 -
618 -DESCRIPTION="OpenGL-like graphic library for Linux"
619 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
620 -
621 -if [[ ${PV} == 9999 ]]; then
622 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
623 - inherit git-r3
624 -else
625 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
626 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
627 -fi
628 -
629 -LICENSE="MIT"
630 -SLOT="0"
631 -RESTRICT="
632 - !test? ( test )
633 -"
634 -
635 -RADEON_CARDS="r300 r600 radeon radeonsi"
636 -VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
637 -for card in ${VIDEO_CARDS}; do
638 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
639 -done
640 -
641 -IUSE="${IUSE_VIDEO_CARDS}
642 - cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
643 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
644 - vulkan-overlay wayland +X xa xvmc zink +zstd"
645 -
646 -REQUIRED_USE="
647 - d3d9? ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
648 - vulkan? ( video_cards_radeonsi? ( llvm ) )
649 - vulkan-overlay? ( vulkan )
650 - video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
651 - video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
652 - video_cards_radeonsi? ( llvm )
653 - xa? ( X )
654 - xvmc? ( X )
655 - zink? ( vulkan )
656 -"
657 -
658 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.109"
659 -RDEPEND="
660 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
661 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
662 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
663 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
664 - llvm? (
665 - video_cards_radeonsi? (
666 - virtual/libelf:0=[${MULTILIB_USEDEP}]
667 - )
668 - video_cards_r600? (
669 - virtual/libelf:0=[${MULTILIB_USEDEP}]
670 - )
671 - video_cards_radeon? (
672 - virtual/libelf:0=[${MULTILIB_USEDEP}]
673 - )
674 - )
675 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
676 - opencl? (
677 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
678 - dev-libs/libclc
679 - virtual/libelf:0=[${MULTILIB_USEDEP}]
680 - )
681 - vaapi? (
682 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
683 - )
684 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
685 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
686 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
687 - wayland? (
688 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
689 - )
690 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
691 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
692 - X? (
693 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
694 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
695 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
696 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
697 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
698 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
699 - )
700 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
701 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
702 -"
703 -for card in ${RADEON_CARDS}; do
704 - RDEPEND="${RDEPEND}
705 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
706 - "
707 -done
708 -RDEPEND="${RDEPEND}
709 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
710 -"
711 -
712 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
713 -# we need to *really* make sure we're not pulling one than more slot
714 -# simultaneously.
715 -#
716 -# How to use it:
717 -# 1. List all the working slots (with min versions) in ||, newest first.
718 -# 2. Update the := to specify *max* version, e.g. < 10.
719 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
720 -LLVM_MAX_SLOT="13"
721 -LLVM_DEPSTR="
722 - || (
723 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
724 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
725 - sys-devel/llvm:11[${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.1.ebuild b/media-libs/mesa/mesa-22.0.1.ebuild
1072 deleted file mode 100644
1073 index 15b5138f55fb..000000000000
1074 --- a/media-libs/mesa/mesa-22.0.1.ebuild
1075 +++ /dev/null
1076 @@ -1,463 +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 - sys-devel/llvm:11[${MULTILIB_USEDEP}]
1196 - )
1197 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1198 -"
1199 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1200 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1201 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1202 -RDEPEND="${RDEPEND}
1203 - llvm? (
1204 - opencl? (
1205 - video_cards_r600? (
1206 - ${CLANG_DEPSTR_AMDGPU}
1207 - )
1208 - !video_cards_r600? (
1209 - video_cards_radeonsi? (
1210 - ${CLANG_DEPSTR_AMDGPU}
1211 - )
1212 - )
1213 - !video_cards_r600? (
1214 - !video_cards_radeonsi? (
1215 - video_cards_radeon? (
1216 - ${CLANG_DEPSTR_AMDGPU}
1217 - )
1218 - )
1219 - )
1220 - !video_cards_r600? (
1221 - !video_cards_radeon? (
1222 - !video_cards_radeonsi? (
1223 - ${CLANG_DEPSTR}
1224 - )
1225 - )
1226 - )
1227 - )
1228 - !opencl? (
1229 - video_cards_r600? (
1230 - ${LLVM_DEPSTR_AMDGPU}
1231 - )
1232 - !video_cards_r600? (
1233 - video_cards_radeonsi? (
1234 - ${LLVM_DEPSTR_AMDGPU}
1235 - )
1236 - )
1237 - !video_cards_r600? (
1238 - !video_cards_radeonsi? (
1239 - video_cards_radeon? (
1240 - ${LLVM_DEPSTR_AMDGPU}
1241 - )
1242 - )
1243 - )
1244 - !video_cards_r600? (
1245 - !video_cards_radeon? (
1246 - !video_cards_radeonsi? (
1247 - ${LLVM_DEPSTR}
1248 - )
1249 - )
1250 - )
1251 - )
1252 - )
1253 -"
1254 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1255 -
1256 -DEPEND="${RDEPEND}
1257 - valgrind? ( dev-util/valgrind )
1258 - wayland? ( >=dev-libs/wayland-protocols-1.24 )
1259 - X? (
1260 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1261 - x11-base/xorg-proto
1262 - )
1263 -"
1264 -BDEPEND="
1265 - ${PYTHON_DEPS}
1266 - opencl? (
1267 - >=sys-devel/gcc-4.6
1268 - )
1269 - sys-devel/bison
1270 - sys-devel/flex
1271 - virtual/pkgconfig
1272 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1273 - wayland? ( dev-util/wayland-scanner )
1274 -"
1275 -
1276 -S="${WORKDIR}/${MY_P}"
1277 -EGIT_CHECKOUT_DIR=${S}
1278 -
1279 -QA_WX_LOAD="
1280 -x86? (
1281 - usr/lib*/libglapi.so.0.0.0
1282 - usr/lib*/libGLESv1_CM.so.1.1.0
1283 - usr/lib*/libGLESv2.so.2.0.0
1284 - usr/lib*/libGL.so.1.2.0
1285 - usr/lib*/libOSMesa.so.8.0.0
1286 - usr/lib/libGLX_mesa.so.0.0.0
1287 -)"
1288 -
1289 -llvm_check_deps() {
1290 - local flags=${MULTILIB_USEDEP}
1291 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1292 - then
1293 - flags+=",llvm_targets_AMDGPU(-)"
1294 - fi
1295 -
1296 - if use opencl; then
1297 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1298 - fi
1299 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1300 -}
1301 -
1302 -pkg_pretend() {
1303 - if use vulkan; then
1304 - if ! use video_cards_freedreno &&
1305 - ! use video_cards_intel &&
1306 - ! use video_cards_radeonsi &&
1307 - ! use video_cards_v3d; then
1308 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d"
1309 - fi
1310 - fi
1311 -
1312 - if use opencl; then
1313 - if ! use video_cards_r600 &&
1314 - ! use video_cards_radeonsi; then
1315 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1316 - fi
1317 - fi
1318 -
1319 - if use vaapi; then
1320 - if ! use video_cards_r600 &&
1321 - ! use video_cards_radeonsi &&
1322 - ! use video_cards_nouveau; then
1323 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1324 - fi
1325 - fi
1326 -
1327 - if use vdpau; then
1328 - if ! use video_cards_r300 &&
1329 - ! use video_cards_r600 &&
1330 - ! use video_cards_radeonsi &&
1331 - ! use video_cards_nouveau; then
1332 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1333 - fi
1334 - fi
1335 -
1336 - if use xa; then
1337 - if ! use video_cards_freedreno &&
1338 - ! use video_cards_nouveau &&
1339 - ! use video_cards_vmware; then
1340 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1341 - fi
1342 - fi
1343 -
1344 - if use xvmc; then
1345 - if ! use video_cards_r600 &&
1346 - ! use video_cards_nouveau; then
1347 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1348 - fi
1349 - fi
1350 -
1351 - if ! use llvm; then
1352 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1353 - fi
1354 -
1355 - if use osmesa && ! use llvm; then
1356 - ewarn "OSMesa will be slow without enabling USE=llvm"
1357 - fi
1358 -}
1359 -
1360 -python_check_deps() {
1361 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
1362 -}
1363 -
1364 -pkg_setup() {
1365 - # warning message for bug 459306
1366 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1367 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1368 - ewarn "detected! This can cause problems. For details, see bug 459306."
1369 - fi
1370 -
1371 - if use video_cards_intel ||
1372 - use video_cards_radeonsi; then
1373 - if kernel_is -ge 5 11 3; then
1374 - CONFIG_CHECK="~KCMP"
1375 - elif kernel_is -ge 5 11; then
1376 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1377 - elif kernel_is -ge 5 10 20; then
1378 - CONFIG_CHECK="~KCMP"
1379 - else
1380 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1381 - fi
1382 - linux-info_pkg_setup
1383 - fi
1384 -
1385 - if use llvm; then
1386 - llvm_pkg_setup
1387 - fi
1388 - python-any-r1_pkg_setup
1389 -}
1390 -
1391 -multilib_src_configure() {
1392 - local emesonargs=()
1393 -
1394 - local platforms
1395 - use X && platforms+="x11"
1396 - use wayland && platforms+=",wayland"
1397 - emesonargs+=(-Dplatforms=${platforms#,})
1398 -
1399 - if use video_cards_intel ||
1400 - use video_cards_r300 ||
1401 - use video_cards_r600 ||
1402 - use video_cards_radeonsi ||
1403 - use video_cards_nouveau ||
1404 - use video_cards_vmware; then
1405 - emesonargs+=($(meson_use d3d9 gallium-nine))
1406 - else
1407 - emesonargs+=(-Dgallium-nine=false)
1408 - fi
1409 -
1410 - if use video_cards_r600 ||
1411 - use video_cards_radeonsi ||
1412 - use video_cards_nouveau; then
1413 - emesonargs+=($(meson_feature vaapi gallium-va))
1414 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1415 - else
1416 - emesonargs+=(-Dgallium-va=disabled)
1417 - fi
1418 -
1419 - if use video_cards_r300 ||
1420 - use video_cards_r600 ||
1421 - use video_cards_radeonsi ||
1422 - use video_cards_nouveau; then
1423 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
1424 - else
1425 - emesonargs+=(-Dgallium-vdpau=disabled)
1426 - fi
1427 -
1428 - if use video_cards_freedreno ||
1429 - use video_cards_nouveau ||
1430 - use video_cards_vmware; then
1431 - emesonargs+=($(meson_feature xa gallium-xa))
1432 - else
1433 - emesonargs+=(-Dgallium-xa=disabled)
1434 - fi
1435 -
1436 - if use video_cards_r600 ||
1437 - use video_cards_nouveau; then
1438 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
1439 - else
1440 - emesonargs+=(-Dgallium-xvmc=disabled)
1441 - fi
1442 -
1443 - if use video_cards_freedreno ||
1444 - use video_cards_lima ||
1445 - use video_cards_panfrost ||
1446 - use video_cards_v3d ||
1447 - use video_cards_vc4 ||
1448 - use video_cards_vivante; then
1449 - gallium_enable -- kmsro
1450 - fi
1451 -
1452 - gallium_enable -- swrast
1453 - gallium_enable video_cards_freedreno freedreno
1454 - gallium_enable video_cards_intel crocus i915 iris
1455 - gallium_enable video_cards_lima lima
1456 - gallium_enable video_cards_nouveau nouveau
1457 - gallium_enable video_cards_panfrost panfrost
1458 - gallium_enable video_cards_v3d v3d
1459 - gallium_enable video_cards_vc4 vc4
1460 - gallium_enable video_cards_virgl virgl
1461 - gallium_enable video_cards_vivante etnaviv
1462 - gallium_enable video_cards_vmware svga
1463 - gallium_enable zink zink
1464 -
1465 - gallium_enable video_cards_r300 r300
1466 - gallium_enable video_cards_r600 r600
1467 - gallium_enable video_cards_radeonsi radeonsi
1468 - if ! use video_cards_r300 && \
1469 - ! use video_cards_r600; then
1470 - gallium_enable video_cards_radeon r300 r600
1471 - fi
1472 -
1473 - # opencl stuff
1474 - emesonargs+=(
1475 - -Dgallium-opencl="$(usex opencl icd disabled)"
1476 - )
1477 -
1478 - if use vulkan; then
1479 - vulkan_enable video_cards_freedreno freedreno
1480 - vulkan_enable video_cards_intel intel
1481 - vulkan_enable video_cards_radeonsi amd
1482 - vulkan_enable video_cards_v3d broadcom
1483 - fi
1484 -
1485 - driver_list() {
1486 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1487 - echo "${drivers//$'\n'/,}"
1488 - }
1489 -
1490 - local vulkan_layers
1491 - use vulkan && vulkan_layers+="device-select"
1492 - use vulkan-overlay && vulkan_layers+=",overlay"
1493 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
1494 -
1495 - emesonargs+=(
1496 - $(meson_use test build-tests)
1497 - -Dglx=$(usex X dri disabled)
1498 - -Dshared-glapi=enabled
1499 - -Ddri3=enabled
1500 - -Degl=enabled
1501 - -Dgbm=enabled
1502 - -Dglvnd=true
1503 - $(meson_feature gles1)
1504 - $(meson_feature gles2)
1505 - $(meson_feature llvm)
1506 - $(meson_feature lm-sensors lmsensors)
1507 - $(meson_use osmesa)
1508 - $(meson_use selinux)
1509 - $(meson_feature unwind libunwind)
1510 - $(meson_feature zstd)
1511 - $(meson_use cpu_flags_x86_sse2 sse2)
1512 - -Dvalgrind=$(usex valgrind auto disabled)
1513 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1514 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1515 - --buildtype $(usex debug debug plain)
1516 - -Db_ndebug=$(usex debug false true)
1517 - )
1518 - meson_src_configure
1519 -}
1520 -
1521 -multilib_src_test() {
1522 - meson_src_test -t 100
1523 -}
1524 -
1525 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1526 -# other args - names of DRI drivers to enable
1527 -gallium_enable() {
1528 - if [[ $1 == -- ]] || use $1; then
1529 - shift
1530 - GALLIUM_DRIVERS+=("$@")
1531 - fi
1532 -}
1533 -
1534 -vulkan_enable() {
1535 - if [[ $1 == -- ]] || use $1; then
1536 - shift
1537 - VULKAN_DRIVERS+=("$@")
1538 - fi
1539 -}
1540
1541 diff --git a/media-libs/mesa/mesa-22.0.2.ebuild b/media-libs/mesa/mesa-22.0.2.ebuild
1542 deleted file mode 100644
1543 index 15b5138f55fb..000000000000
1544 --- a/media-libs/mesa/mesa-22.0.2.ebuild
1545 +++ /dev/null
1546 @@ -1,463 +0,0 @@
1547 -# Copyright 1999-2022 Gentoo Authors
1548 -# Distributed under the terms of the GNU General Public License v2
1549 -
1550 -EAPI=7
1551 -
1552 -PYTHON_COMPAT=( python3_{8..10} )
1553 -
1554 -inherit llvm meson-multilib python-any-r1 linux-info
1555 -
1556 -MY_P="${P/_/-}"
1557 -
1558 -DESCRIPTION="OpenGL-like graphic library for Linux"
1559 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1560 -
1561 -if [[ ${PV} == 9999 ]]; then
1562 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1563 - inherit git-r3
1564 -else
1565 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
1566 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1567 -fi
1568 -
1569 -LICENSE="MIT"
1570 -SLOT="0"
1571 -RESTRICT="
1572 - !test? ( test )
1573 -"
1574 -
1575 -RADEON_CARDS="r300 r600 radeon radeonsi"
1576 -VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
1577 -for card in ${VIDEO_CARDS}; do
1578 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1579 -done
1580 -
1581 -IUSE="${IUSE_VIDEO_CARDS}
1582 - cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
1583 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
1584 - vulkan-overlay wayland +X xa xvmc zink +zstd"
1585 -
1586 -REQUIRED_USE="
1587 - d3d9? ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1588 - vulkan? ( video_cards_radeonsi? ( llvm ) )
1589 - vulkan-overlay? ( vulkan )
1590 - video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
1591 - video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
1592 - video_cards_radeonsi? ( llvm )
1593 - xa? ( X )
1594 - xvmc? ( X )
1595 - zink? ( vulkan )
1596 -"
1597 -
1598 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.109"
1599 -RDEPEND="
1600 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1601 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
1602 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1603 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1604 - llvm? (
1605 - video_cards_radeonsi? (
1606 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1607 - )
1608 - video_cards_r600? (
1609 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1610 - )
1611 - video_cards_radeon? (
1612 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1613 - )
1614 - )
1615 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
1616 - opencl? (
1617 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
1618 - dev-libs/libclc
1619 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1620 - )
1621 - vaapi? (
1622 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1623 - )
1624 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1625 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1626 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
1627 - wayland? (
1628 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
1629 - )
1630 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1631 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
1632 - X? (
1633 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1634 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1635 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1636 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1637 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1638 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1639 - )
1640 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
1641 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
1642 -"
1643 -for card in ${RADEON_CARDS}; do
1644 - RDEPEND="${RDEPEND}
1645 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1646 - "
1647 -done
1648 -RDEPEND="${RDEPEND}
1649 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1650 -"
1651 -
1652 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1653 -# we need to *really* make sure we're not pulling one than more slot
1654 -# simultaneously.
1655 -#
1656 -# How to use it:
1657 -# 1. List all the working slots (with min versions) in ||, newest first.
1658 -# 2. Update the := to specify *max* version, e.g. < 10.
1659 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
1660 -LLVM_MAX_SLOT="13"
1661 -LLVM_DEPSTR="
1662 - || (
1663 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
1664 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
1665 - sys-devel/llvm:11[${MULTILIB_USEDEP}]
1666 - )
1667 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1668 -"
1669 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1670 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1671 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1672 -RDEPEND="${RDEPEND}
1673 - llvm? (
1674 - opencl? (
1675 - video_cards_r600? (
1676 - ${CLANG_DEPSTR_AMDGPU}
1677 - )
1678 - !video_cards_r600? (
1679 - video_cards_radeonsi? (
1680 - ${CLANG_DEPSTR_AMDGPU}
1681 - )
1682 - )
1683 - !video_cards_r600? (
1684 - !video_cards_radeonsi? (
1685 - video_cards_radeon? (
1686 - ${CLANG_DEPSTR_AMDGPU}
1687 - )
1688 - )
1689 - )
1690 - !video_cards_r600? (
1691 - !video_cards_radeon? (
1692 - !video_cards_radeonsi? (
1693 - ${CLANG_DEPSTR}
1694 - )
1695 - )
1696 - )
1697 - )
1698 - !opencl? (
1699 - video_cards_r600? (
1700 - ${LLVM_DEPSTR_AMDGPU}
1701 - )
1702 - !video_cards_r600? (
1703 - video_cards_radeonsi? (
1704 - ${LLVM_DEPSTR_AMDGPU}
1705 - )
1706 - )
1707 - !video_cards_r600? (
1708 - !video_cards_radeonsi? (
1709 - video_cards_radeon? (
1710 - ${LLVM_DEPSTR_AMDGPU}
1711 - )
1712 - )
1713 - )
1714 - !video_cards_r600? (
1715 - !video_cards_radeon? (
1716 - !video_cards_radeonsi? (
1717 - ${LLVM_DEPSTR}
1718 - )
1719 - )
1720 - )
1721 - )
1722 - )
1723 -"
1724 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1725 -
1726 -DEPEND="${RDEPEND}
1727 - valgrind? ( dev-util/valgrind )
1728 - wayland? ( >=dev-libs/wayland-protocols-1.24 )
1729 - X? (
1730 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1731 - x11-base/xorg-proto
1732 - )
1733 -"
1734 -BDEPEND="
1735 - ${PYTHON_DEPS}
1736 - opencl? (
1737 - >=sys-devel/gcc-4.6
1738 - )
1739 - sys-devel/bison
1740 - sys-devel/flex
1741 - virtual/pkgconfig
1742 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1743 - wayland? ( dev-util/wayland-scanner )
1744 -"
1745 -
1746 -S="${WORKDIR}/${MY_P}"
1747 -EGIT_CHECKOUT_DIR=${S}
1748 -
1749 -QA_WX_LOAD="
1750 -x86? (
1751 - usr/lib*/libglapi.so.0.0.0
1752 - usr/lib*/libGLESv1_CM.so.1.1.0
1753 - usr/lib*/libGLESv2.so.2.0.0
1754 - usr/lib*/libGL.so.1.2.0
1755 - usr/lib*/libOSMesa.so.8.0.0
1756 - usr/lib/libGLX_mesa.so.0.0.0
1757 -)"
1758 -
1759 -llvm_check_deps() {
1760 - local flags=${MULTILIB_USEDEP}
1761 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1762 - then
1763 - flags+=",llvm_targets_AMDGPU(-)"
1764 - fi
1765 -
1766 - if use opencl; then
1767 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1768 - fi
1769 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1770 -}
1771 -
1772 -pkg_pretend() {
1773 - if use vulkan; then
1774 - if ! use video_cards_freedreno &&
1775 - ! use video_cards_intel &&
1776 - ! use video_cards_radeonsi &&
1777 - ! use video_cards_v3d; then
1778 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d"
1779 - fi
1780 - fi
1781 -
1782 - if use opencl; then
1783 - if ! use video_cards_r600 &&
1784 - ! use video_cards_radeonsi; then
1785 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1786 - fi
1787 - fi
1788 -
1789 - if use vaapi; then
1790 - if ! use video_cards_r600 &&
1791 - ! use video_cards_radeonsi &&
1792 - ! use video_cards_nouveau; then
1793 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1794 - fi
1795 - fi
1796 -
1797 - if use vdpau; then
1798 - if ! use video_cards_r300 &&
1799 - ! use video_cards_r600 &&
1800 - ! use video_cards_radeonsi &&
1801 - ! use video_cards_nouveau; then
1802 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1803 - fi
1804 - fi
1805 -
1806 - if use xa; then
1807 - if ! use video_cards_freedreno &&
1808 - ! use video_cards_nouveau &&
1809 - ! use video_cards_vmware; then
1810 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1811 - fi
1812 - fi
1813 -
1814 - if use xvmc; then
1815 - if ! use video_cards_r600 &&
1816 - ! use video_cards_nouveau; then
1817 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1818 - fi
1819 - fi
1820 -
1821 - if ! use llvm; then
1822 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1823 - fi
1824 -
1825 - if use osmesa && ! use llvm; then
1826 - ewarn "OSMesa will be slow without enabling USE=llvm"
1827 - fi
1828 -}
1829 -
1830 -python_check_deps() {
1831 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
1832 -}
1833 -
1834 -pkg_setup() {
1835 - # warning message for bug 459306
1836 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1837 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1838 - ewarn "detected! This can cause problems. For details, see bug 459306."
1839 - fi
1840 -
1841 - if use video_cards_intel ||
1842 - use video_cards_radeonsi; then
1843 - if kernel_is -ge 5 11 3; then
1844 - CONFIG_CHECK="~KCMP"
1845 - elif kernel_is -ge 5 11; then
1846 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1847 - elif kernel_is -ge 5 10 20; then
1848 - CONFIG_CHECK="~KCMP"
1849 - else
1850 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1851 - fi
1852 - linux-info_pkg_setup
1853 - fi
1854 -
1855 - if use llvm; then
1856 - llvm_pkg_setup
1857 - fi
1858 - python-any-r1_pkg_setup
1859 -}
1860 -
1861 -multilib_src_configure() {
1862 - local emesonargs=()
1863 -
1864 - local platforms
1865 - use X && platforms+="x11"
1866 - use wayland && platforms+=",wayland"
1867 - emesonargs+=(-Dplatforms=${platforms#,})
1868 -
1869 - if use video_cards_intel ||
1870 - use video_cards_r300 ||
1871 - use video_cards_r600 ||
1872 - use video_cards_radeonsi ||
1873 - use video_cards_nouveau ||
1874 - use video_cards_vmware; then
1875 - emesonargs+=($(meson_use d3d9 gallium-nine))
1876 - else
1877 - emesonargs+=(-Dgallium-nine=false)
1878 - fi
1879 -
1880 - if use video_cards_r600 ||
1881 - use video_cards_radeonsi ||
1882 - use video_cards_nouveau; then
1883 - emesonargs+=($(meson_feature vaapi gallium-va))
1884 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1885 - else
1886 - emesonargs+=(-Dgallium-va=disabled)
1887 - fi
1888 -
1889 - if use video_cards_r300 ||
1890 - use video_cards_r600 ||
1891 - use video_cards_radeonsi ||
1892 - use video_cards_nouveau; then
1893 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
1894 - else
1895 - emesonargs+=(-Dgallium-vdpau=disabled)
1896 - fi
1897 -
1898 - if use video_cards_freedreno ||
1899 - use video_cards_nouveau ||
1900 - use video_cards_vmware; then
1901 - emesonargs+=($(meson_feature xa gallium-xa))
1902 - else
1903 - emesonargs+=(-Dgallium-xa=disabled)
1904 - fi
1905 -
1906 - if use video_cards_r600 ||
1907 - use video_cards_nouveau; then
1908 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
1909 - else
1910 - emesonargs+=(-Dgallium-xvmc=disabled)
1911 - fi
1912 -
1913 - if use video_cards_freedreno ||
1914 - use video_cards_lima ||
1915 - use video_cards_panfrost ||
1916 - use video_cards_v3d ||
1917 - use video_cards_vc4 ||
1918 - use video_cards_vivante; then
1919 - gallium_enable -- kmsro
1920 - fi
1921 -
1922 - gallium_enable -- swrast
1923 - gallium_enable video_cards_freedreno freedreno
1924 - gallium_enable video_cards_intel crocus i915 iris
1925 - gallium_enable video_cards_lima lima
1926 - gallium_enable video_cards_nouveau nouveau
1927 - gallium_enable video_cards_panfrost panfrost
1928 - gallium_enable video_cards_v3d v3d
1929 - gallium_enable video_cards_vc4 vc4
1930 - gallium_enable video_cards_virgl virgl
1931 - gallium_enable video_cards_vivante etnaviv
1932 - gallium_enable video_cards_vmware svga
1933 - gallium_enable zink zink
1934 -
1935 - gallium_enable video_cards_r300 r300
1936 - gallium_enable video_cards_r600 r600
1937 - gallium_enable video_cards_radeonsi radeonsi
1938 - if ! use video_cards_r300 && \
1939 - ! use video_cards_r600; then
1940 - gallium_enable video_cards_radeon r300 r600
1941 - fi
1942 -
1943 - # opencl stuff
1944 - emesonargs+=(
1945 - -Dgallium-opencl="$(usex opencl icd disabled)"
1946 - )
1947 -
1948 - if use vulkan; then
1949 - vulkan_enable video_cards_freedreno freedreno
1950 - vulkan_enable video_cards_intel intel
1951 - vulkan_enable video_cards_radeonsi amd
1952 - vulkan_enable video_cards_v3d broadcom
1953 - fi
1954 -
1955 - driver_list() {
1956 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1957 - echo "${drivers//$'\n'/,}"
1958 - }
1959 -
1960 - local vulkan_layers
1961 - use vulkan && vulkan_layers+="device-select"
1962 - use vulkan-overlay && vulkan_layers+=",overlay"
1963 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
1964 -
1965 - emesonargs+=(
1966 - $(meson_use test build-tests)
1967 - -Dglx=$(usex X dri disabled)
1968 - -Dshared-glapi=enabled
1969 - -Ddri3=enabled
1970 - -Degl=enabled
1971 - -Dgbm=enabled
1972 - -Dglvnd=true
1973 - $(meson_feature gles1)
1974 - $(meson_feature gles2)
1975 - $(meson_feature llvm)
1976 - $(meson_feature lm-sensors lmsensors)
1977 - $(meson_use osmesa)
1978 - $(meson_use selinux)
1979 - $(meson_feature unwind libunwind)
1980 - $(meson_feature zstd)
1981 - $(meson_use cpu_flags_x86_sse2 sse2)
1982 - -Dvalgrind=$(usex valgrind auto disabled)
1983 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1984 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1985 - --buildtype $(usex debug debug plain)
1986 - -Db_ndebug=$(usex debug false true)
1987 - )
1988 - meson_src_configure
1989 -}
1990 -
1991 -multilib_src_test() {
1992 - meson_src_test -t 100
1993 -}
1994 -
1995 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1996 -# other args - names of DRI drivers to enable
1997 -gallium_enable() {
1998 - if [[ $1 == -- ]] || use $1; then
1999 - shift
2000 - GALLIUM_DRIVERS+=("$@")
2001 - fi
2002 -}
2003 -
2004 -vulkan_enable() {
2005 - if [[ $1 == -- ]] || use $1; then
2006 - shift
2007 - VULKAN_DRIVERS+=("$@")
2008 - fi
2009 -}
2010
2011 diff --git a/media-libs/mesa/mesa-22.1.0_rc3.ebuild b/media-libs/mesa/mesa-22.1.0_rc3.ebuild
2012 deleted file mode 100644
2013 index a01a3030e452..000000000000
2014 --- a/media-libs/mesa/mesa-22.1.0_rc3.ebuild
2015 +++ /dev/null
2016 @@ -1,463 +0,0 @@
2017 -# Copyright 1999-2022 Gentoo Authors
2018 -# Distributed under the terms of the GNU General Public License v2
2019 -
2020 -EAPI=7
2021 -
2022 -PYTHON_COMPAT=( python3_{8..10} )
2023 -
2024 -inherit llvm meson-multilib python-any-r1 linux-info
2025 -
2026 -MY_P="${P/_/-}"
2027 -
2028 -DESCRIPTION="OpenGL-like graphic library for Linux"
2029 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2030 -
2031 -if [[ ${PV} == 9999 ]]; then
2032 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
2033 - inherit git-r3
2034 -else
2035 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
2036 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
2037 -fi
2038 -
2039 -LICENSE="MIT"
2040 -SLOT="0"
2041 -RESTRICT="
2042 - !test? ( test )
2043 -"
2044 -
2045 -RADEON_CARDS="r300 r600 radeon radeonsi"
2046 -VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
2047 -for card in ${VIDEO_CARDS}; do
2048 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2049 -done
2050 -
2051 -IUSE="${IUSE_VIDEO_CARDS}
2052 - cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
2053 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
2054 - vulkan-overlay wayland +X xa xvmc zink +zstd"
2055 -
2056 -REQUIRED_USE="
2057 - d3d9? ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
2058 - vulkan? ( video_cards_radeonsi? ( llvm ) )
2059 - vulkan-overlay? ( vulkan )
2060 - video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
2061 - video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
2062 - video_cards_radeonsi? ( llvm )
2063 - xa? ( X )
2064 - xvmc? ( X )
2065 - zink? ( vulkan )
2066 -"
2067 -
2068 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
2069 -RDEPEND="
2070 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2071 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
2072 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2073 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2074 - llvm? (
2075 - video_cards_radeonsi? (
2076 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2077 - )
2078 - video_cards_r600? (
2079 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2080 - )
2081 - video_cards_radeon? (
2082 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2083 - )
2084 - )
2085 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
2086 - opencl? (
2087 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
2088 - dev-libs/libclc
2089 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2090 - )
2091 - vaapi? (
2092 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2093 - )
2094 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2095 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2096 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
2097 - wayland? (
2098 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
2099 - )
2100 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2101 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
2102 - X? (
2103 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2104 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2105 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2106 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2107 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
2108 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2109 - )
2110 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
2111 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
2112 -"
2113 -for card in ${RADEON_CARDS}; do
2114 - RDEPEND="${RDEPEND}
2115 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2116 - "
2117 -done
2118 -RDEPEND="${RDEPEND}
2119 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2120 -"
2121 -
2122 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2123 -# we need to *really* make sure we're not pulling one than more slot
2124 -# simultaneously.
2125 -#
2126 -# How to use it:
2127 -# 1. List all the working slots (with min versions) in ||, newest first.
2128 -# 2. Update the := to specify *max* version, e.g. < 10.
2129 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
2130 -LLVM_MAX_SLOT="14"
2131 -LLVM_DEPSTR="
2132 - || (
2133 - sys-devel/llvm:14[${MULTILIB_USEDEP}]
2134 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
2135 - sys-devel/llvm:12[${MULTILIB_USEDEP}]
2136 - )
2137 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
2138 -"
2139 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2140 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2141 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2142 -RDEPEND="${RDEPEND}
2143 - llvm? (
2144 - opencl? (
2145 - video_cards_r600? (
2146 - ${CLANG_DEPSTR_AMDGPU}
2147 - )
2148 - !video_cards_r600? (
2149 - video_cards_radeonsi? (
2150 - ${CLANG_DEPSTR_AMDGPU}
2151 - )
2152 - )
2153 - !video_cards_r600? (
2154 - !video_cards_radeonsi? (
2155 - video_cards_radeon? (
2156 - ${CLANG_DEPSTR_AMDGPU}
2157 - )
2158 - )
2159 - )
2160 - !video_cards_r600? (
2161 - !video_cards_radeon? (
2162 - !video_cards_radeonsi? (
2163 - ${CLANG_DEPSTR}
2164 - )
2165 - )
2166 - )
2167 - )
2168 - !opencl? (
2169 - video_cards_r600? (
2170 - ${LLVM_DEPSTR_AMDGPU}
2171 - )
2172 - !video_cards_r600? (
2173 - video_cards_radeonsi? (
2174 - ${LLVM_DEPSTR_AMDGPU}
2175 - )
2176 - )
2177 - !video_cards_r600? (
2178 - !video_cards_radeonsi? (
2179 - video_cards_radeon? (
2180 - ${LLVM_DEPSTR_AMDGPU}
2181 - )
2182 - )
2183 - )
2184 - !video_cards_r600? (
2185 - !video_cards_radeon? (
2186 - !video_cards_radeonsi? (
2187 - ${LLVM_DEPSTR}
2188 - )
2189 - )
2190 - )
2191 - )
2192 - )
2193 -"
2194 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
2195 -
2196 -DEPEND="${RDEPEND}
2197 - valgrind? ( dev-util/valgrind )
2198 - wayland? ( >=dev-libs/wayland-protocols-1.24 )
2199 - X? (
2200 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2201 - x11-base/xorg-proto
2202 - )
2203 -"
2204 -BDEPEND="
2205 - ${PYTHON_DEPS}
2206 - opencl? (
2207 - >=sys-devel/gcc-4.6
2208 - )
2209 - sys-devel/bison
2210 - sys-devel/flex
2211 - virtual/pkgconfig
2212 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
2213 - wayland? ( dev-util/wayland-scanner )
2214 -"
2215 -
2216 -S="${WORKDIR}/${MY_P}"
2217 -EGIT_CHECKOUT_DIR=${S}
2218 -
2219 -QA_WX_LOAD="
2220 -x86? (
2221 - usr/lib*/libglapi.so.0.0.0
2222 - usr/lib*/libGLESv1_CM.so.1.1.0
2223 - usr/lib*/libGLESv2.so.2.0.0
2224 - usr/lib*/libGL.so.1.2.0
2225 - usr/lib*/libOSMesa.so.8.0.0
2226 - usr/lib/libGLX_mesa.so.0.0.0
2227 -)"
2228 -
2229 -llvm_check_deps() {
2230 - local flags=${MULTILIB_USEDEP}
2231 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
2232 - then
2233 - flags+=",llvm_targets_AMDGPU(-)"
2234 - fi
2235 -
2236 - if use opencl; then
2237 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
2238 - fi
2239 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
2240 -}
2241 -
2242 -pkg_pretend() {
2243 - if use vulkan; then
2244 - if ! use video_cards_freedreno &&
2245 - ! use video_cards_intel &&
2246 - ! use video_cards_radeonsi &&
2247 - ! use video_cards_v3d; then
2248 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d"
2249 - fi
2250 - fi
2251 -
2252 - if use opencl; then
2253 - if ! use video_cards_r600 &&
2254 - ! use video_cards_radeonsi; then
2255 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
2256 - fi
2257 - fi
2258 -
2259 - if use vaapi; then
2260 - if ! use video_cards_r600 &&
2261 - ! use video_cards_radeonsi &&
2262 - ! use video_cards_nouveau; then
2263 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
2264 - fi
2265 - fi
2266 -
2267 - if use vdpau; then
2268 - if ! use video_cards_r300 &&
2269 - ! use video_cards_r600 &&
2270 - ! use video_cards_radeonsi &&
2271 - ! use video_cards_nouveau; then
2272 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
2273 - fi
2274 - fi
2275 -
2276 - if use xa; then
2277 - if ! use video_cards_freedreno &&
2278 - ! use video_cards_nouveau &&
2279 - ! use video_cards_vmware; then
2280 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
2281 - fi
2282 - fi
2283 -
2284 - if use xvmc; then
2285 - if ! use video_cards_r600 &&
2286 - ! use video_cards_nouveau; then
2287 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2288 - fi
2289 - fi
2290 -
2291 - if ! use llvm; then
2292 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2293 - fi
2294 -
2295 - if use osmesa && ! use llvm; then
2296 - ewarn "OSMesa will be slow without enabling USE=llvm"
2297 - fi
2298 -}
2299 -
2300 -python_check_deps() {
2301 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
2302 -}
2303 -
2304 -pkg_setup() {
2305 - # warning message for bug 459306
2306 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2307 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2308 - ewarn "detected! This can cause problems. For details, see bug 459306."
2309 - fi
2310 -
2311 - if use video_cards_intel ||
2312 - use video_cards_radeonsi; then
2313 - if kernel_is -ge 5 11 3; then
2314 - CONFIG_CHECK="~KCMP"
2315 - elif kernel_is -ge 5 11; then
2316 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
2317 - elif kernel_is -ge 5 10 20; then
2318 - CONFIG_CHECK="~KCMP"
2319 - else
2320 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
2321 - fi
2322 - linux-info_pkg_setup
2323 - fi
2324 -
2325 - if use llvm; then
2326 - llvm_pkg_setup
2327 - fi
2328 - python-any-r1_pkg_setup
2329 -}
2330 -
2331 -multilib_src_configure() {
2332 - local emesonargs=()
2333 -
2334 - local platforms
2335 - use X && platforms+="x11"
2336 - use wayland && platforms+=",wayland"
2337 - emesonargs+=(-Dplatforms=${platforms#,})
2338 -
2339 - if use video_cards_intel ||
2340 - use video_cards_r300 ||
2341 - use video_cards_r600 ||
2342 - use video_cards_radeonsi ||
2343 - use video_cards_nouveau ||
2344 - use video_cards_vmware; then
2345 - emesonargs+=($(meson_use d3d9 gallium-nine))
2346 - else
2347 - emesonargs+=(-Dgallium-nine=false)
2348 - fi
2349 -
2350 - if use video_cards_r600 ||
2351 - use video_cards_radeonsi ||
2352 - use video_cards_nouveau; then
2353 - emesonargs+=($(meson_feature vaapi gallium-va))
2354 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
2355 - else
2356 - emesonargs+=(-Dgallium-va=disabled)
2357 - fi
2358 -
2359 - if use video_cards_r300 ||
2360 - use video_cards_r600 ||
2361 - use video_cards_radeonsi ||
2362 - use video_cards_nouveau; then
2363 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
2364 - else
2365 - emesonargs+=(-Dgallium-vdpau=disabled)
2366 - fi
2367 -
2368 - if use video_cards_freedreno ||
2369 - use video_cards_nouveau ||
2370 - use video_cards_vmware; then
2371 - emesonargs+=($(meson_feature xa gallium-xa))
2372 - else
2373 - emesonargs+=(-Dgallium-xa=disabled)
2374 - fi
2375 -
2376 - if use video_cards_r600 ||
2377 - use video_cards_nouveau; then
2378 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
2379 - else
2380 - emesonargs+=(-Dgallium-xvmc=disabled)
2381 - fi
2382 -
2383 - if use video_cards_freedreno ||
2384 - use video_cards_lima ||
2385 - use video_cards_panfrost ||
2386 - use video_cards_v3d ||
2387 - use video_cards_vc4 ||
2388 - use video_cards_vivante; then
2389 - gallium_enable -- kmsro
2390 - fi
2391 -
2392 - gallium_enable -- swrast
2393 - gallium_enable video_cards_freedreno freedreno
2394 - gallium_enable video_cards_intel crocus i915 iris
2395 - gallium_enable video_cards_lima lima
2396 - gallium_enable video_cards_nouveau nouveau
2397 - gallium_enable video_cards_panfrost panfrost
2398 - gallium_enable video_cards_v3d v3d
2399 - gallium_enable video_cards_vc4 vc4
2400 - gallium_enable video_cards_virgl virgl
2401 - gallium_enable video_cards_vivante etnaviv
2402 - gallium_enable video_cards_vmware svga
2403 - gallium_enable zink zink
2404 -
2405 - gallium_enable video_cards_r300 r300
2406 - gallium_enable video_cards_r600 r600
2407 - gallium_enable video_cards_radeonsi radeonsi
2408 - if ! use video_cards_r300 && \
2409 - ! use video_cards_r600; then
2410 - gallium_enable video_cards_radeon r300 r600
2411 - fi
2412 -
2413 - # opencl stuff
2414 - emesonargs+=(
2415 - -Dgallium-opencl="$(usex opencl icd disabled)"
2416 - )
2417 -
2418 - if use vulkan; then
2419 - vulkan_enable video_cards_freedreno freedreno
2420 - vulkan_enable video_cards_intel intel
2421 - vulkan_enable video_cards_radeonsi amd
2422 - vulkan_enable video_cards_v3d broadcom
2423 - fi
2424 -
2425 - driver_list() {
2426 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2427 - echo "${drivers//$'\n'/,}"
2428 - }
2429 -
2430 - local vulkan_layers
2431 - use vulkan && vulkan_layers+="device-select"
2432 - use vulkan-overlay && vulkan_layers+=",overlay"
2433 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
2434 -
2435 - emesonargs+=(
2436 - $(meson_use test build-tests)
2437 - -Dglx=$(usex X dri disabled)
2438 - -Dshared-glapi=enabled
2439 - -Ddri3=enabled
2440 - -Degl=enabled
2441 - -Dgbm=enabled
2442 - -Dglvnd=true
2443 - $(meson_feature gles1)
2444 - $(meson_feature gles2)
2445 - $(meson_feature llvm)
2446 - $(meson_feature lm-sensors lmsensors)
2447 - $(meson_use osmesa)
2448 - $(meson_use selinux)
2449 - $(meson_feature unwind libunwind)
2450 - $(meson_feature zstd)
2451 - $(meson_use cpu_flags_x86_sse2 sse2)
2452 - -Dvalgrind=$(usex valgrind auto disabled)
2453 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2454 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2455 - --buildtype $(usex debug debug plain)
2456 - -Db_ndebug=$(usex debug false true)
2457 - )
2458 - meson_src_configure
2459 -}
2460 -
2461 -multilib_src_test() {
2462 - meson_src_test -t 100
2463 -}
2464 -
2465 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2466 -# other args - names of DRI drivers to enable
2467 -gallium_enable() {
2468 - if [[ $1 == -- ]] || use $1; then
2469 - shift
2470 - GALLIUM_DRIVERS+=("$@")
2471 - fi
2472 -}
2473 -
2474 -vulkan_enable() {
2475 - if [[ $1 == -- ]] || use $1; then
2476 - shift
2477 - VULKAN_DRIVERS+=("$@")
2478 - fi
2479 -}