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: Tue, 03 Jan 2023 15:55:44
Message-Id: 1672761329.66e055161fec100cfbb6388ba5468e0338fe46d6.mattst88@gentoo
1 commit: 66e055161fec100cfbb6388ba5468e0338fe46d6
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 15:29:49 2023 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 15:55:29 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66e05516
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 | 3 -
13 media-libs/mesa/mesa-22.2.3.ebuild | 476 -------------------------------------
14 media-libs/mesa/mesa-22.3.0.ebuild | 467 ------------------------------------
15 media-libs/mesa/mesa-22.3.1.ebuild | 467 ------------------------------------
16 4 files changed, 1413 deletions(-)
17
18 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
19 index 2119050b5923..0cd7924d40f5 100644
20 --- a/media-libs/mesa/Manifest
21 +++ b/media-libs/mesa/Manifest
22 @@ -1,5 +1,2 @@
23 -DIST mesa-22.2.3.tar.xz 16464020 BLAKE2B 8f1482983ff9de9565a7f48f22e315b022ea8a07d7157e0d202c4d027d13ad4563c40ea63e1d0a92675af7f23d5245be9ed137955c3a9dd85171a35d497a94b2 SHA512 08e9ce43392c46f9c0d122d70e118511eea81422d06f93ab6d330689b46feed3ac1c3bdcdcfd4a27cd5b9eaf26aab518d152a2c753f07b8ed19575d4ed892ad6
24 DIST mesa-22.2.5.tar.xz 16524904 BLAKE2B 5891e76e818dcd665ebac6dadbf223f382380206ec0edc85f8d9f6e298ab3126d9992fc7d4e38c12b455f21e6e40f3849b08ffaacc0cb38454b2e23c06277d36 SHA512 9039cf31e719b66a6ecea48e7f871d187333a1accd3fa77ce2cb36ce539682dd50f09bccc11a0c35760051768108699cf90dfb0936809faf1e1294cc5d1ec0af
25 -DIST mesa-22.3.0.tar.xz 16878600 BLAKE2B 16b11bfad509292338fc46b36e49d747e5cd43a96c753cc2a8c0b915c7b86198a30aa78c8e2bcbaa0daf8cadd79a82046cf32ee6f6e373dcc00e2fdef554bc66 SHA512 bf4d344459f97d266a5943b33aecf062b0825e13c1617afdab71c4ba6a87a201440761c9a32a6e0060910a0917122e3f4d29f666d6b94a38a71c94b9ff3ab9da
26 -DIST mesa-22.3.1.tar.xz 16972884 BLAKE2B 14c2b265af97cf0436c0f104c748952ae875caac3e48766e2bad70e500c8f87cd8e1483ed88d19efc44625058ee80b242501dad5c24c96450b7068946e352152 SHA512 8a7aee67f6351de293d23425229eb7c42d6918fe9ffb46c6e5df9609f79633c98ab78e892507fe48055c51fa88bf103d7b7baa58e826b1758f66067048baed5b
27 DIST mesa-22.3.2.tar.xz 16988720 BLAKE2B 8fdadd77a7bcac1b0ba6955b452a89cf823650ad3296128b82471888da666a33407e6ea2784ccf3f49c04a34fecfcd6a172372828fd2200e74d7dcf97e9c5938 SHA512 32934dd23cfcd6165c365597d9a469da0b806b72ea98a200f499344c3b47815db3bf78875b4ea766d2d28d9c70b50c1615d2d3fcbfd4769447fe0a9d3b32951f
28
29 diff --git a/media-libs/mesa/mesa-22.2.3.ebuild b/media-libs/mesa/mesa-22.2.3.ebuild
30 deleted file mode 100644
31 index dbced9dbf5a3..000000000000
32 --- a/media-libs/mesa/mesa-22.2.3.ebuild
33 +++ /dev/null
34 @@ -1,476 +0,0 @@
35 -# Copyright 1999-2022 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=8
39 -
40 -PYTHON_COMPAT=( python3_{8..11} )
41 -
42 -inherit llvm meson-multilib python-any-r1 linux-info
43 -
44 -MY_P="${P/_/-}"
45 -
46 -DESCRIPTION="OpenGL-like graphic library for Linux"
47 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
48 -
49 -if [[ ${PV} == 9999 ]]; then
50 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
51 - inherit git-r3
52 -else
53 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
54 - 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"
55 -fi
56 -
57 -LICENSE="MIT"
58 -SLOT="0"
59 -RESTRICT="!test? ( test )"
60 -
61 -RADEON_CARDS="r300 r600 radeon radeonsi"
62 -VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
63 -for card in ${VIDEO_CARDS}; do
64 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
65 -done
66 -
67 -IUSE="${IUSE_VIDEO_CARDS}
68 - cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
69 - lm-sensors opencl osmesa +proprietary-codecs selinux
70 - test unwind vaapi valgrind vdpau vulkan
71 - vulkan-overlay wayland +X xa xvmc zink +zstd"
72 -
73 -REQUIRED_USE="
74 - d3d9? ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
75 - vulkan? ( video_cards_radeonsi? ( llvm ) )
76 - vulkan-overlay? ( vulkan )
77 - video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
78 - video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
79 - video_cards_radeonsi? ( llvm )
80 - xa? ( X )
81 - xvmc? ( X )
82 - zink? ( vulkan )
83 -"
84 -
85 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
86 -RDEPEND="
87 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
88 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
89 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
90 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
91 - llvm? (
92 - video_cards_radeonsi? (
93 - virtual/libelf:0=[${MULTILIB_USEDEP}]
94 - )
95 - video_cards_r600? (
96 - virtual/libelf:0=[${MULTILIB_USEDEP}]
97 - )
98 - video_cards_radeon? (
99 - virtual/libelf:0=[${MULTILIB_USEDEP}]
100 - )
101 - )
102 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
103 - opencl? (
104 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
105 - dev-libs/libclc
106 - virtual/libelf:0=[${MULTILIB_USEDEP}]
107 - )
108 - vaapi? (
109 - >=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
110 - )
111 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
112 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
113 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
114 - wayland? (
115 - >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
116 - )
117 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
118 - X? (
119 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
120 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
121 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
122 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
123 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
124 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
125 - )
126 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
127 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
128 -"
129 -for card in ${RADEON_CARDS}; do
130 - RDEPEND="${RDEPEND}
131 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
132 - "
133 -done
134 -RDEPEND="${RDEPEND}
135 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
136 -"
137 -
138 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
139 -# we need to *really* make sure we're not pulling one than more slot
140 -# simultaneously.
141 -#
142 -# How to use it:
143 -# 1. List all the working slots (with min versions) in ||, newest first.
144 -# 2. Update the := to specify *max* version, e.g. < 10.
145 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
146 -LLVM_MAX_SLOT="15"
147 -LLVM_DEPSTR="
148 - || (
149 - sys-devel/llvm:15[${MULTILIB_USEDEP}]
150 - sys-devel/llvm:14[${MULTILIB_USEDEP}]
151 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
152 - )
153 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
154 -"
155 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
156 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
157 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
158 -RDEPEND="${RDEPEND}
159 - llvm? (
160 - opencl? (
161 - video_cards_r600? (
162 - ${CLANG_DEPSTR_AMDGPU}
163 - )
164 - !video_cards_r600? (
165 - video_cards_radeonsi? (
166 - ${CLANG_DEPSTR_AMDGPU}
167 - )
168 - )
169 - !video_cards_r600? (
170 - !video_cards_radeonsi? (
171 - video_cards_radeon? (
172 - ${CLANG_DEPSTR_AMDGPU}
173 - )
174 - )
175 - )
176 - !video_cards_r600? (
177 - !video_cards_radeon? (
178 - !video_cards_radeonsi? (
179 - ${CLANG_DEPSTR}
180 - )
181 - )
182 - )
183 - )
184 - !opencl? (
185 - video_cards_r600? (
186 - ${LLVM_DEPSTR_AMDGPU}
187 - )
188 - !video_cards_r600? (
189 - video_cards_radeonsi? (
190 - ${LLVM_DEPSTR_AMDGPU}
191 - )
192 - )
193 - !video_cards_r600? (
194 - !video_cards_radeonsi? (
195 - video_cards_radeon? (
196 - ${LLVM_DEPSTR_AMDGPU}
197 - )
198 - )
199 - )
200 - !video_cards_r600? (
201 - !video_cards_radeon? (
202 - !video_cards_radeonsi? (
203 - ${LLVM_DEPSTR}
204 - )
205 - )
206 - )
207 - )
208 - )
209 -"
210 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
211 -
212 -DEPEND="${RDEPEND}
213 - video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
214 - valgrind? ( dev-util/valgrind )
215 - wayland? ( >=dev-libs/wayland-protocols-1.24 )
216 - X? (
217 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
218 - x11-base/xorg-proto
219 - )
220 -"
221 -BDEPEND="
222 - ${PYTHON_DEPS}
223 - opencl? (
224 - >=sys-devel/gcc-4.6
225 - )
226 - sys-devel/bison
227 - sys-devel/flex
228 - virtual/pkgconfig
229 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
230 - vulkan? ( video_cards_radeonsi? ( dev-util/glslang ) )
231 - vulkan-overlay? ( dev-util/glslang )
232 - wayland? ( dev-util/wayland-scanner )
233 -"
234 -
235 -S="${WORKDIR}/${MY_P}"
236 -EGIT_CHECKOUT_DIR=${S}
237 -
238 -QA_WX_LOAD="
239 -x86? (
240 - usr/lib*/libglapi.so.0.0.0
241 - usr/lib*/libGLESv1_CM.so.1.1.0
242 - usr/lib*/libGLESv2.so.2.0.0
243 - usr/lib*/libGL.so.1.2.0
244 - usr/lib*/libOSMesa.so.8.0.0
245 - usr/lib/libGLX_mesa.so.0.0.0
246 -)"
247 -
248 -llvm_check_deps() {
249 - local flags=${MULTILIB_USEDEP}
250 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
251 - then
252 - flags+=",llvm_targets_AMDGPU(-)"
253 - fi
254 -
255 - if use opencl; then
256 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
257 - fi
258 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
259 -}
260 -
261 -pkg_pretend() {
262 - if use vulkan; then
263 - if ! use video_cards_d3d12 &&
264 - ! use video_cards_freedreno &&
265 - ! use video_cards_intel &&
266 - ! use video_cards_radeonsi &&
267 - ! use video_cards_v3d; then
268 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
269 - fi
270 - fi
271 -
272 - if use opencl; then
273 - if ! use video_cards_r600 &&
274 - ! use video_cards_radeonsi; then
275 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
276 - fi
277 - fi
278 -
279 - if use vaapi; then
280 - if ! use video_cards_d3d12 &&
281 - ! use video_cards_r600 &&
282 - ! use video_cards_radeonsi &&
283 - ! use video_cards_nouveau; then
284 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
285 - fi
286 - fi
287 -
288 - if use vdpau; then
289 - if ! use video_cards_d3d12 &&
290 - ! use video_cards_r300 &&
291 - ! use video_cards_r600 &&
292 - ! use video_cards_radeonsi &&
293 - ! use video_cards_nouveau; then
294 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain d3d12, r300, r600, radeonsi, or nouveau"
295 - fi
296 - fi
297 -
298 - if use xa; then
299 - if ! use video_cards_freedreno &&
300 - ! use video_cards_nouveau &&
301 - ! use video_cards_vmware; then
302 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
303 - fi
304 - fi
305 -
306 - if use xvmc; then
307 - if ! use video_cards_r600 &&
308 - ! use video_cards_nouveau; then
309 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
310 - fi
311 - fi
312 -
313 - if ! use llvm; then
314 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
315 - fi
316 -
317 - if use osmesa && ! use llvm; then
318 - ewarn "OSMesa will be slow without enabling USE=llvm"
319 - fi
320 -}
321 -
322 -python_check_deps() {
323 - python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
324 -}
325 -
326 -pkg_setup() {
327 - # warning message for bug 459306
328 - if use llvm && has_version sys-devel/llvm[!debug=]; then
329 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
330 - ewarn "detected! This can cause problems. For details, see bug 459306."
331 - fi
332 -
333 - if use video_cards_intel ||
334 - use video_cards_radeonsi; then
335 - if kernel_is -ge 5 11 3; then
336 - CONFIG_CHECK="~KCMP"
337 - elif kernel_is -ge 5 11; then
338 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
339 - elif kernel_is -ge 5 10 20; then
340 - CONFIG_CHECK="~KCMP"
341 - else
342 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
343 - fi
344 - linux-info_pkg_setup
345 - fi
346 -
347 - if use llvm; then
348 - llvm_pkg_setup
349 - fi
350 - python-any-r1_pkg_setup
351 -}
352 -
353 -multilib_src_configure() {
354 - local emesonargs=()
355 -
356 - local platforms
357 - use X && platforms+="x11"
358 - use wayland && platforms+=",wayland"
359 - emesonargs+=(-Dplatforms=${platforms#,})
360 -
361 - if use video_cards_intel ||
362 - use video_cards_r300 ||
363 - use video_cards_r600 ||
364 - use video_cards_radeonsi ||
365 - use video_cards_nouveau ||
366 - use video_cards_vmware; then
367 - emesonargs+=($(meson_use d3d9 gallium-nine))
368 - else
369 - emesonargs+=(-Dgallium-nine=false)
370 - fi
371 -
372 - if use video_cards_d3d12 ||
373 - use video_cards_r600 ||
374 - use video_cards_radeonsi ||
375 - use video_cards_nouveau; then
376 - emesonargs+=($(meson_feature vaapi gallium-va))
377 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
378 - else
379 - emesonargs+=(-Dgallium-va=disabled)
380 - fi
381 -
382 - if use video_cards_d3d12; then
383 - emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
384 - fi
385 -
386 - if use video_cards_d3d12 ||
387 - use video_cards_r300 ||
388 - use video_cards_r600 ||
389 - use video_cards_radeonsi ||
390 - use video_cards_nouveau; then
391 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
392 - else
393 - emesonargs+=(-Dgallium-vdpau=disabled)
394 - fi
395 -
396 - if use video_cards_freedreno ||
397 - use video_cards_nouveau ||
398 - use video_cards_vmware; then
399 - emesonargs+=($(meson_feature xa gallium-xa))
400 - else
401 - emesonargs+=(-Dgallium-xa=disabled)
402 - fi
403 -
404 - if use video_cards_r600 ||
405 - use video_cards_nouveau; then
406 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
407 - else
408 - emesonargs+=(-Dgallium-xvmc=disabled)
409 - fi
410 -
411 - if use video_cards_freedreno ||
412 - use video_cards_lima ||
413 - use video_cards_panfrost ||
414 - use video_cards_v3d ||
415 - use video_cards_vc4 ||
416 - use video_cards_vivante; then
417 - gallium_enable -- kmsro
418 - fi
419 -
420 - gallium_enable -- swrast
421 - gallium_enable video_cards_freedreno freedreno
422 - gallium_enable video_cards_intel crocus i915 iris
423 - gallium_enable video_cards_lima lima
424 - gallium_enable video_cards_d3d12 d3d12
425 - gallium_enable video_cards_nouveau nouveau
426 - gallium_enable video_cards_panfrost panfrost
427 - gallium_enable video_cards_v3d v3d
428 - gallium_enable video_cards_vc4 vc4
429 - gallium_enable video_cards_virgl virgl
430 - gallium_enable video_cards_vivante etnaviv
431 - gallium_enable video_cards_vmware svga
432 - gallium_enable zink zink
433 -
434 - gallium_enable video_cards_r300 r300
435 - gallium_enable video_cards_r600 r600
436 - gallium_enable video_cards_radeonsi radeonsi
437 - if ! use video_cards_r300 && \
438 - ! use video_cards_r600; then
439 - gallium_enable video_cards_radeon r300 r600
440 - fi
441 -
442 - # opencl stuff
443 - emesonargs+=(
444 - -Dgallium-opencl="$(usex opencl icd disabled)"
445 - )
446 -
447 - if use vulkan; then
448 - vulkan_enable video_cards_freedreno freedreno
449 - vulkan_enable video_cards_intel intel
450 - vulkan_enable video_cards_d3d12 microsoft-experimental
451 - vulkan_enable video_cards_radeonsi amd
452 - vulkan_enable video_cards_v3d broadcom
453 - fi
454 -
455 - driver_list() {
456 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
457 - echo "${drivers//$'\n'/,}"
458 - }
459 -
460 - local vulkan_layers
461 - use vulkan && vulkan_layers+="device-select"
462 - use vulkan-overlay && vulkan_layers+=",overlay"
463 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
464 -
465 - emesonargs+=(
466 - $(meson_use test build-tests)
467 - -Dglx=$(usex X dri disabled)
468 - -Dshared-glapi=enabled
469 - -Ddri3=enabled
470 - -Degl=enabled
471 - -Dgbm=enabled
472 - -Dglvnd=true
473 - $(meson_feature gles1)
474 - $(meson_feature gles2)
475 - $(meson_feature llvm)
476 - $(meson_feature lm-sensors lmsensors)
477 - $(meson_use osmesa)
478 - $(meson_use selinux)
479 - $(meson_feature unwind libunwind)
480 - $(meson_feature zstd)
481 - $(meson_use cpu_flags_x86_sse2 sse2)
482 - -Dvalgrind=$(usex valgrind auto disabled)
483 - -Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
484 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
485 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
486 - --buildtype $(usex debug debug plain)
487 - -Db_ndebug=$(usex debug false true)
488 - )
489 - meson_src_configure
490 -}
491 -
492 -multilib_src_test() {
493 - meson_src_test -t 100
494 -}
495 -
496 -# $1 - VIDEO_CARDS flag (check skipped for "--")
497 -# other args - names of DRI drivers to enable
498 -gallium_enable() {
499 - if [[ $1 == -- ]] || use $1; then
500 - shift
501 - GALLIUM_DRIVERS+=("$@")
502 - fi
503 -}
504 -
505 -vulkan_enable() {
506 - if [[ $1 == -- ]] || use $1; then
507 - shift
508 - VULKAN_DRIVERS+=("$@")
509 - fi
510 -}
511
512 diff --git a/media-libs/mesa/mesa-22.3.0.ebuild b/media-libs/mesa/mesa-22.3.0.ebuild
513 deleted file mode 100644
514 index f39169af89a2..000000000000
515 --- a/media-libs/mesa/mesa-22.3.0.ebuild
516 +++ /dev/null
517 @@ -1,467 +0,0 @@
518 -# Copyright 1999-2022 Gentoo Authors
519 -# Distributed under the terms of the GNU General Public License v2
520 -
521 -EAPI=8
522 -
523 -PYTHON_COMPAT=( python3_{8..11} )
524 -
525 -inherit llvm meson-multilib python-any-r1 linux-info
526 -
527 -MY_P="${P/_/-}"
528 -
529 -DESCRIPTION="OpenGL-like graphic library for Linux"
530 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
531 -
532 -if [[ ${PV} == 9999 ]]; then
533 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
534 - inherit git-r3
535 -else
536 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
537 - 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"
538 -fi
539 -
540 -LICENSE="MIT"
541 -SLOT="0"
542 -RESTRICT="!test? ( test )"
543 -
544 -RADEON_CARDS="r300 r600 radeon radeonsi"
545 -VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
546 -for card in ${VIDEO_CARDS}; do
547 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
548 -done
549 -
550 -IUSE="${IUSE_VIDEO_CARDS}
551 - cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
552 - lm-sensors opencl osmesa +proprietary-codecs selinux
553 - test unwind vaapi valgrind vdpau vulkan
554 - vulkan-overlay wayland +X xa zink +zstd"
555 -
556 -REQUIRED_USE="
557 - d3d9? ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
558 - vulkan? ( video_cards_radeonsi? ( llvm ) )
559 - vulkan-overlay? ( vulkan )
560 - video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
561 - video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
562 - video_cards_radeonsi? ( llvm )
563 - xa? ( X )
564 - zink? ( vulkan )
565 -"
566 -
567 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
568 -RDEPEND="
569 - >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
570 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
571 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
572 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
573 - llvm? (
574 - video_cards_radeonsi? (
575 - virtual/libelf:0=[${MULTILIB_USEDEP}]
576 - )
577 - video_cards_r600? (
578 - virtual/libelf:0=[${MULTILIB_USEDEP}]
579 - )
580 - video_cards_radeon? (
581 - virtual/libelf:0=[${MULTILIB_USEDEP}]
582 - )
583 - )
584 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
585 - opencl? (
586 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
587 - dev-libs/libclc
588 - virtual/libelf:0=[${MULTILIB_USEDEP}]
589 - )
590 - vaapi? (
591 - >=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
592 - )
593 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
594 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
595 - wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
596 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
597 - X? (
598 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
599 - >=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
600 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
601 - >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
602 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
603 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
604 - )
605 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
606 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
607 -"
608 -for card in ${RADEON_CARDS}; do
609 - RDEPEND="${RDEPEND}
610 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
611 - "
612 -done
613 -RDEPEND="${RDEPEND}
614 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
615 -"
616 -
617 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
618 -# we need to *really* make sure we're not pulling one than more slot
619 -# simultaneously.
620 -#
621 -# How to use it:
622 -# 1. List all the working slots (with min versions) in ||, newest first.
623 -# 2. Update the := to specify *max* version, e.g. < 10.
624 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
625 -LLVM_MAX_SLOT="16"
626 -LLVM_DEPSTR="
627 - || (
628 - sys-devel/llvm:16[${MULTILIB_USEDEP}]
629 - sys-devel/llvm:15[${MULTILIB_USEDEP}]
630 - sys-devel/llvm:14[${MULTILIB_USEDEP}]
631 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
632 - )
633 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
634 -"
635 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
636 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
637 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
638 -RDEPEND="${RDEPEND}
639 - llvm? (
640 - opencl? (
641 - video_cards_r600? (
642 - ${CLANG_DEPSTR_AMDGPU}
643 - )
644 - !video_cards_r600? (
645 - video_cards_radeonsi? (
646 - ${CLANG_DEPSTR_AMDGPU}
647 - )
648 - )
649 - !video_cards_r600? (
650 - !video_cards_radeonsi? (
651 - video_cards_radeon? (
652 - ${CLANG_DEPSTR_AMDGPU}
653 - )
654 - )
655 - )
656 - !video_cards_r600? (
657 - !video_cards_radeon? (
658 - !video_cards_radeonsi? (
659 - ${CLANG_DEPSTR}
660 - )
661 - )
662 - )
663 - )
664 - !opencl? (
665 - video_cards_r600? (
666 - ${LLVM_DEPSTR_AMDGPU}
667 - )
668 - !video_cards_r600? (
669 - video_cards_radeonsi? (
670 - ${LLVM_DEPSTR_AMDGPU}
671 - )
672 - )
673 - !video_cards_r600? (
674 - !video_cards_radeonsi? (
675 - video_cards_radeon? (
676 - ${LLVM_DEPSTR_AMDGPU}
677 - )
678 - )
679 - )
680 - !video_cards_r600? (
681 - !video_cards_radeon? (
682 - !video_cards_radeonsi? (
683 - ${LLVM_DEPSTR}
684 - )
685 - )
686 - )
687 - )
688 - )
689 -"
690 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
691 -
692 -DEPEND="${RDEPEND}
693 - video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
694 - valgrind? ( dev-util/valgrind )
695 - wayland? ( >=dev-libs/wayland-protocols-1.24 )
696 - X? (
697 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
698 - x11-base/xorg-proto
699 - )
700 -"
701 -BDEPEND="
702 - ${PYTHON_DEPS}
703 - opencl? (
704 - >=sys-devel/gcc-4.6
705 - )
706 - sys-devel/bison
707 - sys-devel/flex
708 - virtual/pkgconfig
709 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
710 - vulkan? ( dev-util/glslang )
711 - wayland? ( dev-util/wayland-scanner )
712 -"
713 -
714 -S="${WORKDIR}/${MY_P}"
715 -EGIT_CHECKOUT_DIR=${S}
716 -
717 -QA_WX_LOAD="
718 -x86? (
719 - usr/lib*/libglapi.so.0.0.0
720 - usr/lib*/libGLESv1_CM.so.1.1.0
721 - usr/lib*/libGLESv2.so.2.0.0
722 - usr/lib*/libGL.so.1.2.0
723 - usr/lib*/libOSMesa.so.8.0.0
724 - usr/lib/libGLX_mesa.so.0.0.0
725 -)"
726 -
727 -llvm_check_deps() {
728 - local flags=${MULTILIB_USEDEP}
729 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
730 - then
731 - flags+=",llvm_targets_AMDGPU(-)"
732 - fi
733 -
734 - if use opencl; then
735 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
736 - fi
737 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
738 -}
739 -
740 -pkg_pretend() {
741 - if use vulkan; then
742 - if ! use video_cards_d3d12 &&
743 - ! use video_cards_freedreno &&
744 - ! use video_cards_intel &&
745 - ! use video_cards_radeonsi &&
746 - ! use video_cards_v3d; then
747 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
748 - fi
749 - fi
750 -
751 - if use opencl; then
752 - if ! use video_cards_r600 &&
753 - ! use video_cards_radeonsi; then
754 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
755 - fi
756 - fi
757 -
758 - if use vaapi; then
759 - if ! use video_cards_d3d12 &&
760 - ! use video_cards_r600 &&
761 - ! use video_cards_radeonsi &&
762 - ! use video_cards_nouveau; then
763 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
764 - fi
765 - fi
766 -
767 - if use vdpau; then
768 - if ! use video_cards_d3d12 &&
769 - ! use video_cards_r300 &&
770 - ! use video_cards_r600 &&
771 - ! use video_cards_radeonsi &&
772 - ! use video_cards_nouveau; then
773 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain d3d12, r300, r600, radeonsi, or nouveau"
774 - fi
775 - fi
776 -
777 - if use xa; then
778 - if ! use video_cards_freedreno &&
779 - ! use video_cards_nouveau &&
780 - ! use video_cards_vmware; then
781 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
782 - fi
783 - fi
784 -
785 - if ! use llvm; then
786 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
787 - fi
788 -
789 - if use osmesa && ! use llvm; then
790 - ewarn "OSMesa will be slow without enabling USE=llvm"
791 - fi
792 -}
793 -
794 -python_check_deps() {
795 - python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
796 -}
797 -
798 -pkg_setup() {
799 - # warning message for bug 459306
800 - if use llvm && has_version sys-devel/llvm[!debug=]; then
801 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
802 - ewarn "detected! This can cause problems. For details, see bug 459306."
803 - fi
804 -
805 - if use video_cards_intel ||
806 - use video_cards_radeonsi; then
807 - if kernel_is -ge 5 11 3; then
808 - CONFIG_CHECK="~KCMP"
809 - elif kernel_is -ge 5 11; then
810 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
811 - elif kernel_is -ge 5 10 20; then
812 - CONFIG_CHECK="~KCMP"
813 - else
814 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
815 - fi
816 - linux-info_pkg_setup
817 - fi
818 -
819 - if use llvm; then
820 - llvm_pkg_setup
821 - fi
822 - python-any-r1_pkg_setup
823 -}
824 -
825 -multilib_src_configure() {
826 - local emesonargs=()
827 -
828 - local platforms
829 - use X && platforms+="x11"
830 - use wayland && platforms+=",wayland"
831 - emesonargs+=(-Dplatforms=${platforms#,})
832 -
833 - if use video_cards_intel ||
834 - use video_cards_r300 ||
835 - use video_cards_r600 ||
836 - use video_cards_radeonsi ||
837 - use video_cards_nouveau ||
838 - use video_cards_vmware; then
839 - emesonargs+=($(meson_use d3d9 gallium-nine))
840 - else
841 - emesonargs+=(-Dgallium-nine=false)
842 - fi
843 -
844 - if use video_cards_d3d12 ||
845 - use video_cards_r600 ||
846 - use video_cards_radeonsi ||
847 - use video_cards_nouveau; then
848 - emesonargs+=($(meson_feature vaapi gallium-va))
849 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
850 - else
851 - emesonargs+=(-Dgallium-va=disabled)
852 - fi
853 -
854 - if use video_cards_d3d12; then
855 - emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
856 - fi
857 -
858 - if use video_cards_d3d12 ||
859 - use video_cards_r300 ||
860 - use video_cards_r600 ||
861 - use video_cards_radeonsi ||
862 - use video_cards_nouveau; then
863 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
864 - else
865 - emesonargs+=(-Dgallium-vdpau=disabled)
866 - fi
867 -
868 - if use video_cards_freedreno ||
869 - use video_cards_nouveau ||
870 - use video_cards_vmware; then
871 - emesonargs+=($(meson_feature xa gallium-xa))
872 - else
873 - emesonargs+=(-Dgallium-xa=disabled)
874 - fi
875 -
876 - if use video_cards_freedreno ||
877 - use video_cards_lima ||
878 - use video_cards_panfrost ||
879 - use video_cards_v3d ||
880 - use video_cards_vc4 ||
881 - use video_cards_vivante; then
882 - gallium_enable -- kmsro
883 - fi
884 -
885 - gallium_enable -- swrast
886 - gallium_enable video_cards_freedreno freedreno
887 - gallium_enable video_cards_intel crocus i915 iris
888 - gallium_enable video_cards_lima lima
889 - gallium_enable video_cards_d3d12 d3d12
890 - gallium_enable video_cards_nouveau nouveau
891 - gallium_enable video_cards_panfrost panfrost
892 - gallium_enable video_cards_v3d v3d
893 - gallium_enable video_cards_vc4 vc4
894 - gallium_enable video_cards_virgl virgl
895 - gallium_enable video_cards_vivante etnaviv
896 - gallium_enable video_cards_vmware svga
897 - gallium_enable zink zink
898 -
899 - gallium_enable video_cards_r300 r300
900 - gallium_enable video_cards_r600 r600
901 - gallium_enable video_cards_radeonsi radeonsi
902 - if ! use video_cards_r300 && \
903 - ! use video_cards_r600; then
904 - gallium_enable video_cards_radeon r300 r600
905 - fi
906 -
907 - # opencl stuff
908 - emesonargs+=(
909 - -Dgallium-opencl="$(usex opencl icd disabled)"
910 - )
911 -
912 - if use vulkan; then
913 - vulkan_enable video_cards_freedreno freedreno
914 - vulkan_enable video_cards_intel intel
915 - vulkan_enable video_cards_d3d12 microsoft-experimental
916 - vulkan_enable video_cards_radeonsi amd
917 - vulkan_enable video_cards_v3d broadcom
918 - fi
919 -
920 - driver_list() {
921 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
922 - echo "${drivers//$'\n'/,}"
923 - }
924 -
925 - local vulkan_layers
926 - use vulkan && vulkan_layers+="device-select"
927 - use vulkan-overlay && vulkan_layers+=",overlay"
928 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
929 -
930 - # In LLVM 16, we've switched to building LLVM with EH/RTTI disabled
931 - # to match upstream defaults. Mesa requires being built the same way.
932 - # https://bugs.gentoo.org/883955
933 - if [[ ${LLVM_SLOT} -ge 16 ]]; then
934 - emesonargs+=(
935 - -Dcpp_rtti=false
936 - )
937 - fi
938 -
939 - emesonargs+=(
940 - $(meson_use test build-tests)
941 - -Dglx=$(usex X dri disabled)
942 - -Dshared-glapi=enabled
943 - -Ddri3=enabled
944 - -Degl=enabled
945 - -Dgbm=enabled
946 - -Dglvnd=true
947 - $(meson_feature gles1)
948 - $(meson_feature gles2)
949 - $(meson_feature llvm)
950 - $(meson_feature lm-sensors lmsensors)
951 - $(meson_use osmesa)
952 - $(meson_use selinux)
953 - $(meson_feature unwind libunwind)
954 - $(meson_feature zstd)
955 - $(meson_use cpu_flags_x86_sse2 sse2)
956 - -Dvalgrind=$(usex valgrind auto disabled)
957 - -Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
958 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
959 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
960 - --buildtype $(usex debug debug plain)
961 - -Db_ndebug=$(usex debug false true)
962 - )
963 - meson_src_configure
964 -}
965 -
966 -multilib_src_test() {
967 - meson_src_test -t 100
968 -}
969 -
970 -# $1 - VIDEO_CARDS flag (check skipped for "--")
971 -# other args - names of DRI drivers to enable
972 -gallium_enable() {
973 - if [[ $1 == -- ]] || use $1; then
974 - shift
975 - GALLIUM_DRIVERS+=("$@")
976 - fi
977 -}
978 -
979 -vulkan_enable() {
980 - if [[ $1 == -- ]] || use $1; then
981 - shift
982 - VULKAN_DRIVERS+=("$@")
983 - fi
984 -}
985
986 diff --git a/media-libs/mesa/mesa-22.3.1.ebuild b/media-libs/mesa/mesa-22.3.1.ebuild
987 deleted file mode 100644
988 index f39169af89a2..000000000000
989 --- a/media-libs/mesa/mesa-22.3.1.ebuild
990 +++ /dev/null
991 @@ -1,467 +0,0 @@
992 -# Copyright 1999-2022 Gentoo Authors
993 -# Distributed under the terms of the GNU General Public License v2
994 -
995 -EAPI=8
996 -
997 -PYTHON_COMPAT=( python3_{8..11} )
998 -
999 -inherit llvm meson-multilib python-any-r1 linux-info
1000 -
1001 -MY_P="${P/_/-}"
1002 -
1003 -DESCRIPTION="OpenGL-like graphic library for Linux"
1004 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1005 -
1006 -if [[ ${PV} == 9999 ]]; then
1007 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1008 - inherit git-r3
1009 -else
1010 - SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
1011 - 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"
1012 -fi
1013 -
1014 -LICENSE="MIT"
1015 -SLOT="0"
1016 -RESTRICT="!test? ( test )"
1017 -
1018 -RADEON_CARDS="r300 r600 radeon radeonsi"
1019 -VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
1020 -for card in ${VIDEO_CARDS}; do
1021 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1022 -done
1023 -
1024 -IUSE="${IUSE_VIDEO_CARDS}
1025 - cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
1026 - lm-sensors opencl osmesa +proprietary-codecs selinux
1027 - test unwind vaapi valgrind vdpau vulkan
1028 - vulkan-overlay wayland +X xa zink +zstd"
1029 -
1030 -REQUIRED_USE="
1031 - d3d9? ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1032 - vulkan? ( video_cards_radeonsi? ( llvm ) )
1033 - vulkan-overlay? ( vulkan )
1034 - video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
1035 - video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
1036 - video_cards_radeonsi? ( llvm )
1037 - xa? ( X )
1038 - zink? ( vulkan )
1039 -"
1040 -
1041 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
1042 -RDEPEND="
1043 - >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
1044 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
1045 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1046 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1047 - llvm? (
1048 - video_cards_radeonsi? (
1049 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1050 - )
1051 - video_cards_r600? (
1052 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1053 - )
1054 - video_cards_radeon? (
1055 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1056 - )
1057 - )
1058 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
1059 - opencl? (
1060 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
1061 - dev-libs/libclc
1062 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1063 - )
1064 - vaapi? (
1065 - >=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1066 - )
1067 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1068 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
1069 - wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
1070 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1071 - X? (
1072 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
1073 - >=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
1074 - >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
1075 - >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
1076 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1077 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
1078 - )
1079 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
1080 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
1081 -"
1082 -for card in ${RADEON_CARDS}; do
1083 - RDEPEND="${RDEPEND}
1084 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1085 - "
1086 -done
1087 -RDEPEND="${RDEPEND}
1088 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1089 -"
1090 -
1091 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1092 -# we need to *really* make sure we're not pulling one than more slot
1093 -# simultaneously.
1094 -#
1095 -# How to use it:
1096 -# 1. List all the working slots (with min versions) in ||, newest first.
1097 -# 2. Update the := to specify *max* version, e.g. < 10.
1098 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
1099 -LLVM_MAX_SLOT="16"
1100 -LLVM_DEPSTR="
1101 - || (
1102 - sys-devel/llvm:16[${MULTILIB_USEDEP}]
1103 - sys-devel/llvm:15[${MULTILIB_USEDEP}]
1104 - sys-devel/llvm:14[${MULTILIB_USEDEP}]
1105 - sys-devel/llvm:13[${MULTILIB_USEDEP}]
1106 - )
1107 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1108 -"
1109 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1110 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1111 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1112 -RDEPEND="${RDEPEND}
1113 - llvm? (
1114 - opencl? (
1115 - video_cards_r600? (
1116 - ${CLANG_DEPSTR_AMDGPU}
1117 - )
1118 - !video_cards_r600? (
1119 - video_cards_radeonsi? (
1120 - ${CLANG_DEPSTR_AMDGPU}
1121 - )
1122 - )
1123 - !video_cards_r600? (
1124 - !video_cards_radeonsi? (
1125 - video_cards_radeon? (
1126 - ${CLANG_DEPSTR_AMDGPU}
1127 - )
1128 - )
1129 - )
1130 - !video_cards_r600? (
1131 - !video_cards_radeon? (
1132 - !video_cards_radeonsi? (
1133 - ${CLANG_DEPSTR}
1134 - )
1135 - )
1136 - )
1137 - )
1138 - !opencl? (
1139 - video_cards_r600? (
1140 - ${LLVM_DEPSTR_AMDGPU}
1141 - )
1142 - !video_cards_r600? (
1143 - video_cards_radeonsi? (
1144 - ${LLVM_DEPSTR_AMDGPU}
1145 - )
1146 - )
1147 - !video_cards_r600? (
1148 - !video_cards_radeonsi? (
1149 - video_cards_radeon? (
1150 - ${LLVM_DEPSTR_AMDGPU}
1151 - )
1152 - )
1153 - )
1154 - !video_cards_r600? (
1155 - !video_cards_radeon? (
1156 - !video_cards_radeonsi? (
1157 - ${LLVM_DEPSTR}
1158 - )
1159 - )
1160 - )
1161 - )
1162 - )
1163 -"
1164 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1165 -
1166 -DEPEND="${RDEPEND}
1167 - video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
1168 - valgrind? ( dev-util/valgrind )
1169 - wayland? ( >=dev-libs/wayland-protocols-1.24 )
1170 - X? (
1171 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1172 - x11-base/xorg-proto
1173 - )
1174 -"
1175 -BDEPEND="
1176 - ${PYTHON_DEPS}
1177 - opencl? (
1178 - >=sys-devel/gcc-4.6
1179 - )
1180 - sys-devel/bison
1181 - sys-devel/flex
1182 - virtual/pkgconfig
1183 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1184 - vulkan? ( dev-util/glslang )
1185 - wayland? ( dev-util/wayland-scanner )
1186 -"
1187 -
1188 -S="${WORKDIR}/${MY_P}"
1189 -EGIT_CHECKOUT_DIR=${S}
1190 -
1191 -QA_WX_LOAD="
1192 -x86? (
1193 - usr/lib*/libglapi.so.0.0.0
1194 - usr/lib*/libGLESv1_CM.so.1.1.0
1195 - usr/lib*/libGLESv2.so.2.0.0
1196 - usr/lib*/libGL.so.1.2.0
1197 - usr/lib*/libOSMesa.so.8.0.0
1198 - usr/lib/libGLX_mesa.so.0.0.0
1199 -)"
1200 -
1201 -llvm_check_deps() {
1202 - local flags=${MULTILIB_USEDEP}
1203 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1204 - then
1205 - flags+=",llvm_targets_AMDGPU(-)"
1206 - fi
1207 -
1208 - if use opencl; then
1209 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1210 - fi
1211 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1212 -}
1213 -
1214 -pkg_pretend() {
1215 - if use vulkan; then
1216 - if ! use video_cards_d3d12 &&
1217 - ! use video_cards_freedreno &&
1218 - ! use video_cards_intel &&
1219 - ! use video_cards_radeonsi &&
1220 - ! use video_cards_v3d; then
1221 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
1222 - fi
1223 - fi
1224 -
1225 - if use opencl; then
1226 - if ! use video_cards_r600 &&
1227 - ! use video_cards_radeonsi; then
1228 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1229 - fi
1230 - fi
1231 -
1232 - if use vaapi; then
1233 - if ! use video_cards_d3d12 &&
1234 - ! use video_cards_r600 &&
1235 - ! use video_cards_radeonsi &&
1236 - ! use video_cards_nouveau; then
1237 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
1238 - fi
1239 - fi
1240 -
1241 - if use vdpau; then
1242 - if ! use video_cards_d3d12 &&
1243 - ! use video_cards_r300 &&
1244 - ! use video_cards_r600 &&
1245 - ! use video_cards_radeonsi &&
1246 - ! use video_cards_nouveau; then
1247 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain d3d12, r300, r600, radeonsi, or nouveau"
1248 - fi
1249 - fi
1250 -
1251 - if use xa; then
1252 - if ! use video_cards_freedreno &&
1253 - ! use video_cards_nouveau &&
1254 - ! use video_cards_vmware; then
1255 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1256 - fi
1257 - fi
1258 -
1259 - if ! use llvm; then
1260 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1261 - fi
1262 -
1263 - if use osmesa && ! use llvm; then
1264 - ewarn "OSMesa will be slow without enabling USE=llvm"
1265 - fi
1266 -}
1267 -
1268 -python_check_deps() {
1269 - python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
1270 -}
1271 -
1272 -pkg_setup() {
1273 - # warning message for bug 459306
1274 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1275 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1276 - ewarn "detected! This can cause problems. For details, see bug 459306."
1277 - fi
1278 -
1279 - if use video_cards_intel ||
1280 - use video_cards_radeonsi; then
1281 - if kernel_is -ge 5 11 3; then
1282 - CONFIG_CHECK="~KCMP"
1283 - elif kernel_is -ge 5 11; then
1284 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1285 - elif kernel_is -ge 5 10 20; then
1286 - CONFIG_CHECK="~KCMP"
1287 - else
1288 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1289 - fi
1290 - linux-info_pkg_setup
1291 - fi
1292 -
1293 - if use llvm; then
1294 - llvm_pkg_setup
1295 - fi
1296 - python-any-r1_pkg_setup
1297 -}
1298 -
1299 -multilib_src_configure() {
1300 - local emesonargs=()
1301 -
1302 - local platforms
1303 - use X && platforms+="x11"
1304 - use wayland && platforms+=",wayland"
1305 - emesonargs+=(-Dplatforms=${platforms#,})
1306 -
1307 - if use video_cards_intel ||
1308 - use video_cards_r300 ||
1309 - use video_cards_r600 ||
1310 - use video_cards_radeonsi ||
1311 - use video_cards_nouveau ||
1312 - use video_cards_vmware; then
1313 - emesonargs+=($(meson_use d3d9 gallium-nine))
1314 - else
1315 - emesonargs+=(-Dgallium-nine=false)
1316 - fi
1317 -
1318 - if use video_cards_d3d12 ||
1319 - use video_cards_r600 ||
1320 - use video_cards_radeonsi ||
1321 - use video_cards_nouveau; then
1322 - emesonargs+=($(meson_feature vaapi gallium-va))
1323 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1324 - else
1325 - emesonargs+=(-Dgallium-va=disabled)
1326 - fi
1327 -
1328 - if use video_cards_d3d12; then
1329 - emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
1330 - fi
1331 -
1332 - if use video_cards_d3d12 ||
1333 - use video_cards_r300 ||
1334 - use video_cards_r600 ||
1335 - use video_cards_radeonsi ||
1336 - use video_cards_nouveau; then
1337 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
1338 - else
1339 - emesonargs+=(-Dgallium-vdpau=disabled)
1340 - fi
1341 -
1342 - if use video_cards_freedreno ||
1343 - use video_cards_nouveau ||
1344 - use video_cards_vmware; then
1345 - emesonargs+=($(meson_feature xa gallium-xa))
1346 - else
1347 - emesonargs+=(-Dgallium-xa=disabled)
1348 - fi
1349 -
1350 - if use video_cards_freedreno ||
1351 - use video_cards_lima ||
1352 - use video_cards_panfrost ||
1353 - use video_cards_v3d ||
1354 - use video_cards_vc4 ||
1355 - use video_cards_vivante; then
1356 - gallium_enable -- kmsro
1357 - fi
1358 -
1359 - gallium_enable -- swrast
1360 - gallium_enable video_cards_freedreno freedreno
1361 - gallium_enable video_cards_intel crocus i915 iris
1362 - gallium_enable video_cards_lima lima
1363 - gallium_enable video_cards_d3d12 d3d12
1364 - gallium_enable video_cards_nouveau nouveau
1365 - gallium_enable video_cards_panfrost panfrost
1366 - gallium_enable video_cards_v3d v3d
1367 - gallium_enable video_cards_vc4 vc4
1368 - gallium_enable video_cards_virgl virgl
1369 - gallium_enable video_cards_vivante etnaviv
1370 - gallium_enable video_cards_vmware svga
1371 - gallium_enable zink zink
1372 -
1373 - gallium_enable video_cards_r300 r300
1374 - gallium_enable video_cards_r600 r600
1375 - gallium_enable video_cards_radeonsi radeonsi
1376 - if ! use video_cards_r300 && \
1377 - ! use video_cards_r600; then
1378 - gallium_enable video_cards_radeon r300 r600
1379 - fi
1380 -
1381 - # opencl stuff
1382 - emesonargs+=(
1383 - -Dgallium-opencl="$(usex opencl icd disabled)"
1384 - )
1385 -
1386 - if use vulkan; then
1387 - vulkan_enable video_cards_freedreno freedreno
1388 - vulkan_enable video_cards_intel intel
1389 - vulkan_enable video_cards_d3d12 microsoft-experimental
1390 - vulkan_enable video_cards_radeonsi amd
1391 - vulkan_enable video_cards_v3d broadcom
1392 - fi
1393 -
1394 - driver_list() {
1395 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1396 - echo "${drivers//$'\n'/,}"
1397 - }
1398 -
1399 - local vulkan_layers
1400 - use vulkan && vulkan_layers+="device-select"
1401 - use vulkan-overlay && vulkan_layers+=",overlay"
1402 - emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
1403 -
1404 - # In LLVM 16, we've switched to building LLVM with EH/RTTI disabled
1405 - # to match upstream defaults. Mesa requires being built the same way.
1406 - # https://bugs.gentoo.org/883955
1407 - if [[ ${LLVM_SLOT} -ge 16 ]]; then
1408 - emesonargs+=(
1409 - -Dcpp_rtti=false
1410 - )
1411 - fi
1412 -
1413 - emesonargs+=(
1414 - $(meson_use test build-tests)
1415 - -Dglx=$(usex X dri disabled)
1416 - -Dshared-glapi=enabled
1417 - -Ddri3=enabled
1418 - -Degl=enabled
1419 - -Dgbm=enabled
1420 - -Dglvnd=true
1421 - $(meson_feature gles1)
1422 - $(meson_feature gles2)
1423 - $(meson_feature llvm)
1424 - $(meson_feature lm-sensors lmsensors)
1425 - $(meson_use osmesa)
1426 - $(meson_use selinux)
1427 - $(meson_feature unwind libunwind)
1428 - $(meson_feature zstd)
1429 - $(meson_use cpu_flags_x86_sse2 sse2)
1430 - -Dvalgrind=$(usex valgrind auto disabled)
1431 - -Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
1432 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1433 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1434 - --buildtype $(usex debug debug plain)
1435 - -Db_ndebug=$(usex debug false true)
1436 - )
1437 - meson_src_configure
1438 -}
1439 -
1440 -multilib_src_test() {
1441 - meson_src_test -t 100
1442 -}
1443 -
1444 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1445 -# other args - names of DRI drivers to enable
1446 -gallium_enable() {
1447 - if [[ $1 == -- ]] || use $1; then
1448 - shift
1449 - GALLIUM_DRIVERS+=("$@")
1450 - fi
1451 -}
1452 -
1453 -vulkan_enable() {
1454 - if [[ $1 == -- ]] || use $1; then
1455 - shift
1456 - VULKAN_DRIVERS+=("$@")
1457 - fi
1458 -}