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.5b6fa4e5daa2136687dce50a746977764123f4dc.mattst88@gentoo
1 commit: 5b6fa4e5daa2136687dce50a746977764123f4dc
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 6 16:34:41 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=5b6fa4e5
7
8 media-libs/mesa: Version bump to 22.0.3
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-22.0.3.ebuild | 462 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 463 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index e5670fe7df14..df2e498244fd 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -3,5 +3,6 @@ DIST mesa-21.3.8.tar.xz 16593540 BLAKE2B 89a471af3354ae0cf0597c1b6bcd2aff8074d58
21 DIST mesa-22.0.0.tar.xz 15565680 BLAKE2B 65dd09e1864f353f07ab01cb21cb89f858a071d74043b1913b0abe3ee3b3a992ca3878d40ffe52cc45546770d5ad9e198c93a24a8564ffeb9c8a05da38af300c SHA512 9faef66adbacba24d11dfe8e2d1a753295798883a10a7cc91e6df9d678c64a8286a12e60c0d8576d944a8cc76f00c30d27c3a71d3458bbe3dbcd66c88a454c3b
22 DIST mesa-22.0.1.tar.xz 15634448 BLAKE2B c102643a81f47b36da24148564968dd5578b01970d14769eeb501d00ba43f49052893625ac7a8d67638f3d9bfe610440f300eb5657322387d8e5dc15b62f13b2 SHA512 cc8012b8f3fcbecfbb153d0e009e6522c3776023501da8499c06f1eaa9ab0a555ca597e16e4d7a2b954b05c8c0737ae6567e0d8549fb63aa86ae587eb31cd01e
23 DIST mesa-22.0.2.tar.xz 15688840 BLAKE2B f2ad5beae09577d87f3c47dacbe5ae13a8674054be3de7e69828ef905cc3f0b4e92f4f96eef44b35f98578a290d0e19a3469b76afd4d4e69c06dbb26a2c16490 SHA512 939ddf9acd280e1b20b3540349b3ad07bbeee5d821198f1d667e86634449bf5d0a0df5832753b8b3f8816709c2f02959cce25f3d26a33cc758dd8e25d158ddb8
24 +DIST mesa-22.0.3.tar.xz 15711916 BLAKE2B 2ecf9bc2293861e93abcc66cd5df6651a9eb7e533573273063df76ef01d0a39d6097c7a49ec682439bd6f4f0dfd55cd8e61051a731405759174c55b91dbd7725 SHA512 3982cd2fadca5349b2513885ed734c2422e3f2dced85f471f245b120ffaf018acafcd929dc5ec317f2c568bb5f619f5a3475d3a92495f766a2eefb225efcac14
25 DIST mesa-22.1.0-rc3.tar.xz 15836596 BLAKE2B 8497a74192b80d703f6f87c6411ae24f90a710cf2924b68897eb0d52ac8080d4a76f6224bc912e16d273dee43347420e4b9d54e5e2442a7bf0e409ef5cf656dd SHA512 2ae88d14a8dfdb1b8f720371cb3ce1af775b43a615fd6225b39676948486f4b39c0e9acd989679ea2a12ee803370fd2cd8c1152e8bcec0aa4bbb4e5b7fc78dad
26 DIST mesa-22.1.0-rc4.tar.xz 15852292 BLAKE2B 87b18ab81f58e7778fa0df902a6f020bf9e0e910be7ddc2d7d4af72c68211b7543be8f123a2952c0d640e5c13a277a0ce72c9163d61e7286159ba31ac8854c46 SHA512 755027304eef52b88da94e035c391ed75cdf780099fb5d2c0e4e48b69da3713a9250ba29bbea4e468f280f5112b975cd49fe11a7a89b957c30071bfb0151fc6d
27
28 diff --git a/media-libs/mesa/mesa-22.0.3.ebuild b/media-libs/mesa/mesa-22.0.3.ebuild
29 new file mode 100644
30 index 000000000000..2ceff3869cbc
31 --- /dev/null
32 +++ b/media-libs/mesa/mesa-22.0.3.ebuild
33 @@ -0,0 +1,462 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{8..10} )
40 +
41 +inherit llvm meson-multilib python-any-r1 linux-info
42 +
43 +MY_P="${P/_/-}"
44 +
45 +DESCRIPTION="OpenGL-like graphic library for Linux"
46 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
47 +
48 +if [[ ${PV} == 9999 ]]; then
49 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
50 + inherit git-r3
51 +else
52 + SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
53 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
54 +fi
55 +
56 +LICENSE="MIT"
57 +SLOT="0"
58 +RESTRICT="
59 + !test? ( test )
60 +"
61 +
62 +RADEON_CARDS="r300 r600 radeon radeonsi"
63 +VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
64 +for card in ${VIDEO_CARDS}; do
65 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
66 +done
67 +
68 +IUSE="${IUSE_VIDEO_CARDS}
69 + cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
70 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
71 + vulkan-overlay wayland +X xa xvmc zink +zstd"
72 +
73 +REQUIRED_USE="
74 + d3d9? ( || ( 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.109"
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 + >=x11-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 + vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
119 + X? (
120 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
121 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
122 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
123 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
124 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
125 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
126 + )
127 + zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
128 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
129 +"
130 +for card in ${RADEON_CARDS}; do
131 + RDEPEND="${RDEPEND}
132 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
133 + "
134 +done
135 +RDEPEND="${RDEPEND}
136 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
137 +"
138 +
139 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
140 +# we need to *really* make sure we're not pulling one than more slot
141 +# simultaneously.
142 +#
143 +# How to use it:
144 +# 1. List all the working slots (with min versions) in ||, newest first.
145 +# 2. Update the := to specify *max* version, e.g. < 10.
146 +# 3. Specify LLVM_MAX_SLOT, e.g. 9.
147 +LLVM_MAX_SLOT="13"
148 +LLVM_DEPSTR="
149 + || (
150 + sys-devel/llvm:13[${MULTILIB_USEDEP}]
151 + sys-devel/llvm:12[${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 + valgrind? ( dev-util/valgrind )
214 + wayland? ( >=dev-libs/wayland-protocols-1.24 )
215 + X? (
216 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
217 + x11-base/xorg-proto
218 + )
219 +"
220 +BDEPEND="
221 + ${PYTHON_DEPS}
222 + opencl? (
223 + >=sys-devel/gcc-4.6
224 + )
225 + sys-devel/bison
226 + sys-devel/flex
227 + virtual/pkgconfig
228 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
229 + wayland? ( dev-util/wayland-scanner )
230 +"
231 +
232 +S="${WORKDIR}/${MY_P}"
233 +EGIT_CHECKOUT_DIR=${S}
234 +
235 +QA_WX_LOAD="
236 +x86? (
237 + usr/lib*/libglapi.so.0.0.0
238 + usr/lib*/libGLESv1_CM.so.1.1.0
239 + usr/lib*/libGLESv2.so.2.0.0
240 + usr/lib*/libGL.so.1.2.0
241 + usr/lib*/libOSMesa.so.8.0.0
242 + usr/lib/libGLX_mesa.so.0.0.0
243 +)"
244 +
245 +llvm_check_deps() {
246 + local flags=${MULTILIB_USEDEP}
247 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
248 + then
249 + flags+=",llvm_targets_AMDGPU(-)"
250 + fi
251 +
252 + if use opencl; then
253 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
254 + fi
255 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
256 +}
257 +
258 +pkg_pretend() {
259 + if use vulkan; then
260 + if ! use video_cards_freedreno &&
261 + ! use video_cards_intel &&
262 + ! use video_cards_radeonsi &&
263 + ! use video_cards_v3d; then
264 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d"
265 + fi
266 + fi
267 +
268 + if use opencl; then
269 + if ! use video_cards_r600 &&
270 + ! use video_cards_radeonsi; then
271 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
272 + fi
273 + fi
274 +
275 + if use vaapi; then
276 + if ! use video_cards_r600 &&
277 + ! use video_cards_radeonsi &&
278 + ! use video_cards_nouveau; then
279 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
280 + fi
281 + fi
282 +
283 + if use vdpau; then
284 + if ! use video_cards_r300 &&
285 + ! use video_cards_r600 &&
286 + ! use video_cards_radeonsi &&
287 + ! use video_cards_nouveau; then
288 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
289 + fi
290 + fi
291 +
292 + if use xa; then
293 + if ! use video_cards_freedreno &&
294 + ! use video_cards_nouveau &&
295 + ! use video_cards_vmware; then
296 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
297 + fi
298 + fi
299 +
300 + if use xvmc; then
301 + if ! use video_cards_r600 &&
302 + ! use video_cards_nouveau; then
303 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
304 + fi
305 + fi
306 +
307 + if ! use llvm; then
308 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
309 + fi
310 +
311 + if use osmesa && ! use llvm; then
312 + ewarn "OSMesa will be slow without enabling USE=llvm"
313 + fi
314 +}
315 +
316 +python_check_deps() {
317 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
318 +}
319 +
320 +pkg_setup() {
321 + # warning message for bug 459306
322 + if use llvm && has_version sys-devel/llvm[!debug=]; then
323 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
324 + ewarn "detected! This can cause problems. For details, see bug 459306."
325 + fi
326 +
327 + if use video_cards_intel ||
328 + use video_cards_radeonsi; then
329 + if kernel_is -ge 5 11 3; then
330 + CONFIG_CHECK="~KCMP"
331 + elif kernel_is -ge 5 11; then
332 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
333 + elif kernel_is -ge 5 10 20; then
334 + CONFIG_CHECK="~KCMP"
335 + else
336 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
337 + fi
338 + linux-info_pkg_setup
339 + fi
340 +
341 + if use llvm; then
342 + llvm_pkg_setup
343 + fi
344 + python-any-r1_pkg_setup
345 +}
346 +
347 +multilib_src_configure() {
348 + local emesonargs=()
349 +
350 + local platforms
351 + use X && platforms+="x11"
352 + use wayland && platforms+=",wayland"
353 + emesonargs+=(-Dplatforms=${platforms#,})
354 +
355 + if use video_cards_intel ||
356 + use video_cards_r300 ||
357 + use video_cards_r600 ||
358 + use video_cards_radeonsi ||
359 + use video_cards_nouveau ||
360 + use video_cards_vmware; then
361 + emesonargs+=($(meson_use d3d9 gallium-nine))
362 + else
363 + emesonargs+=(-Dgallium-nine=false)
364 + fi
365 +
366 + if use video_cards_r600 ||
367 + use video_cards_radeonsi ||
368 + use video_cards_nouveau; then
369 + emesonargs+=($(meson_feature vaapi gallium-va))
370 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
371 + else
372 + emesonargs+=(-Dgallium-va=disabled)
373 + fi
374 +
375 + if use video_cards_r300 ||
376 + use video_cards_r600 ||
377 + use video_cards_radeonsi ||
378 + use video_cards_nouveau; then
379 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
380 + else
381 + emesonargs+=(-Dgallium-vdpau=disabled)
382 + fi
383 +
384 + if use video_cards_freedreno ||
385 + use video_cards_nouveau ||
386 + use video_cards_vmware; then
387 + emesonargs+=($(meson_feature xa gallium-xa))
388 + else
389 + emesonargs+=(-Dgallium-xa=disabled)
390 + fi
391 +
392 + if use video_cards_r600 ||
393 + use video_cards_nouveau; then
394 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
395 + else
396 + emesonargs+=(-Dgallium-xvmc=disabled)
397 + fi
398 +
399 + if use video_cards_freedreno ||
400 + use video_cards_lima ||
401 + use video_cards_panfrost ||
402 + use video_cards_v3d ||
403 + use video_cards_vc4 ||
404 + use video_cards_vivante; then
405 + gallium_enable -- kmsro
406 + fi
407 +
408 + gallium_enable -- swrast
409 + gallium_enable video_cards_freedreno freedreno
410 + gallium_enable video_cards_intel crocus i915 iris
411 + gallium_enable video_cards_lima lima
412 + gallium_enable video_cards_nouveau nouveau
413 + gallium_enable video_cards_panfrost panfrost
414 + gallium_enable video_cards_v3d v3d
415 + gallium_enable video_cards_vc4 vc4
416 + gallium_enable video_cards_virgl virgl
417 + gallium_enable video_cards_vivante etnaviv
418 + gallium_enable video_cards_vmware svga
419 + gallium_enable zink zink
420 +
421 + gallium_enable video_cards_r300 r300
422 + gallium_enable video_cards_r600 r600
423 + gallium_enable video_cards_radeonsi radeonsi
424 + if ! use video_cards_r300 && \
425 + ! use video_cards_r600; then
426 + gallium_enable video_cards_radeon r300 r600
427 + fi
428 +
429 + # opencl stuff
430 + emesonargs+=(
431 + -Dgallium-opencl="$(usex opencl icd disabled)"
432 + )
433 +
434 + if use vulkan; then
435 + vulkan_enable video_cards_freedreno freedreno
436 + vulkan_enable video_cards_intel intel
437 + vulkan_enable video_cards_radeonsi amd
438 + vulkan_enable video_cards_v3d broadcom
439 + fi
440 +
441 + driver_list() {
442 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
443 + echo "${drivers//$'\n'/,}"
444 + }
445 +
446 + local vulkan_layers
447 + use vulkan && vulkan_layers+="device-select"
448 + use vulkan-overlay && vulkan_layers+=",overlay"
449 + emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
450 +
451 + emesonargs+=(
452 + $(meson_use test build-tests)
453 + -Dglx=$(usex X dri disabled)
454 + -Dshared-glapi=enabled
455 + -Ddri3=enabled
456 + -Degl=enabled
457 + -Dgbm=enabled
458 + -Dglvnd=true
459 + $(meson_feature gles1)
460 + $(meson_feature gles2)
461 + $(meson_feature llvm)
462 + $(meson_feature lm-sensors lmsensors)
463 + $(meson_use osmesa)
464 + $(meson_use selinux)
465 + $(meson_feature unwind libunwind)
466 + $(meson_feature zstd)
467 + $(meson_use cpu_flags_x86_sse2 sse2)
468 + -Dvalgrind=$(usex valgrind auto disabled)
469 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
470 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
471 + --buildtype $(usex debug debug plain)
472 + -Db_ndebug=$(usex debug false true)
473 + )
474 + meson_src_configure
475 +}
476 +
477 +multilib_src_test() {
478 + meson_src_test -t 100
479 +}
480 +
481 +# $1 - VIDEO_CARDS flag (check skipped for "--")
482 +# other args - names of DRI drivers to enable
483 +gallium_enable() {
484 + if [[ $1 == -- ]] || use $1; then
485 + shift
486 + GALLIUM_DRIVERS+=("$@")
487 + fi
488 +}
489 +
490 +vulkan_enable() {
491 + if [[ $1 == -- ]] || use $1; then
492 + shift
493 + VULKAN_DRIVERS+=("$@")
494 + fi
495 +}