1 |
commit: 2a4337eff9d86aa71eaae25eba8275cead3830b3 |
2 |
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 4 22:03:28 2020 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 4 22:03:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=2a4337ef |
7 |
|
8 |
media-libs/mesa: Update tls patch for musl users |
9 |
|
10 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
11 |
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> |
12 |
|
13 |
media-libs/mesa/Manifest | 2 +- |
14 |
.../mesa-20.2.0-add-disable-tls-support.patch | 44 ++++++++++ |
15 |
.../{mesa-19.3.5.ebuild => mesa-20.2.0_rc4.ebuild} | 98 +++++++++++++--------- |
16 |
media-libs/mesa/metadata.xml | 3 +- |
17 |
4 files changed, 105 insertions(+), 42 deletions(-) |
18 |
|
19 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
20 |
index d4b8a71..2c19fa4 100644 |
21 |
--- a/media-libs/mesa/Manifest |
22 |
+++ b/media-libs/mesa/Manifest |
23 |
@@ -1,2 +1,2 @@ |
24 |
-DIST mesa-19.3.5.tar.xz 12064980 BLAKE2B a20ebfb149624f13951795e07154ab70dc1856a7a1261b339b0bdf0009511111756c88439e7b8729f768b0b4b298301b9a3c0c10d7f2fab3abd91649c12ba51c SHA512 413929573fab31e1bb2a1a04c0c770161c2db464a5aab3f0567d27603fff889ede70e1f6e197e7ff1c1639dc4cc543457bcf45761f0f8e6dffafccfa773a4e3f |
25 |
DIST mesa-20.0.8.tar.xz 12360736 BLAKE2B 19e3f8a40b34b5f17ed76077c5d92f728a134b2479c43d86674ed1818ab99639a9b732041f67488251df808564f6abe5b587d756ef9c7c13dcada87cd0fc05de SHA512 d906330c412899907dd05a84034a929107fccaf3044814c4b1f30ba5690cbcf1587b5f17534c6345111f3cb7cf292afd5984a60486643ff6f534b57cec615374 |
26 |
+DIST mesa-20.2.0-rc4.tar.xz 13569628 BLAKE2B 54068c298a57f2c19113828e2e9b94dd15070ecc0c899f7e3dc527b27579e4f8c3c84c7b841c8d0b8313556cca41bfefd3e08b360dd0e364cbc29e0609ff6f3d SHA512 1f718bfbadbc15b7216864226adb737f3a4a7801dc60ca9294effd4be5f260fffd31c988eed9550e8a7a7430acb05ba0c7d65693c1f375eab4b95d2d029755bb |
27 |
|
28 |
diff --git a/media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch b/media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch |
29 |
new file mode 100644 |
30 |
index 0000000..bc4f5e9 |
31 |
--- /dev/null |
32 |
+++ b/media-libs/mesa/files/mesa-20.2.0-add-disable-tls-support.patch |
33 |
@@ -0,0 +1,44 @@ |
34 |
+From 97365c36582ad77db40e957931f29f958074edec Mon Sep 17 00:00:00 2001 |
35 |
+From: Jory Pratt <anarchy@g.o> |
36 |
+Date: Tue, 1 Sep 2020 18:04:56 -0500 |
37 |
+Subject: [PATCH] Allow to disable glx_tls for musl users |
38 |
+ |
39 |
+Signed-off-by: Jory Pratt <anarchy@g.o> |
40 |
+--- |
41 |
+ meson.build | 2 +- |
42 |
+ meson_options.txt | 6 ++++++ |
43 |
+ 2 files changed, 7 insertions(+), 1 deletion(-) |
44 |
+ |
45 |
+diff --git a/meson.build b/meson.build |
46 |
+index 4f9c589..2c388e7 100644 |
47 |
+--- a/meson.build |
48 |
++++ b/meson.build |
49 |
+@@ -424,7 +424,7 @@ endif |
50 |
+ |
51 |
+ # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. |
52 |
+ use_elf_tls = false |
53 |
+-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) |
54 |
++if get_option('elf-tls') |
55 |
+ pre_args += '-DUSE_ELF_TLS' |
56 |
+ use_elf_tls = true |
57 |
+ endif |
58 |
+diff --git a/meson_options.txt b/meson_options.txt |
59 |
+index 2d39d13..a3d1de5 100644 |
60 |
+--- a/meson_options.txt |
61 |
++++ b/meson_options.txt |
62 |
+@@ -313,6 +313,12 @@ option( |
63 |
+ value : false, |
64 |
+ description : 'Build an SELinux-aware Mesa' |
65 |
+ ) |
66 |
++option( |
67 |
++ 'elf-tls', |
68 |
++ type : 'boolean', |
69 |
++ value : true, |
70 |
++ description : 'Enable thread-local storage in GLX and EGL' |
71 |
++) |
72 |
+ option( |
73 |
+ 'osmesa', |
74 |
+ type : 'combo', |
75 |
+-- |
76 |
+2.28.0 |
77 |
+ |
78 |
|
79 |
diff --git a/media-libs/mesa/mesa-19.3.5.ebuild b/media-libs/mesa/mesa-20.2.0_rc4.ebuild |
80 |
similarity index 85% |
81 |
rename from media-libs/mesa/mesa-19.3.5.ebuild |
82 |
rename to media-libs/mesa/mesa-20.2.0_rc4.ebuild |
83 |
index f272c2b..7d2dc42 100644 |
84 |
--- a/media-libs/mesa/mesa-19.3.5.ebuild |
85 |
+++ b/media-libs/mesa/mesa-20.2.0_rc4.ebuild |
86 |
@@ -5,7 +5,7 @@ EAPI=7 |
87 |
|
88 |
PYTHON_COMPAT=( python3_{6,7,8} ) |
89 |
|
90 |
-inherit llvm meson multilib-minimal pax-utils python-any-r1 |
91 |
+inherit llvm meson multilib-minimal python-any-r1 linux-info |
92 |
|
93 |
OPENGL_DIR="xorg-x11" |
94 |
|
95 |
@@ -18,8 +18,8 @@ if [[ ${PV} == 9999 ]]; then |
96 |
EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
97 |
inherit git-r3 |
98 |
else |
99 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
100 |
- KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86" |
101 |
+ SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz" |
102 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
103 |
fi |
104 |
|
105 |
LICENSE="MIT" |
106 |
@@ -29,22 +29,21 @@ RESTRICT=" |
107 |
" |
108 |
|
109 |
RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
110 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware" |
111 |
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware" |
112 |
for card in ${VIDEO_CARDS}; do |
113 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
114 |
done |
115 |
|
116 |
IUSE="${IUSE_VIDEO_CARDS} |
117 |
+classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm |
118 |
- lm-sensors opencl osmesa pax_kernel selinux test unwind vaapi valgrind |
119 |
- vdpau vulkan vulkan-overlay wayland +X xa xvmc" |
120 |
+ lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan |
121 |
+ vulkan-overlay wayland +X xa xvmc zink +zstd" |
122 |
|
123 |
REQUIRED_USE=" |
124 |
d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) |
125 |
gles1? ( egl ) |
126 |
gles2? ( egl ) |
127 |
vulkan? ( dri3 |
128 |
- || ( video_cards_i965 video_cards_iris video_cards_radeonsi ) |
129 |
video_cards_radeonsi? ( llvm ) ) |
130 |
vulkan-overlay? ( vulkan ) |
131 |
wayland? ( egl gbm ) |
132 |
@@ -63,12 +62,14 @@ REQUIRED_USE=" |
133 |
video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
134 |
video_cards_r600? ( gallium ) |
135 |
video_cards_radeonsi? ( gallium llvm ) |
136 |
+ video_cards_v3d? ( gallium ) |
137 |
video_cards_vc4? ( gallium ) |
138 |
video_cards_virgl? ( gallium ) |
139 |
video_cards_vivante? ( gallium gbm ) |
140 |
video_cards_vmware? ( gallium ) |
141 |
xa? ( X ) |
142 |
xvmc? ( X ) |
143 |
+ zink? ( gallium vulkan ) |
144 |
" |
145 |
|
146 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100" |
147 |
@@ -77,7 +78,7 @@ RDEPEND=" |
148 |
>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
149 |
>=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
150 |
libglvnd? ( |
151 |
- >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}] |
152 |
+ >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}] |
153 |
!app-eselect/eselect-opengl |
154 |
) |
155 |
!libglvnd? ( |
156 |
@@ -98,7 +99,7 @@ RDEPEND=" |
157 |
) |
158 |
lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] ) |
159 |
opencl? ( |
160 |
- dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] |
161 |
+ >=virtual/opencl-3[${MULTILIB_USEDEP}] |
162 |
dev-libs/libclc |
163 |
virtual/libelf:0=[${MULTILIB_USEDEP}] |
164 |
) |
165 |
@@ -128,6 +129,8 @@ RDEPEND=" |
166 |
>=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
167 |
x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
168 |
) |
169 |
+ zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] ) |
170 |
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) |
171 |
" |
172 |
for card in ${RADEON_CARDS}; do |
173 |
RDEPEND="${RDEPEND} |
174 |
@@ -146,13 +149,13 @@ RDEPEND="${RDEPEND} |
175 |
# 1. List all the working slots (with min versions) in ||, newest first. |
176 |
# 2. Update the := to specify *max* version, e.g. < 10. |
177 |
# 3. Specify LLVM_MAX_SLOT, e.g. 9. |
178 |
-LLVM_MAX_SLOT="9" |
179 |
+LLVM_MAX_SLOT="10" |
180 |
LLVM_DEPSTR=" |
181 |
|| ( |
182 |
+ sys-devel/llvm:10[${MULTILIB_USEDEP}] |
183 |
sys-devel/llvm:9[${MULTILIB_USEDEP}] |
184 |
- sys-devel/llvm:8[${MULTILIB_USEDEP}] |
185 |
) |
186 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
187 |
+ <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}] |
188 |
" |
189 |
LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
190 |
CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
191 |
@@ -227,7 +230,6 @@ BDEPEND=" |
192 |
) |
193 |
sys-devel/bison |
194 |
sys-devel/flex |
195 |
- sys-devel/gettext |
196 |
virtual/pkgconfig |
197 |
$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
198 |
" |
199 |
@@ -246,7 +248,7 @@ x86? ( |
200 |
)" |
201 |
|
202 |
PATCHES=( |
203 |
- "${FILESDIR}"/${PN}-19.3.0-add-disable-tls-support.patch |
204 |
+ "${FILESDIR}"/${PN}-20.2.0-add-disable-tls-support.patch |
205 |
) |
206 |
|
207 |
llvm_check_deps() { |
208 |
@@ -263,6 +265,14 @@ llvm_check_deps() { |
209 |
} |
210 |
|
211 |
pkg_pretend() { |
212 |
+ if use vulkan; then |
213 |
+ if ! use video_cards_i965 && |
214 |
+ ! use video_cards_iris && |
215 |
+ ! use video_cards_radeonsi; then |
216 |
+ ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi" |
217 |
+ fi |
218 |
+ fi |
219 |
+ |
220 |
if use opencl; then |
221 |
if ! use video_cards_r600 && |
222 |
! use video_cards_radeonsi; then |
223 |
@@ -329,7 +339,14 @@ pkg_setup() { |
224 |
ewarn "detected! This can cause problems. For details, see bug 459306." |
225 |
fi |
226 |
|
227 |
- if use llvm; then |
228 |
+ if use video_cards_i965 || |
229 |
+ use video_cards_iris || |
230 |
+ use video_cards_radeonsi; then |
231 |
+ CONFIG_CHECK="~CHECKPOINT_RESTORE" |
232 |
+ linux-info_pkg_setup |
233 |
+ fi |
234 |
+ |
235 |
+ if use gallium && use llvm; then |
236 |
llvm_pkg_setup |
237 |
fi |
238 |
python-any-r1_pkg_setup |
239 |
@@ -359,13 +376,16 @@ multilib_src_configure() { |
240 |
fi |
241 |
fi |
242 |
|
243 |
- emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless ) |
244 |
+ local platforms |
245 |
+ use X && platforms+="x11" |
246 |
+ use wayland && platforms+=",wayland" |
247 |
+ [[ -n $platforms ]] && emesonargs+=(-Dplatforms=${platforms#,}) |
248 |
|
249 |
if use gallium; then |
250 |
emesonargs+=( |
251 |
- $(meson_use llvm) |
252 |
- $(meson_use lm-sensors lmsensors) |
253 |
- $(meson_use unwind libunwind) |
254 |
+ $(meson_feature llvm) |
255 |
+ $(meson_feature lm-sensors lmsensors) |
256 |
+ $(meson_feature unwind libunwind) |
257 |
) |
258 |
|
259 |
if use video_cards_iris || |
260 |
@@ -382,39 +402,40 @@ multilib_src_configure() { |
261 |
if use video_cards_r600 || |
262 |
use video_cards_radeonsi || |
263 |
use video_cards_nouveau; then |
264 |
- emesonargs+=($(meson_use vaapi gallium-va)) |
265 |
+ emesonargs+=($(meson_feature vaapi gallium-va)) |
266 |
use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) |
267 |
else |
268 |
- emesonargs+=(-Dgallium-va=false) |
269 |
+ emesonargs+=(-Dgallium-va=disabled) |
270 |
fi |
271 |
|
272 |
if use video_cards_r300 || |
273 |
use video_cards_r600 || |
274 |
use video_cards_radeonsi || |
275 |
use video_cards_nouveau; then |
276 |
- emesonargs+=($(meson_use vdpau gallium-vdpau)) |
277 |
+ emesonargs+=($(meson_feature vdpau gallium-vdpau)) |
278 |
else |
279 |
- emesonargs+=(-Dgallium-vdpau=false) |
280 |
+ emesonargs+=(-Dgallium-vdpau=disabled) |
281 |
fi |
282 |
|
283 |
if use video_cards_freedreno || |
284 |
use video_cards_nouveau || |
285 |
use video_cards_vmware; then |
286 |
- emesonargs+=($(meson_use xa gallium-xa)) |
287 |
+ emesonargs+=($(meson_feature xa gallium-xa)) |
288 |
else |
289 |
- emesonargs+=(-Dgallium-xa=false) |
290 |
+ emesonargs+=(-Dgallium-xa=disabled) |
291 |
fi |
292 |
|
293 |
if use video_cards_r600 || |
294 |
use video_cards_nouveau; then |
295 |
- emesonargs+=($(meson_use xvmc gallium-xvmc)) |
296 |
+ emesonargs+=($(meson_feature xvmc gallium-xvmc)) |
297 |
else |
298 |
- emesonargs+=(-Dgallium-xvmc=false) |
299 |
+ emesonargs+=(-Dgallium-xvmc=disabled) |
300 |
fi |
301 |
|
302 |
if use video_cards_freedreno || |
303 |
use video_cards_lima || |
304 |
use video_cards_panfrost || |
305 |
+ use video_cards_v3d || |
306 |
use video_cards_vc4 || |
307 |
use video_cards_vivante; then |
308 |
gallium_enable -- kmsro |
309 |
@@ -422,10 +443,12 @@ multilib_src_configure() { |
310 |
|
311 |
gallium_enable video_cards_lima lima |
312 |
gallium_enable video_cards_panfrost panfrost |
313 |
+ gallium_enable video_cards_v3d v3d |
314 |
gallium_enable video_cards_vc4 vc4 |
315 |
gallium_enable video_cards_vivante etnaviv |
316 |
gallium_enable video_cards_vmware svga |
317 |
gallium_enable video_cards_nouveau nouveau |
318 |
+ gallium_enable zink zink |
319 |
|
320 |
# Only one i915 driver (classic vs gallium). Default to classic. |
321 |
if ! use classic; then |
322 |
@@ -461,11 +484,6 @@ multilib_src_configure() { |
323 |
vulkan_enable video_cards_radeonsi amd |
324 |
fi |
325 |
|
326 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
327 |
- if [[ ${ABI} == x86 ]]; then |
328 |
- emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) |
329 |
- fi |
330 |
- |
331 |
# Disable glx tls support on musl |
332 |
if use elibc_musl; then |
333 |
emesonargs+=( -Delf-tls=false ) |
334 |
@@ -487,18 +505,20 @@ multilib_src_configure() { |
335 |
emesonargs+=( |
336 |
$(meson_use test build-tests) |
337 |
-Dglx=$(usex X dri disabled) |
338 |
- -Dshared-glapi=true |
339 |
- $(meson_use dri3) |
340 |
- $(meson_use egl) |
341 |
- $(meson_use gbm) |
342 |
- $(meson_use gles1) |
343 |
- $(meson_use gles2) |
344 |
+ -Dshared-glapi=enabled |
345 |
+ $(meson_feature dri3) |
346 |
+ $(meson_feature egl) |
347 |
+ $(meson_feature gbm) |
348 |
+ $(meson_feature gles1) |
349 |
+ $(meson_feature gles2) |
350 |
$(meson_use libglvnd glvnd) |
351 |
$(meson_use selinux) |
352 |
+ $(meson_feature zstd) |
353 |
-Dvalgrind=$(usex valgrind auto false) |
354 |
-Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
355 |
-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
356 |
-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
357 |
+ $(meson_use vulkan vulkan-device-select-layer) |
358 |
$(meson_use vulkan-overlay vulkan-overlay-layer) |
359 |
--buildtype $(usex debug debug plain) |
360 |
-Db_ndebug=$(usex debug false true) |
361 |
@@ -512,8 +532,6 @@ multilib_src_compile() { |
362 |
|
363 |
multilib_src_install() { |
364 |
meson_src_install |
365 |
- |
366 |
- use libglvnd && rm -f "${D}"/usr/$(get_libdir)/pkgconfig/{egl,gl}.pc |
367 |
} |
368 |
|
369 |
multilib_src_install_all() { |
370 |
|
371 |
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml |
372 |
index 9e9a04a..8aecc5f 100644 |
373 |
--- a/media-libs/mesa/metadata.xml |
374 |
+++ b/media-libs/mesa/metadata.xml |
375 |
@@ -16,9 +16,9 @@ |
376 |
<flag name="gles2">Enable GLESv2 support.</flag> |
377 |
<flag name="libglvnd">Use libglvnd for dispatch.</flag> |
378 |
<flag name="llvm">Enable LLVM backend for Gallium3D.</flag> |
379 |
+ <flag name="lm-sensors">Enable Gallium HUD lm-sensors support.</flag> |
380 |
<flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag> |
381 |
<flag name="osmesa">Build the Mesa library for off-screen rendering.</flag> |
382 |
- <flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag> |
383 |
<flag name="valgrind">Compile in valgrind memory hints</flag> |
384 |
<flag name="vdpau">Enable the VDPAU acceleration interface for the Gallium3D Video Layer.</flag> |
385 |
<flag name="vulkan">Enable Vulkan drivers</flag> |
386 |
@@ -26,6 +26,7 @@ |
387 |
<flag name="wayland">Enable support for dev-libs/wayland</flag> |
388 |
<flag name="xa">Enable the XA (X Acceleration) API for Gallium3D.</flag> |
389 |
<flag name="xvmc">Enable the XvMC acceleration interface for the Gallium3D Video Layer.</flag> |
390 |
+ <flag name="zink">Enable the Zink OpenGL-over-Vulkan Gallium driver</flag> |
391 |
</use> |
392 |
<upstream> |
393 |
<remote-id type="cpe">cpe:/a:mesa3d:mesa</remote-id> |