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