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