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