Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: media-libs/mesa/, media-libs/mesa/files/
Date: Thu, 22 Aug 2019 03:05:38
Message-Id: 1566442945.a68639cd4a0a59e7bde0b0e33a6657d066e5fc5d.anarchy@gentoo
1 commit: a68639cd4a0a59e7bde0b0e33a6657d066e5fc5d
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 22 03:02:25 2019 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 22 03:02:25 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=a68639cd
7
8 media-libs/mesa: fix mesa for stable systems
9
10 Package-Manager: Portage-2.3.72, Repoman-2.3.17
11 RepoMan-Options: --force
12 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
13
14 media-libs/mesa/Manifest | 6 +-
15 media-libs/mesa/files/mesa-17-execinfo.patch | 77 ---
16 .../mesa/files/mesa-17-musl-invocation_name.patch | 47 --
17 media-libs/mesa/files/mesa-17-musl-pthread.patch | 39 --
18 media-libs/mesa/files/mesa-17-musl-string_h.patch | 63 ---
19 .../mesa/files/mesa-18-intel-missing-time_t.patch | 11 -
20 .../mesa-18-musl-amdgpu-include-pthread.patch | 11 -
21 .../mesa/files/mesa-18-musl-invocation_name.patch | 12 -
22 media-libs/mesa/files/mesa-18-musl-pthread.patch | 40 --
23 media-libs/mesa/files/mesa-19.0.8-execinfo.patch | 97 ++++
24 .../mesa/files/mesa-19.0.8-heap-allocation.patch | 66 +++
25 media-libs/mesa/mesa-18.1.9.ebuild | 519 --------------------
26 media-libs/mesa/mesa-18.2.8.ebuild | 528 --------------------
27 media-libs/mesa/mesa-18.3.4.ebuild | 532 ---------------------
28 media-libs/mesa/mesa-18.3.5.ebuild | 532 ---------------------
29 .../{mesa-18.3.6.ebuild => mesa-19.0.8.ebuild} | 49 +-
30 16 files changed, 191 insertions(+), 2438 deletions(-)
31
32 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
33 index 31d2724..aec3d15 100644
34 --- a/media-libs/mesa/Manifest
35 +++ b/media-libs/mesa/Manifest
36 @@ -1,6 +1,2 @@
37 -DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
38 -DIST mesa-18.2.8.tar.xz 11385224 BLAKE2B c6fbf71e2ab6837f91dfa996cf7e89e9cae22e219cac56bd4201f7a62c787ddd2f65e7d162a329971018f0b1a796ee1a5b252ee6b43bb3b27a233d67b6cdf615 SHA512 04d5ada9ba3acea853def3ebcbb53ee76936a4cd4229ae753d2ce1b5cf543bea1e5764f2ef2b19735d47d041ba6b0582841bc89e2c9331fdfbd89386f599a1f7
39 -DIST mesa-18.3.4.tar.xz 11875224 BLAKE2B 81d34349c644cc93b3ca525046cdd63a5aa2a16d8f6b841830a138c8e9e375fb0f75a17bd80b4c48ed573f4976dd6612b0773305a3bec982540914365c9925ff SHA512 e4ead944ba053aa05425e9e199d633f576dfa424976253fc32438e8db6da5e8d381122e4c4b7fb18f94177421f208bab5567cfec8d2692d104e266483ca02a99
40 -DIST mesa-18.3.5.tar.xz 11882012 BLAKE2B 88279fe2f24c2a47c8857ad34382b7c8b64119632f1ec7ce8d0fe2afe669e01d2e071726f01e28b001be353d8d9ec1f0ef46d3ba1e64239d63221b100745e8ee SHA512 f229ac122eafee98d1a40c54adeb019eb4458cb67063db9ba760b265da0634fe77247c3c8cb5c5de5fd40f8545e35d45000a74af9257ebf4e2028156add8644c
41 -DIST mesa-18.3.6.tar.xz 11882744 BLAKE2B f0f0de6d4c40cf01c6b9cb97d772c6386deb3d08f66f2731fe60eff21edfa822b6d7a293fbf9e426acddbb58445b9b0e3c0b1bc8ae05e8b19e802872571449c2 SHA512 3a6dcaba99185e28d162b130bbd760fe87e6072065958189b28f41ea287ef041397897e098d93218a64802cf11c73806f7400a866bd8e5ed69694fa15c147487
42 +DIST mesa-19.0.8.tar.xz 11967592 BLAKE2B 91a46b67bdb8cb3ab4c7337be7c2b0dc6ab5ec8cc126afc2d8af8d056bff0392a5b443c26304bf4c68472eb6ba16d29ca248c1fc0c0f2dd6af03d3e10d3ec1b3 SHA512 fbddc3a74f223564343027380af776b3fa5d63fe1af4e34121273235d1c6eced96439f601eb19bf658eb927aff3965b520f0329fcbd4650f3112167303e1746d
43 DIST mesa-19.1.4.tar.xz 10938008 BLAKE2B 4745fc7e844397378fe1adf61bcd5b54aad11ec0b375ced85fd80ced01227432b491ad8b7ba7d9013190cfbb451bc11cdb7c8af0e1f298dd5d793d3ce43aa92b SHA512 234032d917c9b378c3f6ceb921677b64e549344c3957331810b50fd73e0dccd2f4f62e2bd39e619590f389bc58fdab10fab4b88f7c117557cbeb1dda049b9fc5
44
45 diff --git a/media-libs/mesa/files/mesa-17-execinfo.patch b/media-libs/mesa/files/mesa-17-execinfo.patch
46 deleted file mode 100644
47 index 87b2ce6..0000000
48 --- a/media-libs/mesa/files/mesa-17-execinfo.patch
49 +++ /dev/null
50 @@ -1,77 +0,0 @@
51 -diff -Naur mesa-17.3.0.orig/configure.ac mesa-17.3.0/configure.ac
52 ---- mesa-17.3.0.orig/configure.ac 2017-12-08 05:49:11.000000000 -0800
53 -+++ mesa-17.3.0/configure.ac 2017-12-11 14:11:53.587811247 -0800
54 -@@ -794,6 +794,7 @@
55 - AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
56 - AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
57 - AC_CHECK_FUNC([memfd_create], [DEFINES="$DEFINES -DHAVE_MEMFD_CREATE"])
58 -+AC_CHECK_HEADER([execinfo.h], [DEFINES="$DEFINES -DHAVE_EXECINFO_H"])
59 -
60 - AC_MSG_CHECKING([whether strtod has locale support])
61 - AC_LINK_IFELSE([AC_LANG_SOURCE([[
62 -diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/util/u_debug_symbol.c mesa-17.3.0/src/gallium/auxiliary/util/u_debug_symbol.c
63 ---- mesa-17.3.0.orig/src/gallium/auxiliary/util/u_debug_symbol.c 2017-12-08 05:49:11.000000000 -0800
64 -+++ mesa-17.3.0/src/gallium/auxiliary/util/u_debug_symbol.c 2017-12-11 14:13:52.780809112 -0800
65 -@@ -219,7 +219,7 @@
66 - #endif /* PIPE_OS_WINDOWS */
67 -
68 -
69 --#if defined(__GLIBC__) && !defined(__UCLIBC__)
70 -+#if defined(HAVE_EXECINFO_H)
71 -
72 - #include <execinfo.h>
73 -
74 -@@ -240,7 +240,7 @@
75 - return TRUE;
76 - }
77 -
78 --#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
79 -+#endif /* defined(HAVE_EXECINFO_H) */
80 -
81 -
82 - void
83 -@@ -252,7 +252,7 @@
84 - }
85 - #endif
86 -
87 --#if defined(__GLIBC__) && !defined(__UCLIBC__)
88 -+#if defined(HAVE_EXECINFO_H)
89 - if (debug_symbol_name_glibc(addr, buf, size)) {
90 - return;
91 - }
92 -diff -Naur mesa-17.3.0.orig/src/mapi/glapi/gen/gl_gentable.py mesa-17.3.0/src/mapi/glapi/gen/gl_gentable.py
93 ---- mesa-17.3.0.orig/src/mapi/glapi/gen/gl_gentable.py 2017-12-08 05:49:11.000000000 -0800
94 -+++ mesa-17.3.0/src/mapi/glapi/gen/gl_gentable.py 2017-12-11 14:11:53.587811247 -0800
95 -@@ -43,7 +43,7 @@
96 - #endif
97 -
98 - #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
99 -- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
100 -+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
101 - #define USE_BACKTRACE
102 - #endif
103 -
104 -diff -Naur mesa-17.3.0.orig/src/mapi/glapi/glapi_gentable.c mesa-17.3.0/src/mapi/glapi/glapi_gentable.c
105 ---- mesa-17.3.0.orig/src/mapi/glapi/glapi_gentable.c 2017-12-08 05:49:45.000000000 -0800
106 -+++ mesa-17.3.0/src/mapi/glapi/glapi_gentable.c 2017-12-11 14:11:53.588811247 -0800
107 -@@ -36,7 +36,7 @@
108 - #endif
109 -
110 - #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \
111 -- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
112 -+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
113 - #define USE_BACKTRACE
114 - #endif
115 -
116 -diff -Naur mesa-17.3.0.orig/src/mesa/drivers/dri/i915/intel_regions.c mesa-17.3.0/src/mesa/drivers/dri/i915/intel_regions.c
117 ---- mesa-17.3.0.orig/src/mesa/drivers/dri/i915/intel_regions.c 2017-12-08 05:49:11.000000000 -0800
118 -+++ mesa-17.3.0/src/mesa/drivers/dri/i915/intel_regions.c 2017-12-11 14:11:53.588811247 -0800
119 -@@ -57,7 +57,7 @@
120 - */
121 - #define DEBUG_BACKTRACE_SIZE 0
122 -
123 --#if DEBUG_BACKTRACE_SIZE == 0
124 -+#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
125 - /* Use the standard debug output */
126 - #define _DBG(...) DBG(__VA_ARGS__)
127 - #else
128
129 diff --git a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
130 deleted file mode 100644
131 index 80b02f5..0000000
132 --- a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
133 +++ /dev/null
134 @@ -1,47 +0,0 @@
135 -diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c mesa-17.3.0/src/gallium/auxiliary/os/os_process.c
136 ---- mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c 2017-12-08 05:49:11.000000000 -0800
137 -+++ mesa-17.3.0/src/gallium/auxiliary/os/os_process.c 2017-12-11 14:24:35.200797607 -0800
138 -@@ -32,7 +32,7 @@
139 -
140 - #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
141 - # include <windows.h>
142 --#elif defined(__GLIBC__) || defined(__CYGWIN__)
143 -+#elif defined(__linux__) || defined(__CYGWIN__)
144 - # include <errno.h>
145 - #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
146 - # include <stdlib.h>
147 -@@ -84,7 +84,7 @@
148 -
149 - name = lpProcessName;
150 -
151 --#elif defined(__GLIBC__) || defined(__CYGWIN__)
152 -+#elif defined(__linux__) || defined(__CYGWIN__)
153 - name = program_invocation_short_name;
154 - #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
155 - /* *BSD and OS X */
156 -diff -Naur mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
157 ---- mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-08 05:49:11.000000000 -0800
158 -+++ mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2017-12-11 14:23:35.312798680 -0800
159 -@@ -84,7 +84,7 @@
160 - ret = os_get_process_name(cmdline, 63);
161 - if (ret == FALSE)
162 - strcpy(cmdline, nstr);
163 --#if defined(__GLIBC__) || defined(__CYGWIN__)
164 -+#if defined(__linux__) || defined(__CYGWIN__)
165 - if (!strcmp(cmdline, "shader_runner")) {
166 - const char *name;
167 - /* hack to get better testname */
168 -diff -Naur mesa-17.3.0.orig/src/util/xmlconfig.c mesa-17.3.0/src/util/xmlconfig.c
169 ---- mesa-17.3.0.orig/src/util/xmlconfig.c 2017-12-08 05:49:11.000000000 -0800
170 -+++ mesa-17.3.0/src/util/xmlconfig.c 2017-12-11 14:22:54.052799419 -0800
171 -@@ -40,8 +40,8 @@
172 -
173 - #undef GET_PROGRAM_NAME
174 -
175 --#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
176 --# if !defined(__GLIBC__) || (__GLIBC__ < 2)
177 -+#if defined(__linux__)
178 -+# if defined(__GLIBC__) && (__GLIBC__ < 2)
179 - /* These aren't declared in any libc5 header */
180 - extern char *program_invocation_name, *program_invocation_short_name;
181 - # endif
182
183 diff --git a/media-libs/mesa/files/mesa-17-musl-pthread.patch b/media-libs/mesa/files/mesa-17-musl-pthread.patch
184 deleted file mode 100644
185 index aac95af..0000000
186 --- a/media-libs/mesa/files/mesa-17-musl-pthread.patch
187 +++ /dev/null
188 @@ -1,39 +0,0 @@
189 -diff -Naur mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c
190 ---- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12 16:55:53.885552821 -0800
191 -+++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12 17:09:36.048538098 -0800
192 -@@ -73,8 +73,8 @@
193 - }
194 -
195 - #if defined(HAVE_PTHREAD)
196 --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
197 -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
198 -+# if defined(__linux__) && !(defined(__GLIBC__) || \
199 -+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
200 - if (dbg_flags & DBG_TID)
201 - tid = pthread_self();
202 - # endif
203 -diff -Naur mesa-17.3.0.orig/src/util/u_thread.h mesa-17.3.0/src/util/u_thread.h
204 ---- mesa-17.3.0.orig/src/util/u_thread.h 2017-12-12 16:55:53.915552820 -0800
205 -+++ mesa-17.3.0/src/util/u_thread.h 2017-12-12 17:09:34.079538133 -0800
206 -@@ -61,8 +61,8 @@
207 - static inline void u_thread_setname( const char *name )
208 - {
209 - #if defined(HAVE_PTHREAD)
210 --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
211 -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
212 -+# if defined(__linux__) && !(defined(__GLIBC__) || \
213 -+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
214 - pthread_setname_np(pthread_self(), name);
215 - # endif
216 - #endif
217 -@@ -92,8 +92,8 @@
218 - static inline bool u_thread_is_self(thrd_t thread)
219 - {
220 - #if defined(HAVE_PTHREAD)
221 --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
222 -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
223 -+# if defined(__linux__) && !(defined(__GLIBC__) || \
224 -+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
225 - return pthread_equal(pthread_self(), thread);
226 - # endif
227 - #endif
228
229 diff --git a/media-libs/mesa/files/mesa-17-musl-string_h.patch b/media-libs/mesa/files/mesa-17-musl-string_h.patch
230 deleted file mode 100644
231 index f3ec9e9..0000000
232 --- a/media-libs/mesa/files/mesa-17-musl-string_h.patch
233 +++ /dev/null
234 @@ -1,63 +0,0 @@
235 -diff -Naur mesa-17.3.0.orig/src/compiler/glsl/glcpp/glcpp-parse.c mesa-17.3.0/src/compiler/glsl/glcpp/glcpp-parse.c
236 ---- mesa-17.3.0.orig/src/compiler/glsl/glcpp/glcpp-parse.c 2017-12-08 05:49:48.000000000 -0800
237 -+++ mesa-17.3.0/src/compiler/glsl/glcpp/glcpp-parse.c 2017-12-11 14:07:34.299815890 -0800
238 -@@ -1220,7 +1220,7 @@
239 - #if YYERROR_VERBOSE
240 -
241 - # ifndef yystrlen
242 --# if defined __GLIBC__ && defined _STRING_H
243 -+# if defined __linux__ && defined _STRING_H
244 - # define yystrlen strlen
245 - # else
246 - /* Return the length of YYSTR. */
247 -@@ -1236,7 +1236,7 @@
248 - # endif
249 -
250 - # ifndef yystpcpy
251 --# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
252 -+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
253 - # define yystpcpy stpcpy
254 - # else
255 - /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
256 -diff -Naur mesa-17.3.0.orig/src/compiler/glsl/glsl_parser.cpp mesa-17.3.0/src/compiler/glsl/glsl_parser.cpp
257 ---- mesa-17.3.0.orig/src/compiler/glsl/glsl_parser.cpp 2017-12-08 05:49:49.000000000 -0800
258 -+++ mesa-17.3.0/src/compiler/glsl/glsl_parser.cpp 2017-12-11 14:07:04.530816423 -0800
259 -@@ -2815,7 +2815,7 @@
260 - #if YYERROR_VERBOSE
261 -
262 - # ifndef yystrlen
263 --# if defined __GLIBC__ && defined _STRING_H
264 -+# if defined __linux__ && defined _STRING_H
265 - # define yystrlen strlen
266 - # else
267 - /* Return the length of YYSTR. */
268 -@@ -2831,7 +2831,7 @@
269 - # endif
270 -
271 - # ifndef yystpcpy
272 --# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
273 -+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
274 - # define yystpcpy stpcpy
275 - # else
276 - /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
277 -diff -Naur mesa-17.3.0.orig/src/mesa/program/program_parse.tab.c mesa-17.3.0/src/mesa/program/program_parse.tab.c
278 ---- mesa-17.3.0.orig/src/mesa/program/program_parse.tab.c 2017-12-08 05:49:53.000000000 -0800
279 -+++ mesa-17.3.0/src/mesa/program/program_parse.tab.c 2017-12-11 14:10:08.621813126 -0800
280 -@@ -1440,7 +1440,7 @@
281 - #if YYERROR_VERBOSE
282 -
283 - # ifndef yystrlen
284 --# if defined __GLIBC__ && defined _STRING_H
285 -+# if defined __linux__ && defined _STRING_H
286 - # define yystrlen strlen
287 - # else
288 - /* Return the length of YYSTR. */
289 -@@ -1456,7 +1456,7 @@
290 - # endif
291 -
292 - # ifndef yystpcpy
293 --# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
294 -+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
295 - # define yystpcpy stpcpy
296 - # else
297 - /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
298
299 diff --git a/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch b/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch
300 deleted file mode 100644
301 index 353f8f2..0000000
302 --- a/media-libs/mesa/files/mesa-18-intel-missing-time_t.patch
303 +++ /dev/null
304 @@ -1,11 +0,0 @@
305 -diff -Naur mesa-18.1.0-rc1.orig/src/mesa/drivers/dri/i965/brw_bufmgr.h mesa-18.1.0-rc1/src/mesa/drivers/dri/i965/brw_bufmgr.h
306 ---- mesa-18.1.0-rc1.orig/src/mesa/drivers/dri/i965/brw_bufmgr.h 2018-04-22 12:42:46.505947484 -0700
307 -+++ mesa-18.1.0-rc1/src/mesa/drivers/dri/i965/brw_bufmgr.h 2018-04-22 12:44:09.720945994 -0700
308 -@@ -37,6 +37,7 @@
309 - #include <stdbool.h>
310 - #include <stdint.h>
311 - #include <stdio.h>
312 -+#include <time.h>
313 - #include "util/u_atomic.h"
314 - #include "util/list.h"
315 -
316
317 diff --git a/media-libs/mesa/files/mesa-18-musl-amdgpu-include-pthread.patch b/media-libs/mesa/files/mesa-18-musl-amdgpu-include-pthread.patch
318 deleted file mode 100644
319 index 7a0bde0..0000000
320 --- a/media-libs/mesa/files/mesa-18-musl-amdgpu-include-pthread.patch
321 +++ /dev/null
322 @@ -1,11 +0,0 @@
323 -diff -Naur mesa-18.1.3-orig/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h mesa-18.1.3/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
324 ---- mesa-18.1.3-orig/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h 2018-07-08 22:01:10.758633781 +0300
325 -+++ mesa-18.1.3/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h 2018-07-08 22:01:30.097631709 +0300
326 -@@ -32,6 +32,7 @@
327 - #include "ac_gpu_info.h"
328 - #include "addrlib/addrinterface.h"
329 - #include <amdgpu.h>
330 -+#include <pthread.h>
331 - #include "util/list.h"
332 -
333 - struct radv_amdgpu_winsys {
334
335 diff --git a/media-libs/mesa/files/mesa-18-musl-invocation_name.patch b/media-libs/mesa/files/mesa-18-musl-invocation_name.patch
336 deleted file mode 100644
337 index f591d47..0000000
338 --- a/media-libs/mesa/files/mesa-18-musl-invocation_name.patch
339 +++ /dev/null
340 @@ -1,12 +0,0 @@
341 -diff -Naur mesa-18.2.1.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-18.2.1/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
342 ---- mesa-18.2.1.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2018-09-21 06:57:00.000000000 -0400
343 -+++ mesa-18.2.1/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c 2018-10-04 20:06:47.074806047 -0400
344 -@@ -84,7 +84,7 @@
345 - ret = os_get_process_name(cmdline, 63);
346 - if (ret == FALSE)
347 - strcpy(cmdline, nstr);
348 --#if defined(__GLIBC__) || defined(__CYGWIN__)
349 -+#if defined(__linux__) || defined(__CYGWIN__)
350 - if (!strcmp(cmdline, "shader_runner")) {
351 - const char *name;
352 - /* hack to get better testname */
353
354 diff --git a/media-libs/mesa/files/mesa-18-musl-pthread.patch b/media-libs/mesa/files/mesa-18-musl-pthread.patch
355 deleted file mode 100644
356 index a6af63e..0000000
357 --- a/media-libs/mesa/files/mesa-18-musl-pthread.patch
358 +++ /dev/null
359 @@ -1,40 +0,0 @@
360 -diff -Naur mesa-18.0.0-rc2.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-18.0.0-rc2/src/gallium/state_trackers/nine/nine_debug.c
361 ---- mesa-18.0.0-rc2.orig/src/gallium/state_trackers/nine/nine_debug.c 2018-01-24 13:20:13.287944874 -0800
362 -+++ mesa-18.0.0-rc2/src/gallium/state_trackers/nine/nine_debug.c 2018-01-24 13:23:34.722941267 -0800
363 -@@ -73,8 +73,8 @@
364 - }
365 -
366 - #if defined(HAVE_PTHREAD)
367 --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
368 -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
369 -+# if defined(__linux__) && (!defined(__GLIBC__) || \
370 -+ __GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
371 - if (dbg_flags & DBG_TID)
372 - tid = pthread_self();
373 - # endif
374 -diff -Naur mesa-18.0.0-rc2.orig/src/util/u_thread.h mesa-18.0.0-rc2/src/util/u_thread.h
375 ---- mesa-18.0.0-rc2.orig/src/util/u_thread.h 2018-01-24 13:20:13.166944876 -0800
376 -+++ mesa-18.0.0-rc2/src/util/u_thread.h 2018-01-24 13:24:11.028940616 -0800
377 -@@ -61,9 +61,8 @@
378 - static inline void u_thread_setname( const char *name )
379 - {
380 - #if defined(HAVE_PTHREAD)
381 --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
382 -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
383 -- defined(__linux__)
384 -+# if defined(__linux__) && (!defined(__GLIBC__) || \
385 -+ __GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
386 - pthread_setname_np(pthread_self(), name);
387 - # endif
388 - #endif
389 -@@ -93,8 +92,8 @@
390 - static inline bool u_thread_is_self(thrd_t thread)
391 - {
392 - #if defined(HAVE_PTHREAD)
393 --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
394 -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
395 -+# if defined(__linux__) && !(defined(__GLIBC__) || \
396 -+ __GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
397 - return pthread_equal(pthread_self(), thread);
398 - # endif
399 - #endif
400
401 diff --git a/media-libs/mesa/files/mesa-19.0.8-execinfo.patch b/media-libs/mesa/files/mesa-19.0.8-execinfo.patch
402 new file mode 100644
403 index 0000000..217739d
404 --- /dev/null
405 +++ b/media-libs/mesa/files/mesa-19.0.8-execinfo.patch
406 @@ -0,0 +1,97 @@
407 +From 10e8d466011076a0453368cb976d9f6b06af0e94 Mon Sep 17 00:00:00 2001
408 +From: Jory Pratt <anarchy@g.o>
409 +Date: Tue, 7 May 2019 21:47:40 -0500
410 +Subject: [PATCH] meson: Search for execinfo.h
411 +
412 +Rather than checking __GLIBC__/__UCLIBC__ macros as a proxy for
413 +execinfo.h presence, just check directly. This allows the build to work
414 +on musl.
415 +
416 +Reviewed-by: Matt Turner <mattst88@×××××.com>
417 +Reviewed-by: Eric Anholt <eric@××××××.net>
418 +Reviewed-by: Eric Engestrom <eric.engestrom@×××××.com>
419 +---
420 + meson.build | 2 +-
421 + src/gallium/auxiliary/util/u_debug_symbol.c | 8 ++++----
422 + src/mapi/glapi/gen/gl_gentable.py | 2 +-
423 + src/mesa/drivers/dri/i915/intel_regions.c | 2 +-
424 + 4 files changed, 7 insertions(+), 7 deletions(-)
425 +
426 +diff --git a/meson.build b/meson.build
427 +index a2978117409..a0c965efc32 100644
428 +--- a/meson.build
429 ++++ b/meson.build
430 +@@ -1036,7 +1036,7 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
431 + pre_args += '-DMAJOR_IN_MKDEV'
432 + endif
433 +
434 +-foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h']
435 ++foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h']
436 + if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h))
437 + pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
438 + endif
439 +diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
440 +index 22e6c8ce771..d8380b76bf6 100644
441 +--- a/src/gallium/auxiliary/util/u_debug_symbol.c
442 ++++ b/src/gallium/auxiliary/util/u_debug_symbol.c
443 +@@ -219,7 +219,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
444 + #endif /* PIPE_OS_WINDOWS */
445 +
446 +
447 +-#if defined(__GLIBC__) && !defined(__UCLIBC__)
448 ++#if defined(HAVE_EXECINFO_H)
449 +
450 + #include <execinfo.h>
451 +
452 +@@ -240,7 +240,7 @@ debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
453 + return TRUE;
454 + }
455 +
456 +-#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
457 ++#endif /* defined(HAVE_EXECINFO_H) */
458 +
459 +
460 + void
461 +@@ -252,11 +252,11 @@ debug_symbol_name(const void *addr, char* buf, unsigned size)
462 + }
463 + #endif
464 +
465 +-#if defined(__GLIBC__) && !defined(__UCLIBC__)
466 ++#if defined(HAVE_EXECINFO_H)
467 + if (debug_symbol_name_glibc(addr, buf, size)) {
468 + return;
469 + }
470 +-#endif
471 ++#endif /* defined(HAVE_EXECINFO_H) */
472 +
473 + util_snprintf(buf, size, "%p", addr);
474 + buf[size - 1] = 0;
475 +diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
476 +index 9d8923cf8db..92e1a546cff 100644
477 +--- a/src/mapi/glapi/gen/gl_gentable.py
478 ++++ b/src/mapi/glapi/gen/gl_gentable.py
479 +@@ -45,7 +45,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
480 + #endif
481 +
482 + #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
483 +- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
484 ++ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
485 + #define USE_BACKTRACE
486 + #endif
487 +
488 +diff --git a/src/mesa/drivers/dri/i915/intel_regions.c b/src/mesa/drivers/dri/i915/intel_regions.c
489 +index fee734801cd..803ea9326e8 100644
490 +--- a/src/mesa/drivers/dri/i915/intel_regions.c
491 ++++ b/src/mesa/drivers/dri/i915/intel_regions.c
492 +@@ -57,7 +57,7 @@
493 + */
494 + #define DEBUG_BACKTRACE_SIZE 0
495 +
496 +-#if DEBUG_BACKTRACE_SIZE == 0
497 ++#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
498 + /* Use the standard debug output */
499 + #define _DBG(...) DBG(__VA_ARGS__)
500 + #else
501 +--
502 +2.21.0
503 +
504
505 diff --git a/media-libs/mesa/files/mesa-19.0.8-heap-allocation.patch b/media-libs/mesa/files/mesa-19.0.8-heap-allocation.patch
506 new file mode 100644
507 index 0000000..90e30e0
508 --- /dev/null
509 +++ b/media-libs/mesa/files/mesa-19.0.8-heap-allocation.patch
510 @@ -0,0 +1,66 @@
511 +From fd7b7f14d857f96cf3b2e9d8405dbbfa30dc261a Mon Sep 17 00:00:00 2001
512 +From: Jory Pratt <anarchy@g.o>
513 +Date: Mon, 10 Jun 2019 11:48:02 -0700
514 +Subject: [PATCH] util: Heap-allocate 256K zlib buffer
515 +
516 +The disk cache code tries to allocate a 256 Kbyte buffer on the stack.
517 +Since musl only gives 80 Kbyte of stack space per thread, this causes a
518 +trap.
519 +
520 +See https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-stack-size
521 +
522 +(In musl-1.1.21 the default stack size has increased to 128K)
523 +
524 +[mattst88]: Original author unknown, but I think this is small enough
525 + that it is not copyrightable.
526 +Reviewed-by: Matt Turner <mattst88@×××××.com>
527 +Reviewed-by: Eric Anholt <eric@××××××.net>
528 +Reviewed-by: Eric Engestrom <eric.engestrom@×××××.com>
529 +---
530 + src/util/disk_cache.c | 9 ++++++++-
531 + 1 file changed, 8 insertions(+), 1 deletion(-)
532 +
533 +diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
534 +index 9977c385de1..bc3becfe535 100644
535 +--- a/src/util/disk_cache.c
536 ++++ b/src/util/disk_cache.c
537 +@@ -732,7 +732,7 @@ static size_t
538 + deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
539 + const char *filename)
540 + {
541 +- unsigned char out[BUFSIZE];
542 ++ unsigned char *out;
543 +
544 + /* allocate deflate state */
545 + z_stream strm;
546 +@@ -749,6 +749,11 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
547 + /* compress until end of in_data */
548 + size_t compressed_size = 0;
549 + int flush;
550 ++
551 ++ out = malloc(BUFSIZE * sizeof(unsigned char));
552 ++ if (out == NULL)
553 ++ return 0;
554 ++
555 + do {
556 + int remaining = in_data_size - BUFSIZE;
557 + flush = remaining > 0 ? Z_NO_FLUSH : Z_FINISH;
558 +@@ -770,6 +775,7 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
559 + ssize_t written = write_all(dest, out, have);
560 + if (written == -1) {
561 + (void)deflateEnd(&strm);
562 ++ free(out);
563 + return 0;
564 + }
565 + } while (strm.avail_out == 0);
566 +@@ -784,6 +790,7 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest,
567 +
568 + /* clean up and return */
569 + (void)deflateEnd(&strm);
570 ++ free(out);
571 + return compressed_size;
572 + }
573 +
574 +--
575 +2.21.0
576 +
577
578 diff --git a/media-libs/mesa/mesa-18.1.9.ebuild b/media-libs/mesa/mesa-18.1.9.ebuild
579 deleted file mode 100644
580 index e61e3fd..0000000
581 --- a/media-libs/mesa/mesa-18.1.9.ebuild
582 +++ /dev/null
583 @@ -1,519 +0,0 @@
584 -# Copyright 1999-2018 Gentoo Authors
585 -# Distributed under the terms of the GNU General Public License v2
586 -
587 -EAPI=6
588 -
589 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
590 -
591 -if [[ ${PV} = 9999 ]]; then
592 - GIT_ECLASS="git-r3"
593 - EXPERIMENTAL="true"
594 -fi
595 -
596 -PYTHON_COMPAT=( python2_7 )
597 -
598 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
599 -
600 -OPENGL_DIR="xorg-x11"
601 -
602 -MY_P="${P/_/-}"
603 -
604 -DESCRIPTION="OpenGL-like graphic library for Linux"
605 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
606 -
607 -if [[ $PV == 9999 ]]; then
608 - SRC_URI=""
609 -else
610 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
611 - KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc x86"
612 -fi
613 -
614 -LICENSE="MIT"
615 -SLOT="0"
616 -RESTRICT="!bindist? ( bindist )"
617 -
618 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
619 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
620 -for card in ${VIDEO_CARDS}; do
621 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
622 -done
623 -
624 -IUSE="${IUSE_VIDEO_CARDS}
625 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
626 - +llvm +nptl opencl osmesa pax_kernel pic selinux vaapi valgrind
627 - vdpau vulkan wayland xvmc xa"
628 -
629 -REQUIRED_USE="
630 - d3d9? ( dri3 gallium )
631 - llvm? ( gallium )
632 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
633 - gles1? ( egl )
634 - gles2? ( egl )
635 - vaapi? ( gallium )
636 - vdpau? ( gallium )
637 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
638 - video_cards_radeonsi? ( llvm ) )
639 - wayland? ( egl gbm )
640 - xa? ( gallium )
641 - video_cards_freedreno? ( gallium )
642 - video_cards_intel? ( classic )
643 - video_cards_i915? ( || ( classic gallium ) )
644 - video_cards_i965? ( classic )
645 - video_cards_imx? ( gallium video_cards_vivante )
646 - video_cards_nouveau? ( || ( classic gallium ) )
647 - video_cards_radeon? ( || ( classic gallium )
648 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
649 - video_cards_r100? ( classic )
650 - video_cards_r200? ( classic )
651 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
652 - video_cards_r600? ( gallium )
653 - video_cards_radeonsi? ( gallium llvm )
654 - video_cards_vc4? ( gallium )
655 - video_cards_virgl? ( gallium )
656 - video_cards_vivante? ( gallium gbm )
657 - video_cards_vmware? ( gallium )
658 -"
659 -
660 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
661 -RDEPEND="
662 - !app-eselect/eselect-mesa
663 - >=app-eselect/eselect-opengl-1.3.0
664 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
665 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
666 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
667 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
668 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
669 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
670 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
671 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
672 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
673 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
674 - llvm? (
675 - video_cards_radeonsi? (
676 - virtual/libelf:0=[${MULTILIB_USEDEP}]
677 - )
678 - video_cards_r600? (
679 - virtual/libelf:0=[${MULTILIB_USEDEP}]
680 - )
681 - video_cards_radeon? (
682 - virtual/libelf:0=[${MULTILIB_USEDEP}]
683 - )
684 - )
685 - opencl? (
686 - app-eselect/eselect-opencl
687 - dev-libs/libclc
688 - virtual/libelf:0=[${MULTILIB_USEDEP}]
689 - )
690 - vaapi? (
691 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
692 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
693 - )
694 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
695 - wayland? (
696 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
697 - >=dev-libs/wayland-protocols-1.8
698 - )
699 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
700 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
701 -
702 - video_cards_intel? (
703 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
704 - )
705 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
706 -"
707 -for card in ${RADEON_CARDS}; do
708 - RDEPEND="${RDEPEND}
709 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
710 - "
711 -done
712 -RDEPEND="${RDEPEND}
713 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
714 -"
715 -
716 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
717 -# we need to *really* make sure we're not pulling one than more slot
718 -# simultaneously.
719 -#
720 -# How to use it:
721 -# 1. List all the working slots (with min versions) in ||, newest first.
722 -# 2. Update the := to specify *max* version, e.g. < 7.
723 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
724 -LLVM_MAX_SLOT="6"
725 -LLVM_DEPSTR="
726 - || (
727 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
728 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
729 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
730 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
731 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
732 - )
733 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
734 -"
735 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
736 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
737 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
738 -RDEPEND="${RDEPEND}
739 - llvm? (
740 - opencl? (
741 - video_cards_r600? (
742 - ${CLANG_DEPSTR_AMDGPU}
743 - )
744 - !video_cards_r600? (
745 - video_cards_radeonsi? (
746 - ${CLANG_DEPSTR_AMDGPU}
747 - )
748 - )
749 - !video_cards_r600? (
750 - !video_cards_radeonsi? (
751 - video_cards_radeon? (
752 - ${CLANG_DEPSTR_AMDGPU}
753 - )
754 - )
755 - )
756 - !video_cards_r600? (
757 - !video_cards_radeon? (
758 - !video_cards_radeonsi? (
759 - ${CLANG_DEPSTR}
760 - )
761 - )
762 - )
763 - )
764 - !opencl? (
765 - video_cards_r600? (
766 - ${LLVM_DEPSTR_AMDGPU}
767 - )
768 - !video_cards_r600? (
769 - video_cards_radeonsi? (
770 - ${LLVM_DEPSTR_AMDGPU}
771 - )
772 - )
773 - !video_cards_r600? (
774 - !video_cards_radeonsi? (
775 - video_cards_radeon? (
776 - ${LLVM_DEPSTR_AMDGPU}
777 - )
778 - )
779 - )
780 - !video_cards_r600? (
781 - !video_cards_radeon? (
782 - !video_cards_radeonsi? (
783 - ${LLVM_DEPSTR}
784 - )
785 - )
786 - )
787 - )
788 - )
789 -"
790 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
791 -
792 -DEPEND="${RDEPEND}
793 - ${PYTHON_DEPS}
794 - opencl? (
795 - >=sys-devel/gcc-4.6
796 - )
797 - sys-devel/gettext
798 - virtual/pkgconfig
799 - valgrind? ( dev-util/valgrind )
800 - x11-base/xorg-proto
801 - vulkan? (
802 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
803 - )
804 -"
805 -[[ ${PV} == 9999 ]] && DEPEND+="
806 - sys-devel/bison
807 - sys-devel/flex
808 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
809 -"
810 -
811 -S="${WORKDIR}/${MY_P}"
812 -EGIT_CHECKOUT_DIR=${S}
813 -
814 -QA_WX_LOAD="
815 -x86? (
816 - !pic? (
817 - usr/lib*/libglapi.so.0.0.0
818 - usr/lib*/libGLESv1_CM.so.1.1.0
819 - usr/lib*/libGLESv2.so.2.0.0
820 - usr/lib*/libGL.so.1.2.0
821 - usr/lib*/libOSMesa.so.8.0.0
822 - )
823 -)"
824 -
825 -llvm_check_deps() {
826 - local flags=${MULTILIB_USEDEP}
827 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
828 - then
829 - flags+=",llvm_targets_AMDGPU(-)"
830 - fi
831 -
832 - if use opencl; then
833 - has_version "sys-devel/clang[${flags}]" || return 1
834 - fi
835 - has_version "sys-devel/llvm[${flags}]"
836 -}
837 -
838 -pkg_setup() {
839 - # warning message for bug 459306
840 - if use llvm && has_version sys-devel/llvm[!debug=]; then
841 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
842 - ewarn "detected! This can cause problems. For details, see bug 459306."
843 - fi
844 -
845 - if use llvm; then
846 - llvm_pkg_setup
847 - fi
848 - python-any-r1_pkg_setup
849 -}
850 -
851 -src_prepare() {
852 - eapply "${FILESDIR}"/${PN}-17-execinfo.patch
853 - eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
854 - eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
855 - eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
856 - eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
857 - eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
858 - eapply_user
859 - eautoreconf
860 -}
861 -
862 -multilib_src_configure() {
863 - local myconf
864 -
865 - if use classic; then
866 - # Configurable DRI drivers
867 - driver_enable swrast
868 -
869 - # Intel code
870 - driver_enable video_cards_i915 i915
871 - driver_enable video_cards_i965 i965
872 - if ! use video_cards_i915 && \
873 - ! use video_cards_i965; then
874 - driver_enable video_cards_intel i915 i965
875 - fi
876 -
877 - # Nouveau code
878 - driver_enable video_cards_nouveau nouveau
879 -
880 - # ATI code
881 - driver_enable video_cards_r100 radeon
882 - driver_enable video_cards_r200 r200
883 - if ! use video_cards_r100 && \
884 - ! use video_cards_r200; then
885 - driver_enable video_cards_radeon radeon r200
886 - fi
887 - fi
888 -
889 - if use egl; then
890 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
891 - fi
892 -
893 - if use gallium; then
894 - myconf+="
895 - $(use_enable d3d9 nine)
896 - $(use_enable llvm)
897 - $(use_enable vaapi va)
898 - $(use_enable vdpau)
899 - $(use_enable xa)
900 - $(use_enable xvmc)
901 - "
902 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
903 -
904 - gallium_enable swrast
905 - gallium_enable video_cards_vc4 vc4
906 - gallium_enable video_cards_vivante etnaviv
907 - gallium_enable video_cards_vmware svga
908 - gallium_enable video_cards_nouveau nouveau
909 - gallium_enable video_cards_i915 i915
910 - gallium_enable video_cards_imx imx
911 - if ! use video_cards_i915 && \
912 - ! use video_cards_i965; then
913 - gallium_enable video_cards_intel i915
914 - fi
915 -
916 - gallium_enable video_cards_r300 r300
917 - gallium_enable video_cards_r600 r600
918 - gallium_enable video_cards_radeonsi radeonsi
919 - if ! use video_cards_r300 && \
920 - ! use video_cards_r600; then
921 - gallium_enable video_cards_radeon r300 r600
922 - fi
923 -
924 - gallium_enable video_cards_freedreno freedreno
925 - # opencl stuff
926 - if use opencl; then
927 - myconf+="
928 - $(use_enable opencl)
929 - --with-clang-libdir="${EPREFIX}/usr/lib"
930 - "
931 - fi
932 -
933 - gallium_enable video_cards_virgl virgl
934 - fi
935 -
936 - if use vulkan; then
937 - vulkan_enable video_cards_i965 intel
938 - vulkan_enable video_cards_radeonsi radeon
939 - fi
940 -
941 - # x86 hardened pax_kernel needs glx-rts, bug 240956
942 - if [[ ${ABI} == x86 ]]; then
943 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
944 - fi
945 -
946 - # on abi_x86_32 hardened we need to have asm disable
947 - if [[ ${ABI} == x86* ]] && use pic; then
948 - myconf+=" --disable-asm"
949 - fi
950 -
951 - if use gallium; then
952 - myconf+=" $(use_enable osmesa gallium-osmesa)"
953 - else
954 - myconf+=" $(use_enable osmesa)"
955 - fi
956 -
957 - # build fails with BSD indent, bug #428112
958 - use userland_GNU || export INDENT=cat
959 -
960 - ECONF_SOURCE="${S}" \
961 - econf \
962 - --enable-dri \
963 - --enable-glx \
964 - --enable-shared-glapi \
965 - $(use_enable !bindist texture-float) \
966 - $(use_enable d3d9 nine) \
967 - $(use_enable debug) \
968 - $(use_enable dri3) \
969 - $(use_enable egl) \
970 - $(use_enable gbm) \
971 - $(use_enable gles1) \
972 - $(use_enable gles2) \
973 - $(use_enable nptl glx-tls) \
974 - $(use_enable unwind libunwind) \
975 - --enable-valgrind=$(usex valgrind auto no) \
976 - --enable-llvm-shared-libs \
977 - --disable-opencl-icd \
978 - --with-dri-drivers=${DRI_DRIVERS} \
979 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
980 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
981 - PYTHON2="${PYTHON}" \
982 - ${myconf}
983 -}
984 -
985 -multilib_src_install() {
986 - emake install DESTDIR="${D}"
987 -
988 - if use wayland; then
989 - # These files are now provided by >=dev-libs/wayland-1.15.0
990 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
991 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
992 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
993 - rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
994 - fi
995 -
996 - if use opencl; then
997 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
998 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
999 - dodir ${cl_dir}/{lib,include}
1000 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1001 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1002 - "${ED}"${cl_dir}
1003 - fi
1004 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1005 - mv -f "${ED}"/usr/include/CL \
1006 - "${ED}"${cl_dir}/include
1007 - fi
1008 - eend $?
1009 - fi
1010 -}
1011 -
1012 -multilib_src_install_all() {
1013 - find "${ED}" -name '*.la' -delete
1014 - einstalldocs
1015 -
1016 - if use !bindist; then
1017 - dodoc docs/patents.txt
1018 - fi
1019 -}
1020 -
1021 -multilib_src_test() {
1022 - if use llvm; then
1023 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
1024 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1025 - emake ${llvm_tests}
1026 - pax-mark m ${llvm_tests}
1027 - popd >/dev/null || die
1028 - fi
1029 - emake check
1030 -}
1031 -
1032 -pkg_postinst() {
1033 - # Switch to the xorg implementation.
1034 - echo
1035 - eselect opengl set --use-old ${OPENGL_DIR}
1036 -
1037 - # Switch to mesa opencl
1038 - if use opencl; then
1039 - eselect opencl set --use-old ${PN}
1040 - fi
1041 -
1042 - # warn about patent encumbered texture-float
1043 - if use !bindist; then
1044 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1045 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1046 - elog "explanation."
1047 - fi
1048 -}
1049 -
1050 -# $1 - VIDEO_CARDS flag
1051 -# other args - names of DRI drivers to enable
1052 -# TODO: avoid code duplication for a more elegant implementation
1053 -driver_enable() {
1054 - case $# in
1055 - # for enabling unconditionally
1056 - 1)
1057 - DRI_DRIVERS+=",$1"
1058 - ;;
1059 - *)
1060 - if use $1; then
1061 - shift
1062 - for i in $@; do
1063 - DRI_DRIVERS+=",${i}"
1064 - done
1065 - fi
1066 - ;;
1067 - esac
1068 -}
1069 -
1070 -gallium_enable() {
1071 - case $# in
1072 - # for enabling unconditionally
1073 - 1)
1074 - GALLIUM_DRIVERS+=",$1"
1075 - ;;
1076 - *)
1077 - if use $1; then
1078 - shift
1079 - for i in $@; do
1080 - GALLIUM_DRIVERS+=",${i}"
1081 - done
1082 - fi
1083 - ;;
1084 - esac
1085 -}
1086 -
1087 -vulkan_enable() {
1088 - case $# in
1089 - # for enabling unconditionally
1090 - 1)
1091 - VULKAN_DRIVERS+=",$1"
1092 - ;;
1093 - *)
1094 - if use $1; then
1095 - shift
1096 - for i in $@; do
1097 - VULKAN_DRIVERS+=",${i}"
1098 - done
1099 - fi
1100 - ;;
1101 - esac
1102 -}
1103
1104 diff --git a/media-libs/mesa/mesa-18.2.8.ebuild b/media-libs/mesa/mesa-18.2.8.ebuild
1105 deleted file mode 100644
1106 index 68f8024..0000000
1107 --- a/media-libs/mesa/mesa-18.2.8.ebuild
1108 +++ /dev/null
1109 @@ -1,528 +0,0 @@
1110 -# Copyright 1999-2019 Gentoo Authors
1111 -# Distributed under the terms of the GNU General Public License v2
1112 -
1113 -EAPI=6
1114 -
1115 -PYTHON_COMPAT=( python2_7 )
1116 -
1117 -inherit llvm meson multilib-minimal pax-utils python-any-r1
1118 -
1119 -OPENGL_DIR="xorg-x11"
1120 -
1121 -MY_P="${P/_/-}"
1122 -
1123 -DESCRIPTION="OpenGL-like graphic library for Linux"
1124 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1125 -
1126 -if [[ ${PV} == 9999 ]]; then
1127 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1128 - EXPERIMENTAL="true"
1129 - inherit git-r3
1130 -else
1131 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1132 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
1133 -fi
1134 -
1135 -LICENSE="MIT"
1136 -SLOT="0"
1137 -RESTRICT="
1138 - !test? ( test )
1139 -"
1140 -
1141 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1142 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1143 -for card in ${VIDEO_CARDS}; do
1144 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1145 -done
1146 -
1147 -IUSE="${IUSE_VIDEO_CARDS}
1148 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
1149 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
1150 - vulkan wayland xa xvmc"
1151 -
1152 -REQUIRED_USE="
1153 - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1154 - gles1? ( egl )
1155 - gles2? ( egl )
1156 - vulkan? ( dri3
1157 - || ( video_cards_i965 video_cards_radeonsi )
1158 - video_cards_radeonsi? ( llvm ) )
1159 - wayland? ( egl gbm )
1160 - video_cards_freedreno? ( gallium )
1161 - video_cards_intel? ( classic )
1162 - video_cards_i915? ( || ( classic gallium ) )
1163 - video_cards_i965? ( classic )
1164 - video_cards_imx? ( gallium video_cards_vivante )
1165 - video_cards_nouveau? ( || ( classic gallium ) )
1166 - video_cards_radeon? ( || ( classic gallium )
1167 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1168 - video_cards_r100? ( classic )
1169 - video_cards_r200? ( classic )
1170 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1171 - video_cards_r600? ( gallium )
1172 - video_cards_radeonsi? ( gallium llvm )
1173 - video_cards_vc4? ( gallium )
1174 - video_cards_virgl? ( gallium )
1175 - video_cards_vivante? ( gallium gbm )
1176 - video_cards_vmware? ( gallium )
1177 -"
1178 -
1179 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
1180 -RDEPEND="
1181 - !app-eselect/eselect-mesa
1182 - >=app-eselect/eselect-opengl-1.3.0
1183 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1184 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1185 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1186 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1187 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1188 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1189 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1190 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1191 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1192 - gallium? (
1193 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1194 - llvm? (
1195 - video_cards_radeonsi? (
1196 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1197 - )
1198 - video_cards_r600? (
1199 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1200 - )
1201 - video_cards_radeon? (
1202 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1203 - )
1204 - )
1205 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
1206 - opencl? (
1207 - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
1208 - dev-libs/libclc
1209 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1210 - )
1211 - vaapi? (
1212 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1213 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1214 - )
1215 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1216 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1217 - )
1218 - wayland? (
1219 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1220 - >=dev-libs/wayland-protocols-1.8
1221 - )
1222 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1223 -
1224 - video_cards_intel? (
1225 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1226 - )
1227 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1228 -"
1229 -for card in ${RADEON_CARDS}; do
1230 - RDEPEND="${RDEPEND}
1231 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1232 - "
1233 -done
1234 -RDEPEND="${RDEPEND}
1235 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1236 -"
1237 -
1238 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1239 -# we need to *really* make sure we're not pulling one than more slot
1240 -# simultaneously.
1241 -#
1242 -# How to use it:
1243 -# 1. List all the working slots (with min versions) in ||, newest first.
1244 -# 2. Update the := to specify *max* version, e.g. < 8.
1245 -# 3. Specify LLVM_MAX_SLOT, e.g. 7.
1246 -LLVM_MAX_SLOT="7"
1247 -LLVM_DEPSTR="
1248 - || (
1249 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1250 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1251 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1252 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1253 - )
1254 - <sys-devel/llvm-8:=[${MULTILIB_USEDEP}]
1255 -"
1256 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1257 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1258 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1259 -RDEPEND="${RDEPEND}
1260 - llvm? (
1261 - opencl? (
1262 - video_cards_r600? (
1263 - ${CLANG_DEPSTR_AMDGPU}
1264 - )
1265 - !video_cards_r600? (
1266 - video_cards_radeonsi? (
1267 - ${CLANG_DEPSTR_AMDGPU}
1268 - )
1269 - )
1270 - !video_cards_r600? (
1271 - !video_cards_radeonsi? (
1272 - video_cards_radeon? (
1273 - ${CLANG_DEPSTR_AMDGPU}
1274 - )
1275 - )
1276 - )
1277 - !video_cards_r600? (
1278 - !video_cards_radeon? (
1279 - !video_cards_radeonsi? (
1280 - ${CLANG_DEPSTR}
1281 - )
1282 - )
1283 - )
1284 - )
1285 - !opencl? (
1286 - video_cards_r600? (
1287 - ${LLVM_DEPSTR_AMDGPU}
1288 - )
1289 - !video_cards_r600? (
1290 - video_cards_radeonsi? (
1291 - ${LLVM_DEPSTR_AMDGPU}
1292 - )
1293 - )
1294 - !video_cards_r600? (
1295 - !video_cards_radeonsi? (
1296 - video_cards_radeon? (
1297 - ${LLVM_DEPSTR_AMDGPU}
1298 - )
1299 - )
1300 - )
1301 - !video_cards_r600? (
1302 - !video_cards_radeon? (
1303 - !video_cards_radeonsi? (
1304 - ${LLVM_DEPSTR}
1305 - )
1306 - )
1307 - )
1308 - )
1309 - )
1310 -"
1311 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1312 -
1313 -DEPEND="${RDEPEND}
1314 - ${PYTHON_DEPS}
1315 - opencl? (
1316 - >=sys-devel/gcc-4.6
1317 - )
1318 - sys-devel/bison
1319 - sys-devel/flex
1320 - sys-devel/gettext
1321 - virtual/pkgconfig
1322 - valgrind? ( dev-util/valgrind )
1323 - x11-base/xorg-proto
1324 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1325 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1326 -"
1327 -
1328 -S="${WORKDIR}/${MY_P}"
1329 -EGIT_CHECKOUT_DIR=${S}
1330 -
1331 -QA_WX_LOAD="
1332 -x86? (
1333 - !pic? (
1334 - usr/lib*/libglapi.so.0.0.0
1335 - usr/lib*/libGLESv1_CM.so.1.0.0
1336 - usr/lib*/libGLESv2.so.2.0.0
1337 - usr/lib*/libGL.so.1.2.0
1338 - usr/lib*/libOSMesa.so.8.0.0
1339 - )
1340 -)"
1341 -
1342 -PATCHES=(
1343 - "${FILESDIR}"/${PN}-17-execinfo.patch
1344 - "${FILESDIR}"/${PN}-17-musl-string_h.patch
1345 - "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
1346 - "${FILESDIR}"/${PN}-18-musl-pthread.patch
1347 - "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
1348 - "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
1349 -)
1350 -
1351 -llvm_check_deps() {
1352 - local flags=${MULTILIB_USEDEP}
1353 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1354 - then
1355 - flags+=",llvm_targets_AMDGPU(-)"
1356 - fi
1357 -
1358 - if use opencl; then
1359 - has_version "sys-devel/clang[${flags}]" || return 1
1360 - fi
1361 - has_version "sys-devel/llvm[${flags}]"
1362 -}
1363 -
1364 -pkg_pretend() {
1365 - if use opencl; then
1366 - if ! use video_cards_r600 &&
1367 - ! use video_cards_radeonsi; then
1368 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1369 - fi
1370 - fi
1371 -
1372 - if use vaapi; then
1373 - if ! use video_cards_r600 &&
1374 - ! use video_cards_radeonsi &&
1375 - ! use video_cards_nouveau; then
1376 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1377 - fi
1378 - fi
1379 -
1380 - if use vdpau; then
1381 - if ! use video_cards_r300 &&
1382 - ! use video_cards_r600 &&
1383 - ! use video_cards_radeonsi &&
1384 - ! use video_cards_nouveau; then
1385 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1386 - fi
1387 - fi
1388 -
1389 - if use xa; then
1390 - if ! use video_cards_freedreno &&
1391 - ! use video_cards_nouveau &&
1392 - ! use video_cards_vmware; then
1393 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1394 - fi
1395 - fi
1396 -
1397 - if use xvmc; then
1398 - if ! use video_cards_r600 &&
1399 - ! use video_cards_nouveau; then
1400 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1401 - fi
1402 - fi
1403 -
1404 - if ! use gallium; then
1405 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
1406 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1407 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1408 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1409 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1410 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1411 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1412 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1413 - fi
1414 -
1415 - if ! use llvm; then
1416 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1417 - fi
1418 -}
1419 -
1420 -pkg_setup() {
1421 - # warning message for bug 459306
1422 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1423 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1424 - ewarn "detected! This can cause problems. For details, see bug 459306."
1425 - fi
1426 -
1427 - if use llvm; then
1428 - llvm_pkg_setup
1429 - fi
1430 - python-any-r1_pkg_setup
1431 -}
1432 -
1433 -multilib_src_configure() {
1434 - local emesonargs=()
1435 -
1436 - if use classic; then
1437 - # Intel code
1438 - dri_driver_enable video_cards_i915 i915
1439 - dri_driver_enable video_cards_i965 i965
1440 - if ! use video_cards_i915 && \
1441 - ! use video_cards_i965; then
1442 - dri_driver_enable video_cards_intel i915 i965
1443 - fi
1444 -
1445 - # Nouveau code
1446 - dri_driver_enable video_cards_nouveau nouveau
1447 -
1448 - # ATI code
1449 - dri_driver_enable video_cards_r100 r100
1450 - dri_driver_enable video_cards_r200 r200
1451 - if ! use video_cards_r100 && \
1452 - ! use video_cards_r200; then
1453 - dri_driver_enable video_cards_radeon r100 r200
1454 - fi
1455 - fi
1456 -
1457 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
1458 -
1459 - if use gallium; then
1460 - emesonargs+=(
1461 - $(meson_use llvm)
1462 - $(meson_use lm_sensors lmsensors)
1463 - $(meson_use unwind libunwind)
1464 - )
1465 -
1466 - if use video_cards_r300 ||
1467 - use video_cards_r600 ||
1468 - use video_cards_radeonsi ||
1469 - use video_cards_nouveau ||
1470 - use video_cards_vmware; then
1471 - emesonargs+=($(meson_use d3d9 gallium-nine))
1472 - else
1473 - emesonargs+=(-Dgallium-nine=false)
1474 - fi
1475 -
1476 - if use video_cards_r600 ||
1477 - use video_cards_radeonsi ||
1478 - use video_cards_nouveau; then
1479 - emesonargs+=($(meson_use vaapi gallium-va))
1480 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1481 - else
1482 - emesonargs+=(-Dgallium-va=false)
1483 - fi
1484 -
1485 - if use video_cards_r300 ||
1486 - use video_cards_r600 ||
1487 - use video_cards_radeonsi ||
1488 - use video_cards_nouveau; then
1489 - emesonargs+=($(meson_use vdpau gallium-vdpau))
1490 - else
1491 - emesonargs+=(-Dgallium-vdpau=false)
1492 - fi
1493 -
1494 - if use video_cards_freedreno ||
1495 - use video_cards_nouveau ||
1496 - use video_cards_vmware; then
1497 - emesonargs+=($(meson_use xa gallium-xa))
1498 - else
1499 - emesonargs+=(-Dgallium-xa=false)
1500 - fi
1501 -
1502 - if use video_cards_r600 ||
1503 - use video_cards_nouveau; then
1504 - emesonargs+=($(meson_use xvmc gallium-xvmc))
1505 - else
1506 - emesonargs+=(-Dgallium-xvmc=false)
1507 - fi
1508 -
1509 - gallium_enable video_cards_vc4 vc4
1510 - gallium_enable video_cards_vivante etnaviv
1511 - gallium_enable video_cards_vmware svga
1512 - gallium_enable video_cards_nouveau nouveau
1513 - gallium_enable video_cards_imx imx
1514 -
1515 - # Only one i915 driver (classic vs gallium). Default to classic.
1516 - if ! use classic; then
1517 - gallium_enable video_cards_i915 i915
1518 - if ! use video_cards_i915 && \
1519 - ! use video_cards_i965; then
1520 - gallium_enable video_cards_intel i915
1521 - fi
1522 - fi
1523 -
1524 - gallium_enable video_cards_r300 r300
1525 - gallium_enable video_cards_r600 r600
1526 - gallium_enable video_cards_radeonsi radeonsi
1527 - if ! use video_cards_r300 && \
1528 - ! use video_cards_r600; then
1529 - gallium_enable video_cards_radeon r300 r600
1530 - fi
1531 -
1532 - gallium_enable video_cards_freedreno freedreno
1533 - gallium_enable video_cards_virgl virgl
1534 -
1535 - # opencl stuff
1536 - emesonargs+=(
1537 - -Dgallium-opencl="$(usex opencl icd disabled)"
1538 - )
1539 - fi
1540 -
1541 - if use vulkan; then
1542 - vulkan_enable video_cards_i965 intel
1543 - vulkan_enable video_cards_radeonsi amd
1544 - fi
1545 -
1546 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1547 - if [[ ${ABI} == x86 ]]; then
1548 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
1549 - fi
1550 -
1551 - # Disable glx tls support on musl
1552 - if use elibc_musl; then
1553 - emesonargs+=( -Dglx-tls=false )
1554 - fi
1555 -
1556 - # on abi_x86_32 hardened we need to have asm disable
1557 - if [[ ${ABI} == x86* ]] && use pic; then
1558 - emesonargs+=( -Dasm=false )
1559 - fi
1560 -
1561 - if use gallium; then
1562 - gallium_enable -- swrast
1563 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
1564 - else
1565 - dri_driver_enable -- swrast
1566 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
1567 - fi
1568 -
1569 - driver_list() {
1570 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1571 - echo "${drivers//$'\n'/,}"
1572 - }
1573 -
1574 - emesonargs+=(
1575 - $(meson_use test build-tests)
1576 - -Dglx=dri
1577 - -Dshared-glapi=true
1578 - $(meson_use dri3)
1579 - $(meson_use egl)
1580 - $(meson_use gbm)
1581 - $(meson_use gles1)
1582 - $(meson_use gles2)
1583 - $(meson_use selinux)
1584 - -Dvalgrind=$(usex valgrind auto false)
1585 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1586 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1587 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1588 - --buildtype $(usex debug debug plain)
1589 - -Db_ndebug=$(usex debug false true)
1590 - )
1591 - meson_src_configure
1592 -}
1593 -
1594 -multilib_src_compile() {
1595 - meson_src_compile
1596 -}
1597 -
1598 -multilib_src_install() {
1599 - meson_src_install
1600 -}
1601 -
1602 -multilib_src_install_all() {
1603 - einstalldocs
1604 -}
1605 -
1606 -multilib_src_test() {
1607 - meson_src_test
1608 -}
1609 -
1610 -pkg_postinst() {
1611 - # Switch to the xorg implementation.
1612 - echo
1613 - eselect opengl set --use-old ${OPENGL_DIR}
1614 -}
1615 -
1616 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1617 -# other args - names of DRI drivers to enable
1618 -dri_driver_enable() {
1619 - if [[ $1 == -- ]] || use $1; then
1620 - shift
1621 - DRI_DRIVERS+=("$@")
1622 - fi
1623 -}
1624 -
1625 -gallium_enable() {
1626 - if [[ $1 == -- ]] || use $1; then
1627 - shift
1628 - GALLIUM_DRIVERS+=("$@")
1629 - fi
1630 -}
1631 -
1632 -vulkan_enable() {
1633 - if [[ $1 == -- ]] || use $1; then
1634 - shift
1635 - VULKAN_DRIVERS+=("$@")
1636 - fi
1637 -}
1638
1639 diff --git a/media-libs/mesa/mesa-18.3.4.ebuild b/media-libs/mesa/mesa-18.3.4.ebuild
1640 deleted file mode 100644
1641 index 0b02534..0000000
1642 --- a/media-libs/mesa/mesa-18.3.4.ebuild
1643 +++ /dev/null
1644 @@ -1,532 +0,0 @@
1645 -# Copyright 1999-2019 Gentoo Authors
1646 -# Distributed under the terms of the GNU General Public License v2
1647 -
1648 -EAPI=6
1649 -
1650 -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
1651 -
1652 -inherit llvm meson multilib-minimal pax-utils python-any-r1
1653 -
1654 -OPENGL_DIR="xorg-x11"
1655 -
1656 -MY_P="${P/_/-}"
1657 -
1658 -DESCRIPTION="OpenGL-like graphic library for Linux"
1659 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1660 -
1661 -if [[ ${PV} == 9999 ]]; then
1662 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1663 - EXPERIMENTAL="true"
1664 - inherit git-r3
1665 -else
1666 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1667 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
1668 -fi
1669 -
1670 -LICENSE="MIT"
1671 -SLOT="0"
1672 -RESTRICT="
1673 - !test? ( test )
1674 -"
1675 -
1676 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1677 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1678 -for card in ${VIDEO_CARDS}; do
1679 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1680 -done
1681 -
1682 -IUSE="${IUSE_VIDEO_CARDS}
1683 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
1684 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
1685 - vulkan wayland xa xvmc"
1686 -
1687 -REQUIRED_USE="
1688 - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1689 - gles1? ( egl )
1690 - gles2? ( egl )
1691 - vulkan? ( dri3
1692 - || ( video_cards_i965 video_cards_radeonsi )
1693 - video_cards_radeonsi? ( llvm ) )
1694 - wayland? ( egl gbm )
1695 - video_cards_freedreno? ( gallium )
1696 - video_cards_intel? ( classic )
1697 - video_cards_i915? ( || ( classic gallium ) )
1698 - video_cards_i965? ( classic )
1699 - video_cards_imx? ( gallium video_cards_vivante )
1700 - video_cards_nouveau? ( || ( classic gallium ) )
1701 - video_cards_radeon? ( || ( classic gallium )
1702 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1703 - video_cards_r100? ( classic )
1704 - video_cards_r200? ( classic )
1705 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1706 - video_cards_r600? ( gallium )
1707 - video_cards_radeonsi? ( gallium llvm )
1708 - video_cards_vc4? ( gallium )
1709 - video_cards_virgl? ( gallium )
1710 - video_cards_vivante? ( gallium gbm )
1711 - video_cards_vmware? ( gallium )
1712 -"
1713 -
1714 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.96"
1715 -RDEPEND="
1716 - !app-eselect/eselect-mesa
1717 - >=app-eselect/eselect-opengl-1.3.0
1718 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1719 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1720 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1721 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1722 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1723 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1724 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1725 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1726 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1727 - gallium? (
1728 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1729 - llvm? (
1730 - video_cards_radeonsi? (
1731 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1732 - )
1733 - video_cards_r600? (
1734 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1735 - )
1736 - video_cards_radeon? (
1737 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1738 - )
1739 - )
1740 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
1741 - opencl? (
1742 - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
1743 - dev-libs/libclc
1744 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1745 - )
1746 - vaapi? (
1747 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1748 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1749 - )
1750 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1751 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1752 - )
1753 - wayland? (
1754 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1755 - >=dev-libs/wayland-protocols-1.8
1756 - )
1757 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1758 -
1759 - video_cards_intel? (
1760 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1761 - )
1762 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1763 -"
1764 -for card in ${RADEON_CARDS}; do
1765 - RDEPEND="${RDEPEND}
1766 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1767 - "
1768 -done
1769 -RDEPEND="${RDEPEND}
1770 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1771 -"
1772 -
1773 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1774 -# we need to *really* make sure we're not pulling one than more slot
1775 -# simultaneously.
1776 -#
1777 -# How to use it:
1778 -# 1. List all the working slots (with min versions) in ||, newest first.
1779 -# 2. Update the := to specify *max* version, e.g. < 8.
1780 -# 3. Specify LLVM_MAX_SLOT, e.g. 7.
1781 -LLVM_MAX_SLOT="7"
1782 -LLVM_DEPSTR="
1783 - || (
1784 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1785 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1786 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1787 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1788 - )
1789 - <sys-devel/llvm-8:=[${MULTILIB_USEDEP}]
1790 -"
1791 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1792 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1793 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1794 -RDEPEND="${RDEPEND}
1795 - llvm? (
1796 - opencl? (
1797 - video_cards_r600? (
1798 - ${CLANG_DEPSTR_AMDGPU}
1799 - )
1800 - !video_cards_r600? (
1801 - video_cards_radeonsi? (
1802 - ${CLANG_DEPSTR_AMDGPU}
1803 - )
1804 - )
1805 - !video_cards_r600? (
1806 - !video_cards_radeonsi? (
1807 - video_cards_radeon? (
1808 - ${CLANG_DEPSTR_AMDGPU}
1809 - )
1810 - )
1811 - )
1812 - !video_cards_r600? (
1813 - !video_cards_radeon? (
1814 - !video_cards_radeonsi? (
1815 - ${CLANG_DEPSTR}
1816 - )
1817 - )
1818 - )
1819 - )
1820 - !opencl? (
1821 - video_cards_r600? (
1822 - ${LLVM_DEPSTR_AMDGPU}
1823 - )
1824 - !video_cards_r600? (
1825 - video_cards_radeonsi? (
1826 - ${LLVM_DEPSTR_AMDGPU}
1827 - )
1828 - )
1829 - !video_cards_r600? (
1830 - !video_cards_radeonsi? (
1831 - video_cards_radeon? (
1832 - ${LLVM_DEPSTR_AMDGPU}
1833 - )
1834 - )
1835 - )
1836 - !video_cards_r600? (
1837 - !video_cards_radeon? (
1838 - !video_cards_radeonsi? (
1839 - ${LLVM_DEPSTR}
1840 - )
1841 - )
1842 - )
1843 - )
1844 - )
1845 -"
1846 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1847 -
1848 -DEPEND="${RDEPEND}
1849 - ${PYTHON_DEPS}
1850 - opencl? (
1851 - >=sys-devel/gcc-4.6
1852 - )
1853 - sys-devel/bison
1854 - sys-devel/flex
1855 - sys-devel/gettext
1856 - virtual/pkgconfig
1857 - valgrind? ( dev-util/valgrind )
1858 - x11-base/xorg-proto
1859 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1860 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1861 -"
1862 -
1863 -S="${WORKDIR}/${MY_P}"
1864 -EGIT_CHECKOUT_DIR=${S}
1865 -
1866 -QA_WX_LOAD="
1867 -x86? (
1868 - !pic? (
1869 - usr/lib*/libglapi.so.0.0.0
1870 - usr/lib*/libGLESv1_CM.so.1.0.0
1871 - usr/lib*/libGLESv2.so.2.0.0
1872 - usr/lib*/libGL.so.1.2.0
1873 - usr/lib*/libOSMesa.so.8.0.0
1874 - )
1875 -)"
1876 -
1877 -PATCHES=(
1878 - "${FILESDIR}"/${PN}-17-execinfo.patch
1879 - "${FILESDIR}"/${PN}-17-musl-string_h.patch
1880 - "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
1881 - "${FILESDIR}"/${PN}-18-musl-pthread.patch
1882 - "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
1883 - "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
1884 -)
1885 -
1886 -llvm_check_deps() {
1887 - local flags=${MULTILIB_USEDEP}
1888 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1889 - then
1890 - flags+=",llvm_targets_AMDGPU(-)"
1891 - fi
1892 -
1893 - if use opencl; then
1894 - has_version "sys-devel/clang[${flags}]" || return 1
1895 - fi
1896 - has_version "sys-devel/llvm[${flags}]"
1897 -}
1898 -
1899 -pkg_pretend() {
1900 - if use opencl; then
1901 - if ! use video_cards_r600 &&
1902 - ! use video_cards_radeonsi; then
1903 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1904 - fi
1905 - fi
1906 -
1907 - if use vaapi; then
1908 - if ! use video_cards_r600 &&
1909 - ! use video_cards_radeonsi &&
1910 - ! use video_cards_nouveau; then
1911 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1912 - fi
1913 - fi
1914 -
1915 - if use vdpau; then
1916 - if ! use video_cards_r300 &&
1917 - ! use video_cards_r600 &&
1918 - ! use video_cards_radeonsi &&
1919 - ! use video_cards_nouveau; then
1920 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1921 - fi
1922 - fi
1923 -
1924 - if use xa; then
1925 - if ! use video_cards_freedreno &&
1926 - ! use video_cards_nouveau &&
1927 - ! use video_cards_vmware; then
1928 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1929 - fi
1930 - fi
1931 -
1932 - if use xvmc; then
1933 - if ! use video_cards_r600 &&
1934 - ! use video_cards_nouveau; then
1935 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1936 - fi
1937 - fi
1938 -
1939 - if ! use gallium; then
1940 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
1941 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1942 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1943 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1944 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1945 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1946 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1947 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1948 - fi
1949 -
1950 - if ! use llvm; then
1951 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1952 - fi
1953 -}
1954 -
1955 -python_check_deps() {
1956 - has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
1957 -}
1958 -
1959 -pkg_setup() {
1960 - # warning message for bug 459306
1961 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1962 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1963 - ewarn "detected! This can cause problems. For details, see bug 459306."
1964 - fi
1965 -
1966 - if use llvm; then
1967 - llvm_pkg_setup
1968 - fi
1969 - python-any-r1_pkg_setup
1970 -}
1971 -
1972 -multilib_src_configure() {
1973 - local emesonargs=()
1974 -
1975 - if use classic; then
1976 - # Intel code
1977 - dri_driver_enable video_cards_i915 i915
1978 - dri_driver_enable video_cards_i965 i965
1979 - if ! use video_cards_i915 && \
1980 - ! use video_cards_i965; then
1981 - dri_driver_enable video_cards_intel i915 i965
1982 - fi
1983 -
1984 - # Nouveau code
1985 - dri_driver_enable video_cards_nouveau nouveau
1986 -
1987 - # ATI code
1988 - dri_driver_enable video_cards_r100 r100
1989 - dri_driver_enable video_cards_r200 r200
1990 - if ! use video_cards_r100 && \
1991 - ! use video_cards_r200; then
1992 - dri_driver_enable video_cards_radeon r100 r200
1993 - fi
1994 - fi
1995 -
1996 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
1997 -
1998 - if use gallium; then
1999 - emesonargs+=(
2000 - $(meson_use llvm)
2001 - $(meson_use lm_sensors lmsensors)
2002 - $(meson_use unwind libunwind)
2003 - )
2004 -
2005 - if use video_cards_r300 ||
2006 - use video_cards_r600 ||
2007 - use video_cards_radeonsi ||
2008 - use video_cards_nouveau ||
2009 - use video_cards_vmware; then
2010 - emesonargs+=($(meson_use d3d9 gallium-nine))
2011 - else
2012 - emesonargs+=(-Dgallium-nine=false)
2013 - fi
2014 -
2015 - if use video_cards_r600 ||
2016 - use video_cards_radeonsi ||
2017 - use video_cards_nouveau; then
2018 - emesonargs+=($(meson_use vaapi gallium-va))
2019 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
2020 - else
2021 - emesonargs+=(-Dgallium-va=false)
2022 - fi
2023 -
2024 - if use video_cards_r300 ||
2025 - use video_cards_r600 ||
2026 - use video_cards_radeonsi ||
2027 - use video_cards_nouveau; then
2028 - emesonargs+=($(meson_use vdpau gallium-vdpau))
2029 - else
2030 - emesonargs+=(-Dgallium-vdpau=false)
2031 - fi
2032 -
2033 - if use video_cards_freedreno ||
2034 - use video_cards_nouveau ||
2035 - use video_cards_vmware; then
2036 - emesonargs+=($(meson_use xa gallium-xa))
2037 - else
2038 - emesonargs+=(-Dgallium-xa=false)
2039 - fi
2040 -
2041 - if use video_cards_r600 ||
2042 - use video_cards_nouveau; then
2043 - emesonargs+=($(meson_use xvmc gallium-xvmc))
2044 - else
2045 - emesonargs+=(-Dgallium-xvmc=false)
2046 - fi
2047 -
2048 - gallium_enable video_cards_vc4 vc4
2049 - gallium_enable video_cards_vivante etnaviv
2050 - gallium_enable video_cards_vmware svga
2051 - gallium_enable video_cards_nouveau nouveau
2052 - gallium_enable video_cards_imx imx
2053 -
2054 - # Only one i915 driver (classic vs gallium). Default to classic.
2055 - if ! use classic; then
2056 - gallium_enable video_cards_i915 i915
2057 - if ! use video_cards_i915 && \
2058 - ! use video_cards_i965; then
2059 - gallium_enable video_cards_intel i915
2060 - fi
2061 - fi
2062 -
2063 - gallium_enable video_cards_r300 r300
2064 - gallium_enable video_cards_r600 r600
2065 - gallium_enable video_cards_radeonsi radeonsi
2066 - if ! use video_cards_r300 && \
2067 - ! use video_cards_r600; then
2068 - gallium_enable video_cards_radeon r300 r600
2069 - fi
2070 -
2071 - gallium_enable video_cards_freedreno freedreno
2072 - gallium_enable video_cards_virgl virgl
2073 -
2074 - # opencl stuff
2075 - emesonargs+=(
2076 - -Dgallium-opencl="$(usex opencl icd disabled)"
2077 - )
2078 - fi
2079 -
2080 - if use vulkan; then
2081 - vulkan_enable video_cards_i965 intel
2082 - vulkan_enable video_cards_radeonsi amd
2083 - fi
2084 -
2085 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2086 - if [[ ${ABI} == x86 ]]; then
2087 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
2088 - fi
2089 -
2090 - # Disable glx tls support on musl
2091 - if use elibc_musl; then
2092 - emesonargs+=( -Dglx-tls=false )
2093 - fi
2094 -
2095 - # on abi_x86_32 hardened we need to have asm disable
2096 - if [[ ${ABI} == x86* ]] && use pic; then
2097 - emesonargs+=( -Dasm=false )
2098 - fi
2099 -
2100 - if use gallium; then
2101 - gallium_enable -- swrast
2102 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2103 - else
2104 - dri_driver_enable -- swrast
2105 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2106 - fi
2107 -
2108 - driver_list() {
2109 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2110 - echo "${drivers//$'\n'/,}"
2111 - }
2112 -
2113 - emesonargs+=(
2114 - $(meson_use test build-tests)
2115 - -Dglx=dri
2116 - -Dshared-glapi=true
2117 - $(meson_use dri3)
2118 - $(meson_use egl)
2119 - $(meson_use gbm)
2120 - $(meson_use gles1)
2121 - $(meson_use gles2)
2122 - $(meson_use selinux)
2123 - -Dvalgrind=$(usex valgrind auto false)
2124 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2125 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2126 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2127 - --buildtype $(usex debug debug plain)
2128 - -Db_ndebug=$(usex debug false true)
2129 - )
2130 - meson_src_configure
2131 -}
2132 -
2133 -multilib_src_compile() {
2134 - meson_src_compile
2135 -}
2136 -
2137 -multilib_src_install() {
2138 - meson_src_install
2139 -}
2140 -
2141 -multilib_src_install_all() {
2142 - einstalldocs
2143 -}
2144 -
2145 -multilib_src_test() {
2146 - meson_src_test
2147 -}
2148 -
2149 -pkg_postinst() {
2150 - # Switch to the xorg implementation.
2151 - echo
2152 - eselect opengl set --use-old ${OPENGL_DIR}
2153 -}
2154 -
2155 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2156 -# other args - names of DRI drivers to enable
2157 -dri_driver_enable() {
2158 - if [[ $1 == -- ]] || use $1; then
2159 - shift
2160 - DRI_DRIVERS+=("$@")
2161 - fi
2162 -}
2163 -
2164 -gallium_enable() {
2165 - if [[ $1 == -- ]] || use $1; then
2166 - shift
2167 - GALLIUM_DRIVERS+=("$@")
2168 - fi
2169 -}
2170 -
2171 -vulkan_enable() {
2172 - if [[ $1 == -- ]] || use $1; then
2173 - shift
2174 - VULKAN_DRIVERS+=("$@")
2175 - fi
2176 -}
2177
2178 diff --git a/media-libs/mesa/mesa-18.3.5.ebuild b/media-libs/mesa/mesa-18.3.5.ebuild
2179 deleted file mode 100644
2180 index f49d518..0000000
2181 --- a/media-libs/mesa/mesa-18.3.5.ebuild
2182 +++ /dev/null
2183 @@ -1,532 +0,0 @@
2184 -# Copyright 1999-2019 Gentoo Authors
2185 -# Distributed under the terms of the GNU General Public License v2
2186 -
2187 -EAPI=6
2188 -
2189 -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
2190 -
2191 -inherit llvm meson multilib-minimal pax-utils python-any-r1
2192 -
2193 -OPENGL_DIR="xorg-x11"
2194 -
2195 -MY_P="${P/_/-}"
2196 -
2197 -DESCRIPTION="OpenGL-like graphic library for Linux"
2198 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2199 -
2200 -if [[ ${PV} == 9999 ]]; then
2201 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
2202 - EXPERIMENTAL="true"
2203 - inherit git-r3
2204 -else
2205 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2206 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
2207 -fi
2208 -
2209 -LICENSE="MIT"
2210 -SLOT="0"
2211 -RESTRICT="
2212 - !test? ( test )
2213 -"
2214 -
2215 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2216 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2217 -for card in ${VIDEO_CARDS}; do
2218 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2219 -done
2220 -
2221 -IUSE="${IUSE_VIDEO_CARDS}
2222 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm lm_sensors
2223 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
2224 - vulkan wayland xa xvmc"
2225 -
2226 -REQUIRED_USE="
2227 - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
2228 - gles1? ( egl )
2229 - gles2? ( egl )
2230 - vulkan? ( dri3
2231 - || ( video_cards_i965 video_cards_radeonsi )
2232 - video_cards_radeonsi? ( llvm ) )
2233 - wayland? ( egl gbm )
2234 - video_cards_freedreno? ( gallium )
2235 - video_cards_intel? ( classic )
2236 - video_cards_i915? ( || ( classic gallium ) )
2237 - video_cards_i965? ( classic )
2238 - video_cards_imx? ( gallium video_cards_vivante )
2239 - video_cards_nouveau? ( || ( classic gallium ) )
2240 - video_cards_radeon? ( || ( classic gallium )
2241 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2242 - video_cards_r100? ( classic )
2243 - video_cards_r200? ( classic )
2244 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2245 - video_cards_r600? ( gallium )
2246 - video_cards_radeonsi? ( gallium llvm )
2247 - video_cards_vc4? ( gallium )
2248 - video_cards_virgl? ( gallium )
2249 - video_cards_vivante? ( gallium gbm )
2250 - video_cards_vmware? ( gallium )
2251 -"
2252 -
2253 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.96"
2254 -RDEPEND="
2255 - !app-eselect/eselect-mesa
2256 - >=app-eselect/eselect-opengl-1.3.0
2257 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2258 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2259 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2260 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2261 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2262 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2263 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2264 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
2265 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2266 - gallium? (
2267 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2268 - llvm? (
2269 - video_cards_radeonsi? (
2270 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2271 - )
2272 - video_cards_r600? (
2273 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2274 - )
2275 - video_cards_radeon? (
2276 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2277 - )
2278 - )
2279 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
2280 - opencl? (
2281 - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
2282 - dev-libs/libclc
2283 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2284 - )
2285 - vaapi? (
2286 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2287 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2288 - )
2289 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2290 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2291 - )
2292 - wayland? (
2293 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
2294 - >=dev-libs/wayland-protocols-1.8
2295 - )
2296 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2297 -
2298 - video_cards_intel? (
2299 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2300 - )
2301 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2302 -"
2303 -for card in ${RADEON_CARDS}; do
2304 - RDEPEND="${RDEPEND}
2305 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2306 - "
2307 -done
2308 -RDEPEND="${RDEPEND}
2309 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2310 -"
2311 -
2312 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2313 -# we need to *really* make sure we're not pulling one than more slot
2314 -# simultaneously.
2315 -#
2316 -# How to use it:
2317 -# 1. List all the working slots (with min versions) in ||, newest first.
2318 -# 2. Update the := to specify *max* version, e.g. < 8.
2319 -# 3. Specify LLVM_MAX_SLOT, e.g. 7.
2320 -LLVM_MAX_SLOT="7"
2321 -LLVM_DEPSTR="
2322 - || (
2323 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
2324 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
2325 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2326 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2327 - )
2328 - <sys-devel/llvm-8:=[${MULTILIB_USEDEP}]
2329 -"
2330 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2331 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2332 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2333 -RDEPEND="${RDEPEND}
2334 - llvm? (
2335 - opencl? (
2336 - video_cards_r600? (
2337 - ${CLANG_DEPSTR_AMDGPU}
2338 - )
2339 - !video_cards_r600? (
2340 - video_cards_radeonsi? (
2341 - ${CLANG_DEPSTR_AMDGPU}
2342 - )
2343 - )
2344 - !video_cards_r600? (
2345 - !video_cards_radeonsi? (
2346 - video_cards_radeon? (
2347 - ${CLANG_DEPSTR_AMDGPU}
2348 - )
2349 - )
2350 - )
2351 - !video_cards_r600? (
2352 - !video_cards_radeon? (
2353 - !video_cards_radeonsi? (
2354 - ${CLANG_DEPSTR}
2355 - )
2356 - )
2357 - )
2358 - )
2359 - !opencl? (
2360 - video_cards_r600? (
2361 - ${LLVM_DEPSTR_AMDGPU}
2362 - )
2363 - !video_cards_r600? (
2364 - video_cards_radeonsi? (
2365 - ${LLVM_DEPSTR_AMDGPU}
2366 - )
2367 - )
2368 - !video_cards_r600? (
2369 - !video_cards_radeonsi? (
2370 - video_cards_radeon? (
2371 - ${LLVM_DEPSTR_AMDGPU}
2372 - )
2373 - )
2374 - )
2375 - !video_cards_r600? (
2376 - !video_cards_radeon? (
2377 - !video_cards_radeonsi? (
2378 - ${LLVM_DEPSTR}
2379 - )
2380 - )
2381 - )
2382 - )
2383 - )
2384 -"
2385 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
2386 -
2387 -DEPEND="${RDEPEND}
2388 - ${PYTHON_DEPS}
2389 - opencl? (
2390 - >=sys-devel/gcc-4.6
2391 - )
2392 - sys-devel/bison
2393 - sys-devel/flex
2394 - sys-devel/gettext
2395 - virtual/pkgconfig
2396 - valgrind? ( dev-util/valgrind )
2397 - x11-base/xorg-proto
2398 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2399 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
2400 -"
2401 -
2402 -S="${WORKDIR}/${MY_P}"
2403 -EGIT_CHECKOUT_DIR=${S}
2404 -
2405 -QA_WX_LOAD="
2406 -x86? (
2407 - !pic? (
2408 - usr/lib*/libglapi.so.0.0.0
2409 - usr/lib*/libGLESv1_CM.so.1.0.0
2410 - usr/lib*/libGLESv2.so.2.0.0
2411 - usr/lib*/libGL.so.1.2.0
2412 - usr/lib*/libOSMesa.so.8.0.0
2413 - )
2414 -)"
2415 -
2416 -PATCHES=(
2417 - "${FILESDIR}"/${PN}-17-execinfo.patch
2418 - "${FILESDIR}"/${PN}-17-musl-string_h.patch
2419 - "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
2420 - "${FILESDIR}"/${PN}-18-musl-pthread.patch
2421 - "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
2422 - "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
2423 -)
2424 -
2425 -llvm_check_deps() {
2426 - local flags=${MULTILIB_USEDEP}
2427 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
2428 - then
2429 - flags+=",llvm_targets_AMDGPU(-)"
2430 - fi
2431 -
2432 - if use opencl; then
2433 - has_version "sys-devel/clang[${flags}]" || return 1
2434 - fi
2435 - has_version "sys-devel/llvm[${flags}]"
2436 -}
2437 -
2438 -pkg_pretend() {
2439 - if use opencl; then
2440 - if ! use video_cards_r600 &&
2441 - ! use video_cards_radeonsi; then
2442 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
2443 - fi
2444 - fi
2445 -
2446 - if use vaapi; then
2447 - if ! use video_cards_r600 &&
2448 - ! use video_cards_radeonsi &&
2449 - ! use video_cards_nouveau; then
2450 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
2451 - fi
2452 - fi
2453 -
2454 - if use vdpau; then
2455 - if ! use video_cards_r300 &&
2456 - ! use video_cards_r600 &&
2457 - ! use video_cards_radeonsi &&
2458 - ! use video_cards_nouveau; then
2459 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
2460 - fi
2461 - fi
2462 -
2463 - if use xa; then
2464 - if ! use video_cards_freedreno &&
2465 - ! use video_cards_nouveau &&
2466 - ! use video_cards_vmware; then
2467 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
2468 - fi
2469 - fi
2470 -
2471 - if use xvmc; then
2472 - if ! use video_cards_r600 &&
2473 - ! use video_cards_nouveau; then
2474 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2475 - fi
2476 - fi
2477 -
2478 - if ! use gallium; then
2479 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
2480 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
2481 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
2482 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
2483 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
2484 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
2485 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
2486 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
2487 - fi
2488 -
2489 - if ! use llvm; then
2490 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2491 - fi
2492 -}
2493 -
2494 -python_check_deps() {
2495 - has_version --host-root ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
2496 -}
2497 -
2498 -pkg_setup() {
2499 - # warning message for bug 459306
2500 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2501 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2502 - ewarn "detected! This can cause problems. For details, see bug 459306."
2503 - fi
2504 -
2505 - if use llvm; then
2506 - llvm_pkg_setup
2507 - fi
2508 - python-any-r1_pkg_setup
2509 -}
2510 -
2511 -multilib_src_configure() {
2512 - local emesonargs=()
2513 -
2514 - if use classic; then
2515 - # Intel code
2516 - dri_driver_enable video_cards_i915 i915
2517 - dri_driver_enable video_cards_i965 i965
2518 - if ! use video_cards_i915 && \
2519 - ! use video_cards_i965; then
2520 - dri_driver_enable video_cards_intel i915 i965
2521 - fi
2522 -
2523 - # Nouveau code
2524 - dri_driver_enable video_cards_nouveau nouveau
2525 -
2526 - # ATI code
2527 - dri_driver_enable video_cards_r100 r100
2528 - dri_driver_enable video_cards_r200 r200
2529 - if ! use video_cards_r100 && \
2530 - ! use video_cards_r200; then
2531 - dri_driver_enable video_cards_radeon r100 r200
2532 - fi
2533 - fi
2534 -
2535 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
2536 -
2537 - if use gallium; then
2538 - emesonargs+=(
2539 - $(meson_use llvm)
2540 - $(meson_use lm_sensors lmsensors)
2541 - $(meson_use unwind libunwind)
2542 - )
2543 -
2544 - if use video_cards_r300 ||
2545 - use video_cards_r600 ||
2546 - use video_cards_radeonsi ||
2547 - use video_cards_nouveau ||
2548 - use video_cards_vmware; then
2549 - emesonargs+=($(meson_use d3d9 gallium-nine))
2550 - else
2551 - emesonargs+=(-Dgallium-nine=false)
2552 - fi
2553 -
2554 - if use video_cards_r600 ||
2555 - use video_cards_radeonsi ||
2556 - use video_cards_nouveau; then
2557 - emesonargs+=($(meson_use vaapi gallium-va))
2558 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
2559 - else
2560 - emesonargs+=(-Dgallium-va=false)
2561 - fi
2562 -
2563 - if use video_cards_r300 ||
2564 - use video_cards_r600 ||
2565 - use video_cards_radeonsi ||
2566 - use video_cards_nouveau; then
2567 - emesonargs+=($(meson_use vdpau gallium-vdpau))
2568 - else
2569 - emesonargs+=(-Dgallium-vdpau=false)
2570 - fi
2571 -
2572 - if use video_cards_freedreno ||
2573 - use video_cards_nouveau ||
2574 - use video_cards_vmware; then
2575 - emesonargs+=($(meson_use xa gallium-xa))
2576 - else
2577 - emesonargs+=(-Dgallium-xa=false)
2578 - fi
2579 -
2580 - if use video_cards_r600 ||
2581 - use video_cards_nouveau; then
2582 - emesonargs+=($(meson_use xvmc gallium-xvmc))
2583 - else
2584 - emesonargs+=(-Dgallium-xvmc=false)
2585 - fi
2586 -
2587 - gallium_enable video_cards_vc4 vc4
2588 - gallium_enable video_cards_vivante etnaviv
2589 - gallium_enable video_cards_vmware svga
2590 - gallium_enable video_cards_nouveau nouveau
2591 - gallium_enable video_cards_imx imx
2592 -
2593 - # Only one i915 driver (classic vs gallium). Default to classic.
2594 - if ! use classic; then
2595 - gallium_enable video_cards_i915 i915
2596 - if ! use video_cards_i915 && \
2597 - ! use video_cards_i965; then
2598 - gallium_enable video_cards_intel i915
2599 - fi
2600 - fi
2601 -
2602 - gallium_enable video_cards_r300 r300
2603 - gallium_enable video_cards_r600 r600
2604 - gallium_enable video_cards_radeonsi radeonsi
2605 - if ! use video_cards_r300 && \
2606 - ! use video_cards_r600; then
2607 - gallium_enable video_cards_radeon r300 r600
2608 - fi
2609 -
2610 - gallium_enable video_cards_freedreno freedreno
2611 - gallium_enable video_cards_virgl virgl
2612 -
2613 - # opencl stuff
2614 - emesonargs+=(
2615 - -Dgallium-opencl="$(usex opencl icd disabled)"
2616 - )
2617 - fi
2618 -
2619 - if use vulkan; then
2620 - vulkan_enable video_cards_i965 intel
2621 - vulkan_enable video_cards_radeonsi amd
2622 - fi
2623 -
2624 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2625 - if [[ ${ABI} == x86 ]]; then
2626 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
2627 - fi
2628 -
2629 - # Disable glx tls support on musl
2630 - if use elibc_musl; then
2631 - emesonargs+=( -Dglx-tls=false )
2632 - fi
2633 -
2634 - # on abi_x86_32 hardened we need to have asm disable
2635 - if [[ ${ABI} == x86* ]] && use pic; then
2636 - emesonargs+=( -Dasm=false )
2637 - fi
2638 -
2639 - if use gallium; then
2640 - gallium_enable -- swrast
2641 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2642 - else
2643 - dri_driver_enable -- swrast
2644 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2645 - fi
2646 -
2647 - driver_list() {
2648 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2649 - echo "${drivers//$'\n'/,}"
2650 - }
2651 -
2652 - emesonargs+=(
2653 - $(meson_use test build-tests)
2654 - -Dglx=dri
2655 - -Dshared-glapi=true
2656 - $(meson_use dri3)
2657 - $(meson_use egl)
2658 - $(meson_use gbm)
2659 - $(meson_use gles1)
2660 - $(meson_use gles2)
2661 - $(meson_use selinux)
2662 - -Dvalgrind=$(usex valgrind auto false)
2663 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2664 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2665 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2666 - --buildtype $(usex debug debug plain)
2667 - -Db_ndebug=$(usex debug false true)
2668 - )
2669 - meson_src_configure
2670 -}
2671 -
2672 -multilib_src_compile() {
2673 - meson_src_compile
2674 -}
2675 -
2676 -multilib_src_install() {
2677 - meson_src_install
2678 -}
2679 -
2680 -multilib_src_install_all() {
2681 - einstalldocs
2682 -}
2683 -
2684 -multilib_src_test() {
2685 - meson_src_test
2686 -}
2687 -
2688 -pkg_postinst() {
2689 - # Switch to the xorg implementation.
2690 - echo
2691 - eselect opengl set --use-old ${OPENGL_DIR}
2692 -}
2693 -
2694 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2695 -# other args - names of DRI drivers to enable
2696 -dri_driver_enable() {
2697 - if [[ $1 == -- ]] || use $1; then
2698 - shift
2699 - DRI_DRIVERS+=("$@")
2700 - fi
2701 -}
2702 -
2703 -gallium_enable() {
2704 - if [[ $1 == -- ]] || use $1; then
2705 - shift
2706 - GALLIUM_DRIVERS+=("$@")
2707 - fi
2708 -}
2709 -
2710 -vulkan_enable() {
2711 - if [[ $1 == -- ]] || use $1; then
2712 - shift
2713 - VULKAN_DRIVERS+=("$@")
2714 - fi
2715 -}
2716
2717 diff --git a/media-libs/mesa/mesa-18.3.6.ebuild b/media-libs/mesa/mesa-19.0.8.ebuild
2718 similarity index 91%
2719 rename from media-libs/mesa/mesa-18.3.6.ebuild
2720 rename to media-libs/mesa/mesa-19.0.8.ebuild
2721 index c97cdda..8ec5d9f 100644
2722 --- a/media-libs/mesa/mesa-18.3.6.ebuild
2723 +++ b/media-libs/mesa/mesa-19.0.8.ebuild
2724 @@ -3,7 +3,7 @@
2725
2726 EAPI=6
2727
2728 -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
2729 +PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
2730
2731 inherit llvm meson multilib-minimal pax-utils python-any-r1
2732
2733 @@ -20,7 +20,7 @@ if [[ ${PV} == 9999 ]]; then
2734 inherit git-r3
2735 else
2736 SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2737 - KEYWORDS="amd64 arm arm64 ~mips ~ppc x86"
2738 + 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"
2739 fi
2740
2741 LICENSE="MIT"
2742 @@ -36,9 +36,9 @@ for card in ${VIDEO_CARDS}; do
2743 done
2744
2745 IUSE="${IUSE_VIDEO_CARDS}
2746 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm lm_sensors
2747 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
2748 - vulkan wayland xa xvmc"
2749 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
2750 + lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind
2751 + vdpau vulkan wayland xa xvmc"
2752
2753 REQUIRED_USE="
2754 d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
2755 @@ -67,10 +67,9 @@ REQUIRED_USE="
2756 video_cards_vmware? ( gallium )
2757 "
2758
2759 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.96"
2760 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.97"
2761 RDEPEND="
2762 !app-eselect/eselect-mesa
2763 - >=app-eselect/eselect-opengl-1.3.0
2764 >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2765 >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2766 >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2767 @@ -80,6 +79,13 @@ RDEPEND="
2768 >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2769 >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
2770 x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2771 + libglvnd? (
2772 + media-libs/libglvnd[${MULTILIB_USEDEP}]
2773 + !app-eselect/eselect-opengl
2774 + )
2775 + !libglvnd? (
2776 + >=app-eselect/eselect-opengl-1.3.0
2777 + )
2778 gallium? (
2779 unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2780 llvm? (
2781 @@ -132,17 +138,15 @@ RDEPEND="${RDEPEND}
2782 #
2783 # How to use it:
2784 # 1. List all the working slots (with min versions) in ||, newest first.
2785 -# 2. Update the := to specify *max* version, e.g. < 8.
2786 -# 3. Specify LLVM_MAX_SLOT, e.g. 7.
2787 -LLVM_MAX_SLOT="7"
2788 +# 2. Update the := to specify *max* version, e.g. < 9.
2789 +# 3. Specify LLVM_MAX_SLOT, e.g. 8.
2790 +LLVM_MAX_SLOT="8"
2791 LLVM_DEPSTR="
2792 || (
2793 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
2794 sys-devel/llvm:7[${MULTILIB_USEDEP}]
2795 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
2796 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2797 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2798 )
2799 - <sys-devel/llvm-8:=[${MULTILIB_USEDEP}]
2800 + <sys-devel/llvm-9:=[${MULTILIB_USEDEP}]
2801 "
2802 LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2803 CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2804 @@ -231,11 +235,9 @@ x86? (
2805 )"
2806
2807 PATCHES=(
2808 - "${FILESDIR}"/${PN}-17-execinfo.patch
2809 - "${FILESDIR}"/${PN}-17-musl-string_h.patch
2810 - "${FILESDIR}"/${PN}-18-musl-invocation_name.patch
2811 - "${FILESDIR}"/${PN}-18-musl-pthread.patch
2812 - "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
2813 + "${FILESDIR}"/${PN}-execinfo.patch
2814 + "${FILESDIR}"/${PN}-heap-allocation.patch
2815 + "${FILESDIR}"/${PN}-19.1.4-musl-upstream-fix.patch
2816 "${FILESDIR}"/${PN}-18.2.4-add-disable-tls-support.patch
2817 )
2818
2819 @@ -247,9 +249,9 @@ llvm_check_deps() {
2820 fi
2821
2822 if use opencl; then
2823 - has_version "sys-devel/clang[${flags}]" || return 1
2824 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
2825 fi
2826 - has_version "sys-devel/llvm[${flags}]"
2827 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
2828 }
2829
2830 pkg_pretend() {
2831 @@ -475,6 +477,7 @@ multilib_src_configure() {
2832 $(meson_use gbm)
2833 $(meson_use gles1)
2834 $(meson_use gles2)
2835 + $(meson_use libglvnd glvnd)
2836 $(meson_use selinux)
2837 -Dvalgrind=$(usex valgrind auto false)
2838 -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2839 @@ -492,6 +495,8 @@ multilib_src_compile() {
2840
2841 multilib_src_install() {
2842 meson_src_install
2843 +
2844 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so*
2845 }
2846
2847 multilib_src_install_all() {
2848 @@ -499,7 +504,7 @@ multilib_src_install_all() {
2849 }
2850
2851 multilib_src_test() {
2852 - meson_src_test
2853 + meson test -v -C "${BUILD_DIR}" -t 100
2854 }
2855
2856 pkg_postinst() {