1 |
commit: 377a82974ad1468f1a2f5defdf1fe4f47124c60a |
2 |
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 8 03:07:06 2019 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 8 03:07:06 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=377a8297 |
7 |
|
8 |
media-libs/mesa: Version bump 19.1.0_rc1 |
9 |
|
10 |
Package-Manager: Portage-2.3.66, Repoman-2.3.12 |
11 |
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> |
12 |
|
13 |
media-libs/mesa/Manifest | 1 + |
14 |
media-libs/mesa/files/mesa-19.1.0-execinfo.patch | 90 ++++ |
15 |
media-libs/mesa/mesa-19.1.0_rc1.ebuild | 545 +++++++++++++++++++++++ |
16 |
media-libs/mesa/metadata.xml | 1 + |
17 |
4 files changed, 637 insertions(+) |
18 |
|
19 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
20 |
index 3dc4f61..7e2648b 100644 |
21 |
--- a/media-libs/mesa/Manifest |
22 |
+++ b/media-libs/mesa/Manifest |
23 |
@@ -4,3 +4,4 @@ DIST mesa-18.3.4.tar.xz 11875224 BLAKE2B 81d34349c644cc93b3ca525046cdd63a5aa2a16 |
24 |
DIST mesa-18.3.5.tar.xz 11882012 BLAKE2B 88279fe2f24c2a47c8857ad34382b7c8b64119632f1ec7ce8d0fe2afe669e01d2e071726f01e28b001be353d8d9ec1f0ef46d3ba1e64239d63221b100745e8ee SHA512 f229ac122eafee98d1a40c54adeb019eb4458cb67063db9ba760b265da0634fe77247c3c8cb5c5de5fd40f8545e35d45000a74af9257ebf4e2028156add8644c |
25 |
DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d08f66f2731fe60eff21edfa822b6d7a293fbf9e426acddbb58445b9b0e3c0b1bc8ae05e8b19e802872571449c2 SHA512 3a6dcaba99185e28d162b130bbd760fe87e6072065958189b28f41ea287ef041397897e098d93218a64802cf11c73806f7400a866bd8e5ed69694fa15c147487 |
26 |
DIST mesa-19.0.3.tar.xz 11963844 BLAKE2B 7d8bae717c0a2a6143d3aee35852145a2032d40ad7f4edcd76eec46392f3917787592d13f9695de54a15ea5bcb3dec3181c418ddfb5b69a3e1b52fb796f04eab SHA512 aa170577252aa4157e4bd49076bbf6207e4aada9fc9f23b255de332e816f9c63e5661f752f2f276dd43e232a8926866004e2a2ff9ad4b411330969c2a9a7ffa0 |
27 |
+DIST mesa-19.1.0-rc1.tar.xz 10877180 BLAKE2B 1ea358595875fbe46b58f5445762cec0c0bd6ee087ce9819237373e2b41aacb64365ac9832b20b9f5fb8838c3d2c6c929cd642bba18b99c7ef153ca124135918 SHA512 a56215882a7c22b7b8fe57d5703914d674841e4045676e2cc2e7834d17f4d5a765516bec4f01eea6772c50e1d979cc430e032302f38c6e7a4274bc43a4d647b1 |
28 |
|
29 |
diff --git a/media-libs/mesa/files/mesa-19.1.0-execinfo.patch b/media-libs/mesa/files/mesa-19.1.0-execinfo.patch |
30 |
new file mode 100644 |
31 |
index 0000000..473b9a8 |
32 |
--- /dev/null |
33 |
+++ b/media-libs/mesa/files/mesa-19.1.0-execinfo.patch |
34 |
@@ -0,0 +1,90 @@ |
35 |
+From 46036cd6b8c0da94262aaccd5c8bcaad0c93babd Mon Sep 17 00:00:00 2001 |
36 |
+From: Jory Pratt <anarchy@g.o> |
37 |
+Date: Tue, 7 May 2019 21:47:40 -0500 |
38 |
+Subject: [PATCH] Fix execinfo.h inclusion for libc's that do not support |
39 |
+ |
40 |
+--- |
41 |
+ meson.build | 2 +- |
42 |
+ src/gallium/auxiliary/util/u_debug_symbol.c | 8 ++++---- |
43 |
+ src/mapi/glapi/gen/gl_gentable.py | 2 +- |
44 |
+ src/mesa/drivers/dri/i915/intel_regions.c | 2 +- |
45 |
+ 4 files changed, 7 insertions(+), 7 deletions(-) |
46 |
+ |
47 |
+diff --git a/meson.build b/meson.build |
48 |
+index f72bdc9..6b7200c 100644 |
49 |
+--- a/meson.build |
50 |
++++ b/meson.build |
51 |
+@@ -1040,7 +1040,7 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major') |
52 |
+ pre_args += '-DMAJOR_IN_MKDEV' |
53 |
+ endif |
54 |
+ |
55 |
+-foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h'] |
56 |
++foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h'] |
57 |
+ if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h)) |
58 |
+ pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify()) |
59 |
+ endif |
60 |
+diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c |
61 |
+index 22e6c8c..d8380b7 100644 |
62 |
+--- a/src/gallium/auxiliary/util/u_debug_symbol.c |
63 |
++++ b/src/gallium/auxiliary/util/u_debug_symbol.c |
64 |
+@@ -219,7 +219,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) |
65 |
+ #endif /* PIPE_OS_WINDOWS */ |
66 |
+ |
67 |
+ |
68 |
+-#if defined(__GLIBC__) && !defined(__UCLIBC__) |
69 |
++#if defined(HAVE_EXECINFO_H) |
70 |
+ |
71 |
+ #include <execinfo.h> |
72 |
+ |
73 |
+@@ -240,7 +240,7 @@ debug_symbol_name_glibc(const void *addr, char* buf, unsigned size) |
74 |
+ return TRUE; |
75 |
+ } |
76 |
+ |
77 |
+-#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */ |
78 |
++#endif /* defined(HAVE_EXECINFO_H) */ |
79 |
+ |
80 |
+ |
81 |
+ void |
82 |
+@@ -252,11 +252,11 @@ debug_symbol_name(const void *addr, char* buf, unsigned size) |
83 |
+ } |
84 |
+ #endif |
85 |
+ |
86 |
+-#if defined(__GLIBC__) && !defined(__UCLIBC__) |
87 |
++#if defined(HAVE_EXECINFO_H) |
88 |
+ if (debug_symbol_name_glibc(addr, buf, size)) { |
89 |
+ return; |
90 |
+ } |
91 |
+-#endif |
92 |
++#endif /* defined(HAVE_EXECINFO_H) */ |
93 |
+ |
94 |
+ util_snprintf(buf, size, "%p", addr); |
95 |
+ buf[size - 1] = 0; |
96 |
+diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py |
97 |
+index 9d8923c..92e1a54 100644 |
98 |
+--- a/src/mapi/glapi/gen/gl_gentable.py |
99 |
++++ b/src/mapi/glapi/gen/gl_gentable.py |
100 |
+@@ -45,7 +45,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i |
101 |
+ #endif |
102 |
+ |
103 |
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\ |
104 |
+- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)) |
105 |
++ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H)) |
106 |
+ #define USE_BACKTRACE |
107 |
+ #endif |
108 |
+ |
109 |
+diff --git a/src/mesa/drivers/dri/i915/intel_regions.c b/src/mesa/drivers/dri/i915/intel_regions.c |
110 |
+index fee7348..803ea93 100644 |
111 |
+--- a/src/mesa/drivers/dri/i915/intel_regions.c |
112 |
++++ b/src/mesa/drivers/dri/i915/intel_regions.c |
113 |
+@@ -57,7 +57,7 @@ |
114 |
+ */ |
115 |
+ #define DEBUG_BACKTRACE_SIZE 0 |
116 |
+ |
117 |
+-#if DEBUG_BACKTRACE_SIZE == 0 |
118 |
++#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H) |
119 |
+ /* Use the standard debug output */ |
120 |
+ #define _DBG(...) DBG(__VA_ARGS__) |
121 |
+ #else |
122 |
+-- |
123 |
+2.21.0 |
124 |
+ |
125 |
|
126 |
diff --git a/media-libs/mesa/mesa-19.1.0_rc1.ebuild b/media-libs/mesa/mesa-19.1.0_rc1.ebuild |
127 |
new file mode 100644 |
128 |
index 0000000..c15e899 |
129 |
--- /dev/null |
130 |
+++ b/media-libs/mesa/mesa-19.1.0_rc1.ebuild |
131 |
@@ -0,0 +1,545 @@ |
132 |
+# Copyright 1999-2019 Gentoo Authors |
133 |
+# Distributed under the terms of the GNU General Public License v2 |
134 |
+ |
135 |
+EAPI=6 |
136 |
+ |
137 |
+PYTHON_COMPAT=( python3_5 python3_6 python3_7 ) |
138 |
+ |
139 |
+inherit llvm meson multilib-minimal pax-utils python-any-r1 |
140 |
+ |
141 |
+OPENGL_DIR="xorg-x11" |
142 |
+ |
143 |
+MY_P="${P/_/-}" |
144 |
+ |
145 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
146 |
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
147 |
+ |
148 |
+if [[ ${PV} == 9999 ]]; then |
149 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
150 |
+ EXPERIMENTAL="true" |
151 |
+ inherit git-r3 |
152 |
+else |
153 |
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
154 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
155 |
+fi |
156 |
+ |
157 |
+LICENSE="MIT" |
158 |
+SLOT="0" |
159 |
+RESTRICT=" |
160 |
+ !test? ( test ) |
161 |
+" |
162 |
+ |
163 |
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
164 |
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris nouveau vc4 virgl vivante vmware" |
165 |
+for card in ${VIDEO_CARDS}; do |
166 |
+ IUSE_VIDEO_CARDS+=" video_cards_${card}" |
167 |
+done |
168 |
+ |
169 |
+IUSE="${IUSE_VIDEO_CARDS} |
170 |
+ +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm |
171 |
+ lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind |
172 |
+ vdpau vulkan vulkan-overlay wayland xa xvmc" |
173 |
+ |
174 |
+REQUIRED_USE=" |
175 |
+ d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) |
176 |
+ gles1? ( egl ) |
177 |
+ gles2? ( egl ) |
178 |
+ vulkan? ( dri3 |
179 |
+ || ( video_cards_i965 video_cards_iris video_cards_radeonsi ) |
180 |
+ video_cards_radeonsi? ( llvm ) ) |
181 |
+ vulkan-overlay? ( vulkan ) |
182 |
+ wayland? ( egl gbm ) |
183 |
+ video_cards_freedreno? ( gallium ) |
184 |
+ video_cards_intel? ( classic ) |
185 |
+ video_cards_i915? ( || ( classic gallium ) ) |
186 |
+ video_cards_i965? ( classic ) |
187 |
+ video_cards_iris? ( gallium ) |
188 |
+ video_cards_nouveau? ( || ( classic gallium ) ) |
189 |
+ video_cards_radeon? ( || ( classic gallium ) |
190 |
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
191 |
+ video_cards_r100? ( classic ) |
192 |
+ video_cards_r200? ( classic ) |
193 |
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
194 |
+ video_cards_r600? ( gallium ) |
195 |
+ video_cards_radeonsi? ( gallium llvm ) |
196 |
+ video_cards_vc4? ( gallium ) |
197 |
+ video_cards_virgl? ( gallium ) |
198 |
+ video_cards_vivante? ( gallium gbm ) |
199 |
+ video_cards_vmware? ( gallium ) |
200 |
+" |
201 |
+ |
202 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.97" |
203 |
+RDEPEND=" |
204 |
+ !app-eselect/eselect-mesa |
205 |
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
206 |
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
207 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
208 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
209 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
210 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
211 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
212 |
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
213 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
214 |
+ libglvnd? ( |
215 |
+ media-libs/libglvnd[${MULTILIB_USEDEP}] |
216 |
+ !app-eselect/eselect-opengl |
217 |
+ ) |
218 |
+ !libglvnd? ( |
219 |
+ >=app-eselect/eselect-opengl-1.3.0 |
220 |
+ ) |
221 |
+ gallium? ( |
222 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
223 |
+ llvm? ( |
224 |
+ video_cards_radeonsi? ( |
225 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
226 |
+ ) |
227 |
+ video_cards_r600? ( |
228 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
229 |
+ ) |
230 |
+ video_cards_radeon? ( |
231 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
232 |
+ ) |
233 |
+ ) |
234 |
+ lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) |
235 |
+ opencl? ( |
236 |
+ dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] |
237 |
+ dev-libs/libclc |
238 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
239 |
+ ) |
240 |
+ vaapi? ( |
241 |
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
242 |
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
243 |
+ ) |
244 |
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
245 |
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
246 |
+ ) |
247 |
+ wayland? ( |
248 |
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] |
249 |
+ >=dev-libs/wayland-protocols-1.8 |
250 |
+ ) |
251 |
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
252 |
+ |
253 |
+ video_cards_intel? ( |
254 |
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
255 |
+ ) |
256 |
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
257 |
+" |
258 |
+for card in ${RADEON_CARDS}; do |
259 |
+ RDEPEND="${RDEPEND} |
260 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
261 |
+ " |
262 |
+done |
263 |
+RDEPEND="${RDEPEND} |
264 |
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
265 |
+" |
266 |
+ |
267 |
+# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
268 |
+# we need to *really* make sure we're not pulling one than more slot |
269 |
+# simultaneously. |
270 |
+# |
271 |
+# How to use it: |
272 |
+# 1. List all the working slots (with min versions) in ||, newest first. |
273 |
+# 2. Update the := to specify *max* version, e.g. < 10. |
274 |
+# 3. Specify LLVM_MAX_SLOT, e.g. 9. |
275 |
+LLVM_MAX_SLOT="9" |
276 |
+LLVM_DEPSTR=" |
277 |
+ || ( |
278 |
+ sys-devel/llvm:9[${MULTILIB_USEDEP}] |
279 |
+ sys-devel/llvm:8[${MULTILIB_USEDEP}] |
280 |
+ sys-devel/llvm:7[${MULTILIB_USEDEP}] |
281 |
+ ) |
282 |
+ sys-devel/llvm:=[${MULTILIB_USEDEP}] |
283 |
+" |
284 |
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
285 |
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
286 |
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
287 |
+RDEPEND="${RDEPEND} |
288 |
+ llvm? ( |
289 |
+ opencl? ( |
290 |
+ video_cards_r600? ( |
291 |
+ ${CLANG_DEPSTR_AMDGPU} |
292 |
+ ) |
293 |
+ !video_cards_r600? ( |
294 |
+ video_cards_radeonsi? ( |
295 |
+ ${CLANG_DEPSTR_AMDGPU} |
296 |
+ ) |
297 |
+ ) |
298 |
+ !video_cards_r600? ( |
299 |
+ !video_cards_radeonsi? ( |
300 |
+ video_cards_radeon? ( |
301 |
+ ${CLANG_DEPSTR_AMDGPU} |
302 |
+ ) |
303 |
+ ) |
304 |
+ ) |
305 |
+ !video_cards_r600? ( |
306 |
+ !video_cards_radeon? ( |
307 |
+ !video_cards_radeonsi? ( |
308 |
+ ${CLANG_DEPSTR} |
309 |
+ ) |
310 |
+ ) |
311 |
+ ) |
312 |
+ ) |
313 |
+ !opencl? ( |
314 |
+ video_cards_r600? ( |
315 |
+ ${LLVM_DEPSTR_AMDGPU} |
316 |
+ ) |
317 |
+ !video_cards_r600? ( |
318 |
+ video_cards_radeonsi? ( |
319 |
+ ${LLVM_DEPSTR_AMDGPU} |
320 |
+ ) |
321 |
+ ) |
322 |
+ !video_cards_r600? ( |
323 |
+ !video_cards_radeonsi? ( |
324 |
+ video_cards_radeon? ( |
325 |
+ ${LLVM_DEPSTR_AMDGPU} |
326 |
+ ) |
327 |
+ ) |
328 |
+ ) |
329 |
+ !video_cards_r600? ( |
330 |
+ !video_cards_radeon? ( |
331 |
+ !video_cards_radeonsi? ( |
332 |
+ ${LLVM_DEPSTR} |
333 |
+ ) |
334 |
+ ) |
335 |
+ ) |
336 |
+ ) |
337 |
+ ) |
338 |
+" |
339 |
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
340 |
+ |
341 |
+DEPEND="${RDEPEND} |
342 |
+ ${PYTHON_DEPS} |
343 |
+ opencl? ( |
344 |
+ >=sys-devel/gcc-4.6 |
345 |
+ ) |
346 |
+ sys-devel/bison |
347 |
+ sys-devel/flex |
348 |
+ sys-devel/gettext |
349 |
+ virtual/pkgconfig |
350 |
+ valgrind? ( dev-util/valgrind ) |
351 |
+ x11-base/xorg-proto |
352 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
353 |
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
354 |
+" |
355 |
+ |
356 |
+S="${WORKDIR}/${MY_P}" |
357 |
+EGIT_CHECKOUT_DIR=${S} |
358 |
+ |
359 |
+QA_WX_LOAD=" |
360 |
+x86? ( |
361 |
+ !pic? ( |
362 |
+ usr/lib*/libglapi.so.0.0.0 |
363 |
+ usr/lib*/libGLESv1_CM.so.1.0.0 |
364 |
+ usr/lib*/libGLESv2.so.2.0.0 |
365 |
+ usr/lib*/libGL.so.1.2.0 |
366 |
+ usr/lib*/libOSMesa.so.8.0.0 |
367 |
+ ) |
368 |
+)" |
369 |
+ |
370 |
+PATCHES=( |
371 |
+ "${FILESDIR}"/${PN}-19.1.0-execinfo.patch |
372 |
+ "${FILESDIR}"/${PN}-18-musl-invocation_name.patch |
373 |
+ "${FILESDIR}"/${PN}-18-musl-pthread.patch |
374 |
+ "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch |
375 |
+ "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch |
376 |
+) |
377 |
+ |
378 |
+llvm_check_deps() { |
379 |
+ local flags=${MULTILIB_USEDEP} |
380 |
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
381 |
+ then |
382 |
+ flags+=",llvm_targets_AMDGPU(-)" |
383 |
+ fi |
384 |
+ |
385 |
+ if use opencl; then |
386 |
+ has_version "sys-devel/clang[${flags}]" || return 1 |
387 |
+ fi |
388 |
+ has_version "sys-devel/llvm[${flags}]" |
389 |
+} |
390 |
+ |
391 |
+pkg_pretend() { |
392 |
+ if use opencl; then |
393 |
+ if ! use video_cards_r600 && |
394 |
+ ! use video_cards_radeonsi; then |
395 |
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" |
396 |
+ fi |
397 |
+ fi |
398 |
+ |
399 |
+ if use vaapi; then |
400 |
+ if ! use video_cards_r600 && |
401 |
+ ! use video_cards_radeonsi && |
402 |
+ ! use video_cards_nouveau; then |
403 |
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" |
404 |
+ fi |
405 |
+ fi |
406 |
+ |
407 |
+ if use vdpau; then |
408 |
+ if ! use video_cards_r300 && |
409 |
+ ! use video_cards_r600 && |
410 |
+ ! use video_cards_radeonsi && |
411 |
+ ! use video_cards_nouveau; then |
412 |
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" |
413 |
+ fi |
414 |
+ fi |
415 |
+ |
416 |
+ if use xa; then |
417 |
+ if ! use video_cards_freedreno && |
418 |
+ ! use video_cards_nouveau && |
419 |
+ ! use video_cards_vmware; then |
420 |
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" |
421 |
+ fi |
422 |
+ fi |
423 |
+ |
424 |
+ if use xvmc; then |
425 |
+ if ! use video_cards_r600 && |
426 |
+ ! use video_cards_nouveau; then |
427 |
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" |
428 |
+ fi |
429 |
+ fi |
430 |
+ |
431 |
+ if ! use gallium; then |
432 |
+ use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" |
433 |
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" |
434 |
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" |
435 |
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" |
436 |
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" |
437 |
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" |
438 |
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" |
439 |
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" |
440 |
+ fi |
441 |
+ |
442 |
+ if ! use llvm; then |
443 |
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" |
444 |
+ fi |
445 |
+} |
446 |
+ |
447 |
+python_check_deps() { |
448 |
+ has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" |
449 |
+} |
450 |
+ |
451 |
+pkg_setup() { |
452 |
+ # warning message for bug 459306 |
453 |
+ if use llvm && has_version sys-devel/llvm[!debug=]; then |
454 |
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
455 |
+ ewarn "detected! This can cause problems. For details, see bug 459306." |
456 |
+ fi |
457 |
+ |
458 |
+ if use llvm; then |
459 |
+ llvm_pkg_setup |
460 |
+ fi |
461 |
+ python-any-r1_pkg_setup |
462 |
+} |
463 |
+ |
464 |
+multilib_src_configure() { |
465 |
+ local emesonargs=() |
466 |
+ |
467 |
+ if use classic; then |
468 |
+ # Intel code |
469 |
+ dri_driver_enable video_cards_i915 i915 |
470 |
+ dri_driver_enable video_cards_i965 i965 |
471 |
+ if ! use video_cards_i915 && \ |
472 |
+ ! use video_cards_i965; then |
473 |
+ dri_driver_enable video_cards_intel i915 i965 |
474 |
+ fi |
475 |
+ |
476 |
+ # Nouveau code |
477 |
+ dri_driver_enable video_cards_nouveau nouveau |
478 |
+ |
479 |
+ # ATI code |
480 |
+ dri_driver_enable video_cards_r100 r100 |
481 |
+ dri_driver_enable video_cards_r200 r200 |
482 |
+ if ! use video_cards_r100 && \ |
483 |
+ ! use video_cards_r200; then |
484 |
+ dri_driver_enable video_cards_radeon r100 r200 |
485 |
+ fi |
486 |
+ fi |
487 |
+ |
488 |
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) |
489 |
+ |
490 |
+ if use gallium; then |
491 |
+ emesonargs+=( |
492 |
+ $(meson_use llvm) |
493 |
+ $(meson_use lm_sensors lmsensors) |
494 |
+ $(meson_use unwind libunwind) |
495 |
+ ) |
496 |
+ |
497 |
+ if use video_cards_iris || |
498 |
+ use video_cards_r300 || |
499 |
+ use video_cards_r600 || |
500 |
+ use video_cards_radeonsi || |
501 |
+ use video_cards_nouveau || |
502 |
+ use video_cards_vmware; then |
503 |
+ emesonargs+=($(meson_use d3d9 gallium-nine)) |
504 |
+ else |
505 |
+ emesonargs+=(-Dgallium-nine=false) |
506 |
+ fi |
507 |
+ |
508 |
+ if use video_cards_r600 || |
509 |
+ use video_cards_radeonsi || |
510 |
+ use video_cards_nouveau; then |
511 |
+ emesonargs+=($(meson_use vaapi gallium-va)) |
512 |
+ use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) |
513 |
+ else |
514 |
+ emesonargs+=(-Dgallium-va=false) |
515 |
+ fi |
516 |
+ |
517 |
+ if use video_cards_r300 || |
518 |
+ use video_cards_r600 || |
519 |
+ use video_cards_radeonsi || |
520 |
+ use video_cards_nouveau; then |
521 |
+ emesonargs+=($(meson_use vdpau gallium-vdpau)) |
522 |
+ else |
523 |
+ emesonargs+=(-Dgallium-vdpau=false) |
524 |
+ fi |
525 |
+ |
526 |
+ if use video_cards_freedreno || |
527 |
+ use video_cards_nouveau || |
528 |
+ use video_cards_vmware; then |
529 |
+ emesonargs+=($(meson_use xa gallium-xa)) |
530 |
+ else |
531 |
+ emesonargs+=(-Dgallium-xa=false) |
532 |
+ fi |
533 |
+ |
534 |
+ if use video_cards_r600 || |
535 |
+ use video_cards_nouveau; then |
536 |
+ emesonargs+=($(meson_use xvmc gallium-xvmc)) |
537 |
+ else |
538 |
+ emesonargs+=(-Dgallium-xvmc=false) |
539 |
+ fi |
540 |
+ |
541 |
+ if use video_cards_freedreno || |
542 |
+ use video_cards_vc4 || |
543 |
+ use video_cards_vivante; then |
544 |
+ gallium_enable -- kmsro |
545 |
+ fi |
546 |
+ |
547 |
+ gallium_enable video_cards_vc4 vc4 |
548 |
+ gallium_enable video_cards_vivante etnaviv |
549 |
+ gallium_enable video_cards_vmware svga |
550 |
+ gallium_enable video_cards_nouveau nouveau |
551 |
+ |
552 |
+ # Only one i915 driver (classic vs gallium). Default to classic. |
553 |
+ if ! use classic; then |
554 |
+ gallium_enable video_cards_i915 i915 |
555 |
+ if ! use video_cards_i915 && \ |
556 |
+ ! use video_cards_i965; then |
557 |
+ gallium_enable video_cards_intel i915 |
558 |
+ fi |
559 |
+ fi |
560 |
+ |
561 |
+ gallium_enable video_cards_iris iris |
562 |
+ |
563 |
+ gallium_enable video_cards_r300 r300 |
564 |
+ gallium_enable video_cards_r600 r600 |
565 |
+ gallium_enable video_cards_radeonsi radeonsi |
566 |
+ if ! use video_cards_r300 && \ |
567 |
+ ! use video_cards_r600; then |
568 |
+ gallium_enable video_cards_radeon r300 r600 |
569 |
+ fi |
570 |
+ |
571 |
+ gallium_enable video_cards_freedreno freedreno |
572 |
+ gallium_enable video_cards_virgl virgl |
573 |
+ |
574 |
+ # opencl stuff |
575 |
+ emesonargs+=( |
576 |
+ -Dgallium-opencl="$(usex opencl icd disabled)" |
577 |
+ ) |
578 |
+ fi |
579 |
+ |
580 |
+ if use vulkan; then |
581 |
+ vulkan_enable video_cards_i965 intel |
582 |
+ vulkan_enable video_cards_iris intel |
583 |
+ vulkan_enable video_cards_radeonsi amd |
584 |
+ fi |
585 |
+ |
586 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
587 |
+ if [[ ${ABI} == x86 ]]; then |
588 |
+ emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) |
589 |
+ fi |
590 |
+ |
591 |
+ # on abi_x86_32 hardened we need to have asm disable |
592 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
593 |
+ emesonargs+=( -Dasm=false ) |
594 |
+ fi |
595 |
+ |
596 |
+ if use gallium; then |
597 |
+ gallium_enable -- swrast |
598 |
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) |
599 |
+ else |
600 |
+ dri_driver_enable -- swrast |
601 |
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) |
602 |
+ fi |
603 |
+ |
604 |
+ driver_list() { |
605 |
+ local drivers="$(sort -u <<< "${1// /$'\n'}")" |
606 |
+ echo "${drivers//$'\n'/,}" |
607 |
+ } |
608 |
+ |
609 |
+ emesonargs+=( |
610 |
+ $(meson_use test build-tests) |
611 |
+ -Dglx=dri |
612 |
+ -Dshared-glapi=true |
613 |
+ $(meson_use dri3) |
614 |
+ $(meson_use egl) |
615 |
+ $(meson_use gbm) |
616 |
+ $(meson_use gles1) |
617 |
+ $(meson_use gles2) |
618 |
+ $(meson_use libglvnd glvnd) |
619 |
+ $(meson_use selinux) |
620 |
+ -Dvalgrind=$(usex valgrind auto false) |
621 |
+ -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
622 |
+ -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
623 |
+ -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
624 |
+ $(meson_use vulkan-overlay vulkan-overlay-layer) |
625 |
+ --buildtype $(usex debug debug plain) |
626 |
+ -Db_ndebug=$(usex debug false true) |
627 |
+ ) |
628 |
+ meson_src_configure |
629 |
+} |
630 |
+ |
631 |
+multilib_src_compile() { |
632 |
+ meson_src_compile |
633 |
+} |
634 |
+ |
635 |
+multilib_src_install() { |
636 |
+ meson_src_install |
637 |
+ |
638 |
+ use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so* |
639 |
+} |
640 |
+ |
641 |
+multilib_src_install_all() { |
642 |
+ einstalldocs |
643 |
+} |
644 |
+ |
645 |
+multilib_src_test() { |
646 |
+ meson test -v -C "${BUILD_DIR}" -t 100 |
647 |
+} |
648 |
+ |
649 |
+pkg_postinst() { |
650 |
+ # Switch to the xorg implementation. |
651 |
+ echo |
652 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
653 |
+} |
654 |
+ |
655 |
+# $1 - VIDEO_CARDS flag (check skipped for "--") |
656 |
+# other args - names of DRI drivers to enable |
657 |
+dri_driver_enable() { |
658 |
+ if [[ $1 == -- ]] || use $1; then |
659 |
+ shift |
660 |
+ DRI_DRIVERS+=("$@") |
661 |
+ fi |
662 |
+} |
663 |
+ |
664 |
+gallium_enable() { |
665 |
+ if [[ $1 == -- ]] || use $1; then |
666 |
+ shift |
667 |
+ GALLIUM_DRIVERS+=("$@") |
668 |
+ fi |
669 |
+} |
670 |
+ |
671 |
+vulkan_enable() { |
672 |
+ if [[ $1 == -- ]] || use $1; then |
673 |
+ shift |
674 |
+ VULKAN_DRIVERS+=("$@") |
675 |
+ fi |
676 |
+} |
677 |
|
678 |
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml |
679 |
index 23679a7..1adb4bf 100644 |
680 |
--- a/media-libs/mesa/metadata.xml |
681 |
+++ b/media-libs/mesa/metadata.xml |
682 |
@@ -24,6 +24,7 @@ |
683 |
<flag name="valgrind">Compile in valgrind memory hints</flag> |
684 |
<flag name="vdpau">Enable the VDPAU acceleration interface for the Gallium3D Video Layer.</flag> |
685 |
<flag name="vulkan">Enable Vulkan drivers</flag> |
686 |
+ <flag name="vulkan-overlay">Build vulkan-overlay-layer which displays Frames Per Second and other statistics</flag> |
687 |
<flag name="wayland">Enable support for dev-libs/wayland</flag> |
688 |
<flag name="xa">Enable the XA (X Acceleration) API for Gallium3D.</flag> |
689 |
<flag name="xvmc">Enable the XvMC acceleration interface for the Gallium3D Video Layer.</flag> |