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, 19 May 2022 20:28:07
Message-Id: 1652992051.54ee8f6200b73f09fe4bfed3aabefecc6c7fd66f.mattst88@gentoo
1 commit: 54ee8f6200b73f09fe4bfed3aabefecc6c7fd66f
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 19 20:27:31 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu May 19 20:27:31 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54ee8f62
7
8 media-libs/mesa: Version bump to 22.0.4
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.4.ebuild | 462 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 463 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 7f104150ac60..c6571f4b5d08 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,3 +1,4 @@
21 DIST mesa-21.3.8.tar.xz 16593540 BLAKE2B 89a471af3354ae0cf0597c1b6bcd2aff8074d58c16504154291f86cd9a9701f98883cf1077f60a8f17d24be800691a5bfb7ef4ddb10dfa355181bf87805b660c SHA512 0462c44fa8e358dafd03088411452bc172a365902795b3198df1e6cfbf1d87675ef5b72b572de7f15e5ee87b30ce5b2f217c81ea72b376962f6428c6ff83f2e9
22 DIST mesa-22.0.3.tar.xz 15711916 BLAKE2B 2ecf9bc2293861e93abcc66cd5df6651a9eb7e533573273063df76ef01d0a39d6097c7a49ec682439bd6f4f0dfd55cd8e61051a731405759174c55b91dbd7725 SHA512 3982cd2fadca5349b2513885ed734c2422e3f2dced85f471f245b120ffaf018acafcd929dc5ec317f2c568bb5f619f5a3475d3a92495f766a2eefb225efcac14
23 +DIST mesa-22.0.4.tar.xz 15747320 BLAKE2B 22a3e5168a763e2095c2ec75556981c6da459b4ba14dc110beb15c714ea2d500d09db56b5c56f153c0b5fae1fd8d48c8dc84aa14bcb3ffc6d20a1a7cc76af446 SHA512 afecaf97fdf824e9004f3a50ea17f42edf810d682f383082ef87449a883263d4c5c8ae03558052960a63336451797101e198977553dedc09dbbc8fdb4815f526
24 DIST mesa-22.1.0.tar.xz 15934484 BLAKE2B d4e3956f4a100bc54919ac7c8aeadb6d99fdd349b3a669b40967f14997f383c7ade6da957390f628e8dc521e8afde6ee67e7d9620099676c9889253630b9f8f0 SHA512 a2a6f6f37d1e63aa5537a2bbdfd8634fafebf7e223099deb0fd96749d6d1880ea692231fe12eb06ade78a5eb483d11d6f9ef746e94fe3fd58b4381d469afa934
25
26 diff --git a/media-libs/mesa/mesa-22.0.4.ebuild b/media-libs/mesa/mesa-22.0.4.ebuild
27 new file mode 100644
28 index 000000000000..2ceff3869cbc
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-22.0.4.ebuild
31 @@ -0,0 +1,462 @@
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.109"
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="13"
146 +LLVM_DEPSTR="
147 + || (
148 + sys-devel/llvm:13[${MULTILIB_USEDEP}]
149 + sys-devel/llvm:12[${MULTILIB_USEDEP}]
150 + )
151 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
152 +"
153 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
154 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
155 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
156 +RDEPEND="${RDEPEND}
157 + llvm? (
158 + opencl? (
159 + video_cards_r600? (
160 + ${CLANG_DEPSTR_AMDGPU}
161 + )
162 + !video_cards_r600? (
163 + video_cards_radeonsi? (
164 + ${CLANG_DEPSTR_AMDGPU}
165 + )
166 + )
167 + !video_cards_r600? (
168 + !video_cards_radeonsi? (
169 + video_cards_radeon? (
170 + ${CLANG_DEPSTR_AMDGPU}
171 + )
172 + )
173 + )
174 + !video_cards_r600? (
175 + !video_cards_radeon? (
176 + !video_cards_radeonsi? (
177 + ${CLANG_DEPSTR}
178 + )
179 + )
180 + )
181 + )
182 + !opencl? (
183 + video_cards_r600? (
184 + ${LLVM_DEPSTR_AMDGPU}
185 + )
186 + !video_cards_r600? (
187 + video_cards_radeonsi? (
188 + ${LLVM_DEPSTR_AMDGPU}
189 + )
190 + )
191 + !video_cards_r600? (
192 + !video_cards_radeonsi? (
193 + video_cards_radeon? (
194 + ${LLVM_DEPSTR_AMDGPU}
195 + )
196 + )
197 + )
198 + !video_cards_r600? (
199 + !video_cards_radeon? (
200 + !video_cards_radeonsi? (
201 + ${LLVM_DEPSTR}
202 + )
203 + )
204 + )
205 + )
206 + )
207 +"
208 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
209 +
210 +DEPEND="${RDEPEND}
211 + valgrind? ( dev-util/valgrind )
212 + wayland? ( >=dev-libs/wayland-protocols-1.24 )
213 + X? (
214 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
215 + x11-base/xorg-proto
216 + )
217 +"
218 +BDEPEND="
219 + ${PYTHON_DEPS}
220 + opencl? (
221 + >=sys-devel/gcc-4.6
222 + )
223 + sys-devel/bison
224 + sys-devel/flex
225 + virtual/pkgconfig
226 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
227 + wayland? ( dev-util/wayland-scanner )
228 +"
229 +
230 +S="${WORKDIR}/${MY_P}"
231 +EGIT_CHECKOUT_DIR=${S}
232 +
233 +QA_WX_LOAD="
234 +x86? (
235 + usr/lib*/libglapi.so.0.0.0
236 + usr/lib*/libGLESv1_CM.so.1.1.0
237 + usr/lib*/libGLESv2.so.2.0.0
238 + usr/lib*/libGL.so.1.2.0
239 + usr/lib*/libOSMesa.so.8.0.0
240 + usr/lib/libGLX_mesa.so.0.0.0
241 +)"
242 +
243 +llvm_check_deps() {
244 + local flags=${MULTILIB_USEDEP}
245 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
246 + then
247 + flags+=",llvm_targets_AMDGPU(-)"
248 + fi
249 +
250 + if use opencl; then
251 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
252 + fi
253 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
254 +}
255 +
256 +pkg_pretend() {
257 + if use vulkan; then
258 + if ! use video_cards_freedreno &&
259 + ! use video_cards_intel &&
260 + ! use video_cards_radeonsi &&
261 + ! use video_cards_v3d; then
262 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d"
263 + fi
264 + fi
265 +
266 + if use opencl; then
267 + if ! use video_cards_r600 &&
268 + ! use video_cards_radeonsi; then
269 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
270 + fi
271 + fi
272 +
273 + if use vaapi; then
274 + if ! use video_cards_r600 &&
275 + ! use video_cards_radeonsi &&
276 + ! use video_cards_nouveau; then
277 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
278 + fi
279 + fi
280 +
281 + if use vdpau; then
282 + if ! use video_cards_r300 &&
283 + ! use video_cards_r600 &&
284 + ! use video_cards_radeonsi &&
285 + ! use video_cards_nouveau; then
286 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
287 + fi
288 + fi
289 +
290 + if use xa; then
291 + if ! use video_cards_freedreno &&
292 + ! use video_cards_nouveau &&
293 + ! use video_cards_vmware; then
294 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
295 + fi
296 + fi
297 +
298 + if use xvmc; then
299 + if ! use video_cards_r600 &&
300 + ! use video_cards_nouveau; then
301 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
302 + fi
303 + fi
304 +
305 + if ! use llvm; then
306 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
307 + fi
308 +
309 + if use osmesa && ! use llvm; then
310 + ewarn "OSMesa will be slow without enabling USE=llvm"
311 + fi
312 +}
313 +
314 +python_check_deps() {
315 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
316 +}
317 +
318 +pkg_setup() {
319 + # warning message for bug 459306
320 + if use llvm && has_version sys-devel/llvm[!debug=]; then
321 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
322 + ewarn "detected! This can cause problems. For details, see bug 459306."
323 + fi
324 +
325 + if use video_cards_intel ||
326 + use video_cards_radeonsi; then
327 + if kernel_is -ge 5 11 3; then
328 + CONFIG_CHECK="~KCMP"
329 + elif kernel_is -ge 5 11; then
330 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
331 + elif kernel_is -ge 5 10 20; then
332 + CONFIG_CHECK="~KCMP"
333 + else
334 + CONFIG_CHECK="~CHECKPOINT_RESTORE"
335 + fi
336 + linux-info_pkg_setup
337 + fi
338 +
339 + if use llvm; then
340 + llvm_pkg_setup
341 + fi
342 + python-any-r1_pkg_setup
343 +}
344 +
345 +multilib_src_configure() {
346 + local emesonargs=()
347 +
348 + local platforms
349 + use X && platforms+="x11"
350 + use wayland && platforms+=",wayland"
351 + emesonargs+=(-Dplatforms=${platforms#,})
352 +
353 + if use video_cards_intel ||
354 + use video_cards_r300 ||
355 + use video_cards_r600 ||
356 + use video_cards_radeonsi ||
357 + use video_cards_nouveau ||
358 + use video_cards_vmware; then
359 + emesonargs+=($(meson_use d3d9 gallium-nine))
360 + else
361 + emesonargs+=(-Dgallium-nine=false)
362 + fi
363 +
364 + if use video_cards_r600 ||
365 + use video_cards_radeonsi ||
366 + use video_cards_nouveau; then
367 + emesonargs+=($(meson_feature vaapi gallium-va))
368 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
369 + else
370 + emesonargs+=(-Dgallium-va=disabled)
371 + fi
372 +
373 + if use video_cards_r300 ||
374 + use video_cards_r600 ||
375 + use video_cards_radeonsi ||
376 + use video_cards_nouveau; then
377 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
378 + else
379 + emesonargs+=(-Dgallium-vdpau=disabled)
380 + fi
381 +
382 + if use video_cards_freedreno ||
383 + use video_cards_nouveau ||
384 + use video_cards_vmware; then
385 + emesonargs+=($(meson_feature xa gallium-xa))
386 + else
387 + emesonargs+=(-Dgallium-xa=disabled)
388 + fi
389 +
390 + if use video_cards_r600 ||
391 + use video_cards_nouveau; then
392 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
393 + else
394 + emesonargs+=(-Dgallium-xvmc=disabled)
395 + fi
396 +
397 + if use video_cards_freedreno ||
398 + use video_cards_lima ||
399 + use video_cards_panfrost ||
400 + use video_cards_v3d ||
401 + use video_cards_vc4 ||
402 + use video_cards_vivante; then
403 + gallium_enable -- kmsro
404 + fi
405 +
406 + gallium_enable -- swrast
407 + gallium_enable video_cards_freedreno freedreno
408 + gallium_enable video_cards_intel crocus i915 iris
409 + gallium_enable video_cards_lima lima
410 + gallium_enable video_cards_nouveau nouveau
411 + gallium_enable video_cards_panfrost panfrost
412 + gallium_enable video_cards_v3d v3d
413 + gallium_enable video_cards_vc4 vc4
414 + gallium_enable video_cards_virgl virgl
415 + gallium_enable video_cards_vivante etnaviv
416 + gallium_enable video_cards_vmware svga
417 + gallium_enable zink zink
418 +
419 + gallium_enable video_cards_r300 r300
420 + gallium_enable video_cards_r600 r600
421 + gallium_enable video_cards_radeonsi radeonsi
422 + if ! use video_cards_r300 && \
423 + ! use video_cards_r600; then
424 + gallium_enable video_cards_radeon r300 r600
425 + fi
426 +
427 + # opencl stuff
428 + emesonargs+=(
429 + -Dgallium-opencl="$(usex opencl icd disabled)"
430 + )
431 +
432 + if use vulkan; then
433 + vulkan_enable video_cards_freedreno freedreno
434 + vulkan_enable video_cards_intel intel
435 + vulkan_enable video_cards_radeonsi amd
436 + vulkan_enable video_cards_v3d broadcom
437 + fi
438 +
439 + driver_list() {
440 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
441 + echo "${drivers//$'\n'/,}"
442 + }
443 +
444 + local vulkan_layers
445 + use vulkan && vulkan_layers+="device-select"
446 + use vulkan-overlay && vulkan_layers+=",overlay"
447 + emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
448 +
449 + emesonargs+=(
450 + $(meson_use test build-tests)
451 + -Dglx=$(usex X dri disabled)
452 + -Dshared-glapi=enabled
453 + -Ddri3=enabled
454 + -Degl=enabled
455 + -Dgbm=enabled
456 + -Dglvnd=true
457 + $(meson_feature gles1)
458 + $(meson_feature gles2)
459 + $(meson_feature llvm)
460 + $(meson_feature lm-sensors lmsensors)
461 + $(meson_use osmesa)
462 + $(meson_use selinux)
463 + $(meson_feature unwind libunwind)
464 + $(meson_feature zstd)
465 + $(meson_use cpu_flags_x86_sse2 sse2)
466 + -Dvalgrind=$(usex valgrind auto disabled)
467 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
468 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
469 + --buildtype $(usex debug debug plain)
470 + -Db_ndebug=$(usex debug false true)
471 + )
472 + meson_src_configure
473 +}
474 +
475 +multilib_src_test() {
476 + meson_src_test -t 100
477 +}
478 +
479 +# $1 - VIDEO_CARDS flag (check skipped for "--")
480 +# other args - names of DRI drivers to enable
481 +gallium_enable() {
482 + if [[ $1 == -- ]] || use $1; then
483 + shift
484 + GALLIUM_DRIVERS+=("$@")
485 + fi
486 +}
487 +
488 +vulkan_enable() {
489 + if [[ $1 == -- ]] || use $1; then
490 + shift
491 + VULKAN_DRIVERS+=("$@")
492 + fi
493 +}