Gentoo Archives: gentoo-commits

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