1 |
commit: f4596331954ede41b1f9a34997e36665bc775979 |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Dec 11 21:02:49 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Dec 11 21:02:49 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=f4596331 |
7 |
|
8 |
media-libs/mesa: version bump to 17.2.6/17.3.0 |
9 |
|
10 |
Cleanup and sync with tree |
11 |
|
12 |
media-libs/mesa/Manifest | 19 +- |
13 |
...er-Work-around-build-failure-with-AltiVec.patch | 70 --- |
14 |
.../mesa/files/mesa-17-missing-fcntl_h.patch | 11 - |
15 |
media-libs/mesa/mesa-13.0.5.ebuild | 512 ------------------ |
16 |
media-libs/mesa/mesa-13.0.6.ebuild | 511 ------------------ |
17 |
media-libs/mesa/mesa-17.0.6.ebuild | 516 ------------------ |
18 |
media-libs/mesa/mesa-17.1.10.ebuild | 2 +- |
19 |
media-libs/mesa/mesa-17.1.8.ebuild | 507 ------------------ |
20 |
media-libs/mesa/mesa-17.1.9.ebuild | 507 ------------------ |
21 |
media-libs/mesa/mesa-17.2.0.ebuild | 508 ------------------ |
22 |
media-libs/mesa/mesa-17.2.1.ebuild | 583 -------------------- |
23 |
media-libs/mesa/mesa-17.2.2.ebuild | 583 -------------------- |
24 |
media-libs/mesa/mesa-17.2.3.ebuild | 586 -------------------- |
25 |
media-libs/mesa/mesa-17.2.4.ebuild | 586 -------------------- |
26 |
.../{mesa-17.2.5.ebuild => mesa-17.2.6.ebuild} | 2 +- |
27 |
.../{mesa-17.3.0_rc3.ebuild => mesa-17.3.0.ebuild} | 13 +- |
28 |
media-libs/mesa/mesa-17.3.0_rc2.ebuild | 589 --------------------- |
29 |
media-libs/mesa/mesa-17.3.0_rc4.ebuild | 589 --------------------- |
30 |
media-libs/mesa/mesa-17.3.0_rc5.ebuild | 589 --------------------- |
31 |
media-libs/mesa/metadata.xml | 4 - |
32 |
20 files changed, 9 insertions(+), 7278 deletions(-) |
33 |
|
34 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
35 |
index 820519b..64ff7f6 100644 |
36 |
--- a/media-libs/mesa/Manifest |
37 |
+++ b/media-libs/mesa/Manifest |
38 |
@@ -1,16 +1,3 @@ |
39 |
-DIST mesa-13.0.5.tar.xz 9171480 SHA256 bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87 SHA512 db5f6a97b40ee6e45ba81280ab4543354e9f274c7112c5a43b8970244f329902a22f68d5eeddad5b64502507f462ffbcc028efc5dff93822adf95d30ba5903c1 WHIRLPOOL 164116608908331d4e8d69c4d2b92dc22e8e6d98725a20e8c2da5cc24b4e9ae9e05ee9c7209d55371b419e0f4e6c1d4752a46d149a968a6b83612aa77f7e480e |
40 |
-DIST mesa-13.0.6.tar.xz 9179236 SHA256 29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597 SHA512 2455e044647f674c2f1dd524143b61b8630713fa929bbf6fe1c981436a9c08dc933553d638a22b32d2799afb77be746355b48b1b20af172141c5b63891e94441 WHIRLPOOL 1fdaaf29de96225cf41a3bdeb559a35cf20fda524f80985b2bfdc52095dcb7f6b320704b7ccf754a6f80555925a6a80dfa2b1115a4bdd9bdc1ebb672f115208a |
41 |
-DIST mesa-17.0.6.tar.xz 9494872 SHA256 89ecf3bcd0f18dcca5aaa42bf36bb52a2df33be89889f94aaaad91f7a504a69d SHA512 537d28aa694c2d48811d2467e33b3adc841067d5f1cdb7e0809ba100f71869090285bbb246e57e5f0177401a539b44cc32b1ccfcb32a1855c14b011b92d32eaf WHIRLPOOL f3ee87377e87cbd23bd9009d840e6c0ae50ccbbb30cfa7be61f3023cbe9519f5b50f22c59dbcc207a106a6e357d77074fcaee63916ee091b920cbc3d511ec2ab |
42 |
-DIST mesa-17.1.10.tar.xz 9872168 SHA256 cbc0d681cc4df47d8deb5a36f45b420978128522fd665b2cd4c7096316f11bdb SHA512 728dbd41f5d3a7a1c33fc18c08a8b8eb1f6d236c5f00781209f46b144dd66a27ecd723ab1635868b7ad77de3a18ad53f1a88c932f17c0be97605a2775e3b3a9b WHIRLPOOL d33cc0b7620e01822ce6ca2708f01eccc6c7796c1ed19f3642dab733521d17d794658dbc47bcca7d71f94f99c81637a28738dc6c45c4d1ccc7e2855f07a5f961 |
43 |
-DIST mesa-17.1.8.tar.xz 9902800 SHA256 75ed2eaeae26ddd536150f294386468ae2e1a7717948c41cd14b7875be5269db SHA512 d29fd999d75967683f5aa836cf0b701705f54de428ebbbac059c3e335e94552c0b455aa67fa2870464a086dc58994f2f320710a1abc265dea363241aede71c5b WHIRLPOOL 8faad2f3da8546d48ee9b5470d147de7507a0dc39787a876f6513933e958baa94571d285095fced7c34c674364ab897a896acc39374849fb22026dd05a9bd27f |
44 |
-DIST mesa-17.1.9.tar.xz 9908296 SHA256 5f51ad94341696097d5df7b838183534478216858ac0fc8de183671a36ffea1a SHA512 359da171deaba0a1a5ce7112d49d7b48be38d24d0211264fcdcc3218f1f35be9419e5be1d08d56b6ca15654d3f93107b1706ff18a5e31d3746f7a3191b808cdf WHIRLPOOL a4b76204005ed15cee799a0e7e590d5e9f5078f65d83fccec26f00ab397c4144f70ff6eac652f13197af3bbdf4c4096c531329766297caa9875aee47bc3e4d67 |
45 |
-DIST mesa-17.2.0.tar.xz 10335284 SHA256 3123448f770eae58bc73e15480e78909defb892f10ab777e9116c9b218094943 SHA512 6ac39274fcf86a26ea5fe51aed486ba3d45b75e0d2f7cc17e1e71d4cf9a85420a832fe559a2ac7b215eda615fab99a2bd290c8388a48c52e13737e7e4ef8d4fd WHIRLPOOL 3fec3810c23aa12f49c0fe561b6dbdbd5724a3bff513b21c273d5796c85eebdd889fb405a03f7cc0fe926a8289794e1872a0d04799c31122061a268faceacf36 |
46 |
-DIST mesa-17.2.1.tar.xz 10414776 SHA256 77385d17827cff24a3bae134342234f2efe7f7f990e778109682571dbbc9ba1e SHA512 19a7d6c2e2d439b1c73199bffd4154b42017bccc138be954a893c3b70e885f07988de84dc8aa2aff36e06295e91f0181d5b95372152f6f0f80b7afe4b3846b6a WHIRLPOOL b9048aa4d512307c3f558a925afb39949ea84b7e52ca52e2ba39cf6fba38c284ef527b25fdbfa7ec22ca6c9e17a8628ce41fc8916bfaafc7f5142c3476750b6d |
47 |
-DIST mesa-17.2.2.tar.xz 10359156 SHA256 cf522244d6a5a1ecde3fc00e7c96935253fe22f808f064cab98be6f3faa65782 SHA512 641342c68989b8d801c37e668b012d3b7c4ad43d8ca01b74f8cbb3a1ec25b7390f69fe7ebc84b29dab1c6a4ac01c882ec9fd4a6b331505629461bdbbe6aa3f7e WHIRLPOOL 74271721fb38a0c62f6f35d84ba9196e000f2fe2a32e75120288e77649a87e225464572d347fc149190b573d22c32dfee3e174d6a2578b3c649c4b72375a94ec |
48 |
-DIST mesa-17.2.3.tar.xz 10344180 SHA256 a0b0ec8f7b24dd044d7ab30a8c7e6d3767521e245f88d4ed5dd93315dc56f837 SHA512 749a0a46b772974633e405804ace7f509afb79f47811dbbdd390333721d744f2ac64f985ff1fd6c5aa3019b700be70bc1f75f60745ed9f4c5b08a9a8f77dfc76 WHIRLPOOL 333bdb9dd15726a4a19fa7a87d2044aba6ebaea2eb83dd436f916020221a8bc46d667e8710a701c52930217292ecdfd468b654a7846357aa8881356987f394c0 |
49 |
-DIST mesa-17.2.4.tar.xz 10381984 SHA256 5ba408fecd6e1132e5490eec1a2f04466214e4c65c8b89b331be844768c2e550 SHA512 665b63aab6af3f8f263f182d85d9ad71db7a23bcbaf67d62fe53c258cb0f600266ac82e72d681ec20cf7c66b47d4076aad5c3f553519f19110ee577da2707085 WHIRLPOOL 29750c50a496cb27e0b4466bf0d1496434330a96259616dd7c368adc3d9478aa6ba1facf11ec4ff231a244f890781c12637327b1675c423786693c40f787945d |
50 |
-DIST mesa-17.2.5.tar.xz 10386312 SHA256 7f7f914b7b9ea0b15f2d9d01a4375e311b0e90e55683b8e8a67ce8691eb1070f SHA512 c4b0f7f48b0b57fdf610de3d61e127774f8223e755acfde6cf2649818eec985e8f925abf8a15d530ecdb882cb8d7268fd01e5d94c8ac6934551b8a74272353c7 WHIRLPOOL 51d066640824964acebc69e78ec368753c18833b0c0cdb940e6afb8326edc2a75c657d81c043d728ca66968608e59a128295e3f4863980c2dcaf6716f55d14d3 |
51 |
-DIST mesa-17.3.0-rc2.tar.xz 10658696 SHA256 13b2c085a54836465a3b6814ad4bc2dae0a502f43405e75ced67789d5afc18cd SHA512 749cca3e0875dbff7b6fab4d646974ecbcc7659ec82ad025bc386372d6e0e050d84d5e05fb68c5099e685557d85daf55c6a5db7bd89a7323778ae7e87e01215e WHIRLPOOL 4007e6641de55145b9bf8bf7aa567c284d3a4b29ea6b83fb5ba3324abf757cf72cf1f1bc0cd3011e58b3d0c6cc6fa7f7c03b1affb7f0ba7c4a5e7ade398bf2f3 |
52 |
-DIST mesa-17.3.0-rc3.tar.xz 10664384 SHA256 1f3677429018f6ef4167b31db9eef558827a649239aa685f54c1a400ff5462d9 SHA512 403da79ac87325f2f0962e9be406edf4d009b6f5d479c2943be5bc1a26ad201d96072461a0d041b5a59abe327829eeba0dfb44abce217074079c47811729b058 WHIRLPOOL 91a5f65bc1dc9dc27bcd8492d82c80d2827d2408030890fdcaa653993d9a1deec983b00cb48c0675f3234d36512396c03cc7659bd30cadd6e536f5bef90d65d9 |
53 |
-DIST mesa-17.3.0-rc4.tar.xz 10662396 SHA256 90c9283caa21c047aef013395776ca44037662450bbed188b4eea679084239be SHA512 410a43852944899fbc9d7ab887510dffda3cb98330d7acd5d529cb01abafe1886b353d050c918cd63ecb1b7afb9350e5ceddf8eabf6e8fd6bd4e6f87343f68cb WHIRLPOOL 43fa0b83683526abec04744a418f932d08ee2a566950ae0473c4795ec7905ff5edf6e7f75a64e1fb52ba7865a7b0b46de0c00eefd84715424b68a01eecb8e577 |
54 |
-DIST mesa-17.3.0-rc5.tar.xz 10663464 SHA256 c59f4e007fdac9b95168c35ec2e98d5de10ef753a90a8d3486b632ccdabaa7a0 SHA512 b53e40f39850067e97dcf9d1eb10d1f5d3a8729933057bacf3648b86ef55c43d7b2f2f5444ae8c6f1b8677c2c3fd12f7484ee08139bd388dc4cebd8dbaf28c83 WHIRLPOOL 7c42a70fdb52d7117ef89255cbca779a5ffaca6d49ddef6befa745d2365ea5b5b954404de66e9a073859ceff8658aff8c1b3c19d0e776024470fdd52300436b2 |
55 |
+DIST mesa-17.1.10.tar.xz 9872168 BLAKE2B 205ece7b016fcc1de5bb72711775cd8f4b90f5d6c26db77d1576752fcd4a99a36cbcd902bb6ad1041d476d1c3b32479baceb4087c902ce598ede3d57851c6b9d SHA512 728dbd41f5d3a7a1c33fc18c08a8b8eb1f6d236c5f00781209f46b144dd66a27ecd723ab1635868b7ad77de3a18ad53f1a88c932f17c0be97605a2775e3b3a9b |
56 |
+DIST mesa-17.2.6.tar.xz 10387604 BLAKE2B 43bd60f9e61bb04e3a2afe4bc6e18099a524cdec3c7948d9ccfffa5bfe50eb3e0625ba6da7bb3b32959ef4a5e3db982daf2f90d3ee555cf65084d70849b3ca12 SHA512 739645d963da2ff79fa0f2bfcc4948516c4f0a768f9d21f98eff049edc88218847afd3786003ccf7b10deec585f4f1d7f70fcc5e5f6e33186ebbb86cd8cb0202 |
57 |
+DIST mesa-17.3.0.tar.xz 10667896 BLAKE2B 4786f1ac3fa2d2f07895c829f2c0770861d64f606d72635eb206cb9f0a1e84c061950fbf33b2c7b27055399da43d705ed9abd5d8f46c7bb3e3d9a6497f4bd71d SHA512 b0a616ce9a534a19c42eb0a626a178c6a7171aae1989351ea7c2a9e775a7478758b805dbfb754056720b1ef0454c3d3beb64aa59543be27f249ce97efae8e47e |
58 |
|
59 |
diff --git a/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch b/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch |
60 |
deleted file mode 100644 |
61 |
index 0d2c65a..0000000 |
62 |
--- a/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch |
63 |
+++ /dev/null |
64 |
@@ -1,70 +0,0 @@ |
65 |
-From 71a2b2e8a580d2c0bee84b898d8531b27f3c7811 Mon Sep 17 00:00:00 2001 |
66 |
-From: Matt Turner <mattst88@×××××.com> |
67 |
-Date: Thu, 2 Mar 2017 04:43:21 +0000 |
68 |
-Subject: [PATCH] clover: Work around build failure with AltiVec. |
69 |
- |
70 |
-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210 |
71 |
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504 |
72 |
-Acked-by: Francisco Jerez <currojerez@××××××.net> |
73 |
-(cherry picked from commit 7d1195c1e4d071fe796bf5f210c468ea1cc86225) |
74 |
---- |
75 |
- configure.ac | 14 ++++++++++++++ |
76 |
- src/gallium/state_trackers/clover/Makefile.am | 3 +++ |
77 |
- 2 files changed, 17 insertions(+) |
78 |
- |
79 |
-diff --git a/configure.ac b/configure.ac |
80 |
-index fd78fbb..3646e45 100644 |
81 |
---- a/configure.ac |
82 |
-+++ b/configure.ac |
83 |
-@@ -1974,6 +1974,20 @@ if test "x$enable_opencl" = xyes; then |
84 |
- if test "x$have_libelf" != xyes; then |
85 |
- AC_MSG_ERROR([Clover requires libelf]) |
86 |
- fi |
87 |
-+ |
88 |
-+ if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then |
89 |
-+ altivec_enabled=no |
90 |
-+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
91 |
-+ #if !defined(__VEC__) || !defined(__ALTIVEC__) |
92 |
-+ #error "AltiVec not enabled" |
93 |
-+ #endif |
94 |
-+ ])], altivec_enabled=yes) |
95 |
-+ |
96 |
-+ if test "$altivec_enabled" = yes; then |
97 |
-+ CLOVER_STD_OVERRIDE="-std=gnu++11" |
98 |
-+ fi |
99 |
-+ AC_SUBST([CLOVER_STD_OVERRIDE]) |
100 |
-+ fi |
101 |
- fi |
102 |
- AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes) |
103 |
- AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes) |
104 |
-diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am |
105 |
-index 8abcfec..edf1e26 100644 |
106 |
---- a/src/gallium/state_trackers/clover/Makefile.am |
107 |
-+++ b/src/gallium/state_trackers/clover/Makefile.am |
108 |
-@@ -33,6 +33,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la |
109 |
- |
110 |
- libcltgsi_la_CXXFLAGS = \ |
111 |
- -std=c++11 \ |
112 |
-+ $(CLOVER_STD_OVERRIDE) \ |
113 |
- $(VISIBILITY_CXXFLAGS) |
114 |
- |
115 |
- libcltgsi_la_SOURCES = $(TGSI_SOURCES) |
116 |
-@@ -41,6 +42,7 @@ libclllvm_la_CXXFLAGS = \ |
117 |
- -std=c++11 \ |
118 |
- $(VISIBILITY_CXXFLAGS) \ |
119 |
- $(LLVM_CXXFLAGS) \ |
120 |
-+ $(CLOVER_STD_OVERRIDE) \ |
121 |
- $(DEFINES) \ |
122 |
- $(LIBELF_CFLAGS) \ |
123 |
- -DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \ |
124 |
-@@ -51,6 +53,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES) |
125 |
- |
126 |
- libclover_la_CXXFLAGS = \ |
127 |
- -std=c++11 \ |
128 |
-+ $(CLOVER_STD_OVERRIDE) \ |
129 |
- $(VISIBILITY_CXXFLAGS) |
130 |
- |
131 |
- libclover_la_LIBADD = \ |
132 |
--- |
133 |
-2.10.2 |
134 |
- |
135 |
|
136 |
diff --git a/media-libs/mesa/files/mesa-17-missing-fcntl_h.patch b/media-libs/mesa/files/mesa-17-missing-fcntl_h.patch |
137 |
deleted file mode 100644 |
138 |
index b0cfa84..0000000 |
139 |
--- a/media-libs/mesa/files/mesa-17-missing-fcntl_h.patch |
140 |
+++ /dev/null |
141 |
@@ -1,11 +0,0 @@ |
142 |
-diff -Naur mesa-17.1.0-rc4.orig/src/util/rand_xor.c mesa-17.1.0-rc4/src/util/rand_xor.c |
143 |
---- mesa-17.1.0-rc4.orig/src/util/rand_xor.c 2017-05-08 23:04:16.742060503 -0700 |
144 |
-+++ mesa-17.1.0-rc4/src/util/rand_xor.c 2017-05-08 23:04:52.664702908 -0700 |
145 |
-@@ -25,6 +25,7 @@ |
146 |
- #if defined(__linux__) |
147 |
- #include <sys/file.h> |
148 |
- #include <unistd.h> |
149 |
-+#include <fcntl.h> |
150 |
- #else |
151 |
- #include <time.h> |
152 |
- #endif |
153 |
|
154 |
diff --git a/media-libs/mesa/mesa-13.0.5.ebuild b/media-libs/mesa/mesa-13.0.5.ebuild |
155 |
deleted file mode 100644 |
156 |
index 6563005..0000000 |
157 |
--- a/media-libs/mesa/mesa-13.0.5.ebuild |
158 |
+++ /dev/null |
159 |
@@ -1,512 +0,0 @@ |
160 |
-# Copyright 1999-2017 Gentoo Foundation |
161 |
-# Distributed under the terms of the GNU General Public License v2 |
162 |
- |
163 |
-EAPI=5 |
164 |
- |
165 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
166 |
- |
167 |
-if [[ ${PV} = 9999 ]]; then |
168 |
- GIT_ECLASS="git-r3" |
169 |
- EXPERIMENTAL="true" |
170 |
-fi |
171 |
- |
172 |
-PYTHON_COMPAT=( python2_7 ) |
173 |
- |
174 |
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
175 |
- |
176 |
-OPENGL_DIR="xorg-x11" |
177 |
- |
178 |
-MY_P="${P/_/-}" |
179 |
-FOLDER="${PV/_rc*/}" |
180 |
- |
181 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
182 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
183 |
- |
184 |
-if [[ $PV == 9999 ]]; then |
185 |
- SRC_URI="" |
186 |
-else |
187 |
- SRC_URI="https://mesa.freedesktop.org/archive/${FOLDER}/${MY_P}.tar.xz" |
188 |
- KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
189 |
-fi |
190 |
- |
191 |
-LICENSE="MIT" |
192 |
-SLOT="0" |
193 |
-RESTRICT="!bindist? ( bindist )" |
194 |
- |
195 |
-INTEL_CARDS="i915 i965 intel" |
196 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
197 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 vmware" |
198 |
-for card in ${VIDEO_CARDS}; do |
199 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
200 |
-done |
201 |
- |
202 |
-IUSE="${IUSE_VIDEO_CARDS} |
203 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2 |
204 |
- libressl +llvm +nettle +nptl opencl osmesa pax_kernel openmax openssl pic |
205 |
- selinux vaapi valgrind vdpau vulkan wayland xvmc xa" |
206 |
- |
207 |
-REQUIRED_USE=" |
208 |
- || ( gcrypt libressl nettle openssl ) |
209 |
- d3d9? ( dri3 gallium ) |
210 |
- llvm? ( gallium ) |
211 |
- opencl? ( gallium llvm ) |
212 |
- openmax? ( gallium ) |
213 |
- gles1? ( egl ) |
214 |
- gles2? ( egl ) |
215 |
- vaapi? ( gallium ) |
216 |
- vdpau? ( gallium ) |
217 |
- vulkan? ( video_cards_i965 ) |
218 |
- wayland? ( egl gbm ) |
219 |
- xa? ( gallium ) |
220 |
- video_cards_freedreno? ( gallium ) |
221 |
- video_cards_intel? ( classic ) |
222 |
- video_cards_i915? ( || ( classic gallium ) ) |
223 |
- video_cards_i965? ( classic ) |
224 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
225 |
- video_cards_radeon? ( || ( classic gallium ) |
226 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
227 |
- video_cards_r100? ( classic ) |
228 |
- video_cards_r200? ( classic ) |
229 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
230 |
- video_cards_r600? ( gallium ) |
231 |
- video_cards_radeonsi? ( gallium llvm ) |
232 |
- video_cards_vmware? ( gallium ) |
233 |
-" |
234 |
- |
235 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72" |
236 |
-# keep correct libdrm and dri2proto dep |
237 |
-# keep blocks in rdepend for binpkg |
238 |
-RDEPEND=" |
239 |
- !<x11-base/xorg-server-1.7 |
240 |
- !<=x11-proto/xf86driproto-2.0.3 |
241 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
242 |
- classic? ( app-eselect/eselect-mesa ) |
243 |
- gallium? ( app-eselect/eselect-mesa ) |
244 |
- >=app-eselect/eselect-opengl-1.3.0 |
245 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
246 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
247 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
248 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
249 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
250 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
251 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
252 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
253 |
- llvm? ( |
254 |
- video_cards_radeonsi? ( |
255 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
256 |
- ) |
257 |
- video_cards_r600? ( |
258 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
259 |
- ) |
260 |
- video_cards_radeon? ( |
261 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
262 |
- ) |
263 |
- >=sys-devel/llvm-3.6.0:0=[${MULTILIB_USEDEP}] |
264 |
- ) |
265 |
- nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] ) |
266 |
- !nettle? ( |
267 |
- gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) |
268 |
- !gcrypt? ( |
269 |
- libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) |
270 |
- !libressl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) |
271 |
- ) |
272 |
- ) |
273 |
- opencl? ( |
274 |
- app-eselect/eselect-opencl |
275 |
- dev-libs/libclc |
276 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
277 |
- ) |
278 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
279 |
- vaapi? ( |
280 |
- >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
281 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
282 |
- ) |
283 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
284 |
- wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] ) |
285 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
286 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}] |
287 |
-" |
288 |
-for card in ${INTEL_CARDS}; do |
289 |
- RDEPEND="${RDEPEND} |
290 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
291 |
- " |
292 |
-done |
293 |
- |
294 |
-for card in ${RADEON_CARDS}; do |
295 |
- RDEPEND="${RDEPEND} |
296 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
297 |
- " |
298 |
-done |
299 |
-RDEPEND="${RDEPEND} |
300 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
301 |
-" |
302 |
- |
303 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
304 |
-# LLVM < 3.9 is out of the game |
305 |
-DEPEND="${RDEPEND} |
306 |
- ${PYTHON_DEPS} |
307 |
- llvm? ( |
308 |
- video_cards_radeonsi? ( || ( |
309 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
310 |
- sys-devel/llvm[video_cards_radeon] |
311 |
- ) ) |
312 |
- ) |
313 |
- opencl? ( |
314 |
- >=sys-devel/llvm-3.4.2:0=[${MULTILIB_USEDEP}] |
315 |
- >=sys-devel/clang-3.4.2:0=[${MULTILIB_USEDEP}] |
316 |
- >=sys-devel/gcc-4.6 |
317 |
- ) |
318 |
- sys-devel/gettext |
319 |
- virtual/pkgconfig |
320 |
- valgrind? ( dev-util/valgrind ) |
321 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
322 |
- dri3? ( |
323 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
324 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
325 |
- ) |
326 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
327 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
328 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
329 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
330 |
-" |
331 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
332 |
- sys-devel/bison |
333 |
- sys-devel/flex |
334 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
335 |
-" |
336 |
- |
337 |
-S="${WORKDIR}/${MY_P}" |
338 |
-EGIT_CHECKOUT_DIR=${S} |
339 |
- |
340 |
-QA_WX_LOAD=" |
341 |
-x86? ( |
342 |
- !pic? ( |
343 |
- usr/lib*/libglapi.so.0.0.0 |
344 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
345 |
- usr/lib*/libGLESv2.so.2.0.0 |
346 |
- usr/lib*/libGL.so.1.2.0 |
347 |
- usr/lib*/libOSMesa.so.8.0.0 |
348 |
- ) |
349 |
-)" |
350 |
- |
351 |
-pkg_setup() { |
352 |
- # warning message for bug 459306 |
353 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
354 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
355 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
356 |
- fi |
357 |
- |
358 |
- python-any-r1_pkg_setup |
359 |
-} |
360 |
- |
361 |
-src_prepare() { |
362 |
- epatch "${FILESDIR}"/${PN}-11-execinfo.patch |
363 |
- epatch "${FILESDIR}"/${PN}-13-musl_endian.patch |
364 |
- epatch "${FILESDIR}"/${PN}-13-clover-Work-around-build-failure-with-AltiVec.patch |
365 |
- |
366 |
- eautoreconf |
367 |
-} |
368 |
- |
369 |
-multilib_src_configure() { |
370 |
- local myconf |
371 |
- |
372 |
- if use classic; then |
373 |
- # Configurable DRI drivers |
374 |
- driver_enable swrast |
375 |
- |
376 |
- # Intel code |
377 |
- driver_enable video_cards_i915 i915 |
378 |
- driver_enable video_cards_i965 i965 |
379 |
- if ! use video_cards_i915 && \ |
380 |
- ! use video_cards_i965; then |
381 |
- driver_enable video_cards_intel i915 i965 |
382 |
- fi |
383 |
- |
384 |
- # Nouveau code |
385 |
- driver_enable video_cards_nouveau nouveau |
386 |
- |
387 |
- # ATI code |
388 |
- driver_enable video_cards_r100 radeon |
389 |
- driver_enable video_cards_r200 r200 |
390 |
- if ! use video_cards_r100 && \ |
391 |
- ! use video_cards_r200; then |
392 |
- driver_enable video_cards_radeon radeon r200 |
393 |
- fi |
394 |
- fi |
395 |
- |
396 |
- if use egl; then |
397 |
- myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
398 |
- fi |
399 |
- |
400 |
- if use gallium; then |
401 |
- myconf+=" |
402 |
- $(use_enable d3d9 nine) |
403 |
- $(use_enable llvm gallium-llvm) |
404 |
- $(use_enable openmax omx) |
405 |
- $(use_enable vaapi va) |
406 |
- $(use_enable vdpau) |
407 |
- $(use_enable xa) |
408 |
- $(use_enable xvmc) |
409 |
- " |
410 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
411 |
- |
412 |
- gallium_enable swrast |
413 |
- gallium_enable video_cards_vc4 vc4 |
414 |
- gallium_enable video_cards_vmware svga |
415 |
- gallium_enable video_cards_nouveau nouveau |
416 |
- gallium_enable video_cards_i915 i915 |
417 |
- if ! use video_cards_i915 && \ |
418 |
- ! use video_cards_i965; then |
419 |
- gallium_enable video_cards_intel i915 |
420 |
- fi |
421 |
- |
422 |
- gallium_enable video_cards_r300 r300 |
423 |
- gallium_enable video_cards_r600 r600 |
424 |
- gallium_enable video_cards_radeonsi radeonsi |
425 |
- if ! use video_cards_r300 && \ |
426 |
- ! use video_cards_r600; then |
427 |
- gallium_enable video_cards_radeon r300 r600 |
428 |
- fi |
429 |
- |
430 |
- gallium_enable video_cards_freedreno freedreno |
431 |
- # opencl stuff |
432 |
- if use opencl; then |
433 |
- myconf+=" |
434 |
- $(use_enable opencl) |
435 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
436 |
- " |
437 |
- fi |
438 |
- fi |
439 |
- |
440 |
- if use vulkan; then |
441 |
- vulkan_enable video_cards_i965 intel |
442 |
- |
443 |
- # radv is disabled due to dependence on >=llvm-3.9, bug 607660 |
444 |
- #vulkan_enable video_cards_radeonsi radeon |
445 |
- fi |
446 |
- |
447 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
448 |
- if [[ ${ABI} == x86 ]]; then |
449 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
450 |
- fi |
451 |
- |
452 |
- # on abi_x86_32 hardened we need to have asm disable |
453 |
- if [[ ${ABI} == x86* ]] && use pic; then |
454 |
- myconf+=" --disable-asm" |
455 |
- fi |
456 |
- |
457 |
- if use gallium; then |
458 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
459 |
- else |
460 |
- myconf+=" $(use_enable osmesa)" |
461 |
- fi |
462 |
- |
463 |
- # build fails with BSD indent, bug #428112 |
464 |
- use userland_GNU || export INDENT=cat |
465 |
- |
466 |
- ECONF_SOURCE="${S}" \ |
467 |
- econf \ |
468 |
- --enable-dri \ |
469 |
- --enable-glx \ |
470 |
- --enable-shared-glapi \ |
471 |
- --disable-shader-cache \ |
472 |
- $(use_enable !bindist texture-float) \ |
473 |
- $(use_enable d3d9 nine) \ |
474 |
- $(use_enable debug) \ |
475 |
- $(use_enable dri3) \ |
476 |
- $(use_enable egl) \ |
477 |
- $(use_enable gbm) \ |
478 |
- $(use_enable gles1) \ |
479 |
- $(use_enable gles2) \ |
480 |
- $(use_enable nptl glx-tls) \ |
481 |
- --enable-valgrind=$(usex valgrind auto no) \ |
482 |
- --enable-llvm-shared-libs \ |
483 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
484 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
485 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
486 |
- --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \ |
487 |
- PYTHON2="${PYTHON}" \ |
488 |
- ${myconf} |
489 |
-} |
490 |
- |
491 |
-multilib_src_install() { |
492 |
- emake install DESTDIR="${D}" |
493 |
- |
494 |
- if use classic || use gallium; then |
495 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
496 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
497 |
- keepdir /usr/$(get_libdir)/dri |
498 |
- dodir /usr/$(get_libdir)/mesa |
499 |
- for x in ${gallium_drivers[@]}; do |
500 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
501 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
502 |
- || die "Failed to move ${x}" |
503 |
- fi |
504 |
- done |
505 |
- if use classic; then |
506 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
507 |
- fi |
508 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
509 |
- if [ -f ${x} -o -L ${x} ]; then |
510 |
- mv -f "${x}" "${x/dri/mesa}" \ |
511 |
- || die "Failed to move ${x}" |
512 |
- fi |
513 |
- done |
514 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
515 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
516 |
- # remove symlinks to drivers known to eselect |
517 |
- for x in ${gallium_drivers[@]}; do |
518 |
- if [ -f ${x} -o -L ${x} ]; then |
519 |
- rm "${x}" || die "Failed to remove ${x}" |
520 |
- fi |
521 |
- done |
522 |
- popd |
523 |
- eend $? |
524 |
- fi |
525 |
- if use opencl; then |
526 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
527 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
528 |
- dodir ${cl_dir}/{lib,include} |
529 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
530 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
531 |
- "${ED}"${cl_dir} |
532 |
- fi |
533 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
534 |
- mv -f "${ED}"/usr/include/CL \ |
535 |
- "${ED}"${cl_dir}/include |
536 |
- fi |
537 |
- eend $? |
538 |
- fi |
539 |
- |
540 |
- if use openmax; then |
541 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
542 |
- doenvd "${T}"/99mesaxdgomx |
543 |
- keepdir /usr/share/mesa/xdg |
544 |
- fi |
545 |
-} |
546 |
- |
547 |
-multilib_src_install_all() { |
548 |
- prune_libtool_files --all |
549 |
- einstalldocs |
550 |
- |
551 |
- if use !bindist; then |
552 |
- dodoc docs/patents.txt |
553 |
- fi |
554 |
- |
555 |
- # Install config file for eselect mesa |
556 |
- insinto /usr/share/mesa |
557 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
558 |
- |
559 |
- # Mesa should not install these |
560 |
- if use vulkan; then |
561 |
- rm "${ED}"/usr/include/vulkan/{vulkan.h,vk_platform.h} || die |
562 |
- fi |
563 |
-} |
564 |
- |
565 |
-multilib_src_test() { |
566 |
- if use llvm; then |
567 |
- 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' |
568 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
569 |
- emake ${llvm_tests} |
570 |
- pax-mark m ${llvm_tests} |
571 |
- popd >/dev/null || die |
572 |
- fi |
573 |
- emake check |
574 |
-} |
575 |
- |
576 |
-pkg_postinst() { |
577 |
- # Switch to the xorg implementation. |
578 |
- echo |
579 |
- eselect opengl set --use-old ${OPENGL_DIR} |
580 |
- |
581 |
- # Select classic/gallium drivers |
582 |
- if use classic || use gallium; then |
583 |
- eselect mesa set --auto |
584 |
- fi |
585 |
- |
586 |
- # Switch to mesa opencl |
587 |
- if use opencl; then |
588 |
- eselect opencl set --use-old ${PN} |
589 |
- fi |
590 |
- |
591 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
592 |
- if use openmax; then |
593 |
- ebegin "Registering OpenMAX drivers" |
594 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
595 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
596 |
- omxregister-bellagio |
597 |
- eend $? |
598 |
- fi |
599 |
- |
600 |
- # warn about patent encumbered texture-float |
601 |
- if use !bindist; then |
602 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
603 |
- elog "enabled. Please see patents.txt for an explanation." |
604 |
- fi |
605 |
- |
606 |
- if ! has_version media-libs/libtxc_dxtn; then |
607 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
608 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
609 |
- elog "textures in some apps, and some others even require this to run." |
610 |
- fi |
611 |
-} |
612 |
- |
613 |
-pkg_prerm() { |
614 |
- if use openmax; then |
615 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
616 |
- fi |
617 |
-} |
618 |
- |
619 |
-# $1 - VIDEO_CARDS flag |
620 |
-# other args - names of DRI drivers to enable |
621 |
-# TODO: avoid code duplication for a more elegant implementation |
622 |
-driver_enable() { |
623 |
- case $# in |
624 |
- # for enabling unconditionally |
625 |
- 1) |
626 |
- DRI_DRIVERS+=",$1" |
627 |
- ;; |
628 |
- *) |
629 |
- if use $1; then |
630 |
- shift |
631 |
- for i in $@; do |
632 |
- DRI_DRIVERS+=",${i}" |
633 |
- done |
634 |
- fi |
635 |
- ;; |
636 |
- esac |
637 |
-} |
638 |
- |
639 |
-gallium_enable() { |
640 |
- case $# in |
641 |
- # for enabling unconditionally |
642 |
- 1) |
643 |
- GALLIUM_DRIVERS+=",$1" |
644 |
- ;; |
645 |
- *) |
646 |
- if use $1; then |
647 |
- shift |
648 |
- for i in $@; do |
649 |
- GALLIUM_DRIVERS+=",${i}" |
650 |
- done |
651 |
- fi |
652 |
- ;; |
653 |
- esac |
654 |
-} |
655 |
- |
656 |
-vulkan_enable() { |
657 |
- case $# in |
658 |
- # for enabling unconditionally |
659 |
- 1) |
660 |
- VULKAN_DRIVERS+=",$1" |
661 |
- ;; |
662 |
- *) |
663 |
- if use $1; then |
664 |
- shift |
665 |
- for i in $@; do |
666 |
- VULKAN_DRIVERS+=",${i}" |
667 |
- done |
668 |
- fi |
669 |
- ;; |
670 |
- esac |
671 |
-} |
672 |
|
673 |
diff --git a/media-libs/mesa/mesa-13.0.6.ebuild b/media-libs/mesa/mesa-13.0.6.ebuild |
674 |
deleted file mode 100644 |
675 |
index 43e257e..0000000 |
676 |
--- a/media-libs/mesa/mesa-13.0.6.ebuild |
677 |
+++ /dev/null |
678 |
@@ -1,511 +0,0 @@ |
679 |
-# Copyright 1999-2017 Gentoo Foundation |
680 |
-# Distributed under the terms of the GNU General Public License v2 |
681 |
- |
682 |
-EAPI=5 |
683 |
- |
684 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
685 |
- |
686 |
-if [[ ${PV} = 9999 ]]; then |
687 |
- GIT_ECLASS="git-r3" |
688 |
- EXPERIMENTAL="true" |
689 |
-fi |
690 |
- |
691 |
-PYTHON_COMPAT=( python2_7 ) |
692 |
- |
693 |
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
694 |
- |
695 |
-OPENGL_DIR="xorg-x11" |
696 |
- |
697 |
-MY_P="${P/_/-}" |
698 |
-FOLDER="${PV/_rc*/}" |
699 |
- |
700 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
701 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
702 |
- |
703 |
-if [[ $PV == 9999 ]]; then |
704 |
- SRC_URI="" |
705 |
-else |
706 |
- SRC_URI="https://mesa.freedesktop.org/archive/${FOLDER}/${MY_P}.tar.xz" |
707 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
708 |
-fi |
709 |
- |
710 |
-LICENSE="MIT" |
711 |
-SLOT="0" |
712 |
-RESTRICT="!bindist? ( bindist )" |
713 |
- |
714 |
-INTEL_CARDS="i915 i965 intel" |
715 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
716 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 vmware" |
717 |
-for card in ${VIDEO_CARDS}; do |
718 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
719 |
-done |
720 |
- |
721 |
-IUSE="${IUSE_VIDEO_CARDS} |
722 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2 |
723 |
- libressl +llvm +nettle +nptl opencl osmesa pax_kernel openmax openssl pic |
724 |
- selinux vaapi valgrind vdpau vulkan wayland xvmc xa" |
725 |
- |
726 |
-REQUIRED_USE=" |
727 |
- || ( gcrypt libressl nettle openssl ) |
728 |
- d3d9? ( dri3 gallium ) |
729 |
- llvm? ( gallium ) |
730 |
- opencl? ( gallium llvm ) |
731 |
- openmax? ( gallium ) |
732 |
- gles1? ( egl ) |
733 |
- gles2? ( egl ) |
734 |
- vaapi? ( gallium ) |
735 |
- vdpau? ( gallium ) |
736 |
- vulkan? ( video_cards_i965 ) |
737 |
- wayland? ( egl gbm ) |
738 |
- xa? ( gallium ) |
739 |
- video_cards_freedreno? ( gallium ) |
740 |
- video_cards_intel? ( classic ) |
741 |
- video_cards_i915? ( || ( classic gallium ) ) |
742 |
- video_cards_i965? ( classic ) |
743 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
744 |
- video_cards_radeon? ( || ( classic gallium ) |
745 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
746 |
- video_cards_r100? ( classic ) |
747 |
- video_cards_r200? ( classic ) |
748 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
749 |
- video_cards_r600? ( gallium ) |
750 |
- video_cards_radeonsi? ( gallium llvm ) |
751 |
- video_cards_vmware? ( gallium ) |
752 |
-" |
753 |
- |
754 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72" |
755 |
-# keep correct libdrm and dri2proto dep |
756 |
-# keep blocks in rdepend for binpkg |
757 |
-RDEPEND=" |
758 |
- !<x11-base/xorg-server-1.7 |
759 |
- !<=x11-proto/xf86driproto-2.0.3 |
760 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
761 |
- classic? ( app-eselect/eselect-mesa ) |
762 |
- gallium? ( app-eselect/eselect-mesa ) |
763 |
- >=app-eselect/eselect-opengl-1.3.0 |
764 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
765 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
766 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
767 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
768 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
769 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
770 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
771 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
772 |
- llvm? ( |
773 |
- video_cards_radeonsi? ( |
774 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
775 |
- ) |
776 |
- video_cards_r600? ( |
777 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
778 |
- ) |
779 |
- video_cards_radeon? ( |
780 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
781 |
- ) |
782 |
- >=sys-devel/llvm-3.6.0:0=[${MULTILIB_USEDEP}] |
783 |
- ) |
784 |
- nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] ) |
785 |
- !nettle? ( |
786 |
- gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) |
787 |
- !gcrypt? ( |
788 |
- libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) |
789 |
- !libressl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) |
790 |
- ) |
791 |
- ) |
792 |
- opencl? ( |
793 |
- app-eselect/eselect-opencl |
794 |
- dev-libs/libclc |
795 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
796 |
- ) |
797 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
798 |
- vaapi? ( |
799 |
- >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
800 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
801 |
- ) |
802 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
803 |
- wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] ) |
804 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
805 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}] |
806 |
-" |
807 |
-for card in ${INTEL_CARDS}; do |
808 |
- RDEPEND="${RDEPEND} |
809 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
810 |
- " |
811 |
-done |
812 |
- |
813 |
-for card in ${RADEON_CARDS}; do |
814 |
- RDEPEND="${RDEPEND} |
815 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
816 |
- " |
817 |
-done |
818 |
-RDEPEND="${RDEPEND} |
819 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
820 |
-" |
821 |
- |
822 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
823 |
-# LLVM < 3.9 is out of the game |
824 |
-DEPEND="${RDEPEND} |
825 |
- ${PYTHON_DEPS} |
826 |
- llvm? ( |
827 |
- video_cards_radeonsi? ( || ( |
828 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
829 |
- sys-devel/llvm[video_cards_radeon] |
830 |
- ) ) |
831 |
- ) |
832 |
- opencl? ( |
833 |
- >=sys-devel/llvm-3.4.2:0=[${MULTILIB_USEDEP}] |
834 |
- >=sys-devel/clang-3.4.2:0=[${MULTILIB_USEDEP}] |
835 |
- >=sys-devel/gcc-4.6 |
836 |
- ) |
837 |
- sys-devel/gettext |
838 |
- virtual/pkgconfig |
839 |
- valgrind? ( dev-util/valgrind ) |
840 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
841 |
- dri3? ( |
842 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
843 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
844 |
- ) |
845 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
846 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
847 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
848 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
849 |
-" |
850 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
851 |
- sys-devel/bison |
852 |
- sys-devel/flex |
853 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
854 |
-" |
855 |
- |
856 |
-S="${WORKDIR}/${MY_P}" |
857 |
-EGIT_CHECKOUT_DIR=${S} |
858 |
- |
859 |
-QA_WX_LOAD=" |
860 |
-x86? ( |
861 |
- !pic? ( |
862 |
- usr/lib*/libglapi.so.0.0.0 |
863 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
864 |
- usr/lib*/libGLESv2.so.2.0.0 |
865 |
- usr/lib*/libGL.so.1.2.0 |
866 |
- usr/lib*/libOSMesa.so.8.0.0 |
867 |
- ) |
868 |
-)" |
869 |
- |
870 |
-pkg_setup() { |
871 |
- # warning message for bug 459306 |
872 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
873 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
874 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
875 |
- fi |
876 |
- |
877 |
- python-any-r1_pkg_setup |
878 |
-} |
879 |
- |
880 |
-src_prepare() { |
881 |
- epatch "${FILESDIR}"/${PN}-11-execinfo.patch |
882 |
- epatch "${FILESDIR}"/${PN}-13-musl_endian.patch |
883 |
- |
884 |
- eautoreconf |
885 |
-} |
886 |
- |
887 |
-multilib_src_configure() { |
888 |
- local myconf |
889 |
- |
890 |
- if use classic; then |
891 |
- # Configurable DRI drivers |
892 |
- driver_enable swrast |
893 |
- |
894 |
- # Intel code |
895 |
- driver_enable video_cards_i915 i915 |
896 |
- driver_enable video_cards_i965 i965 |
897 |
- if ! use video_cards_i915 && \ |
898 |
- ! use video_cards_i965; then |
899 |
- driver_enable video_cards_intel i915 i965 |
900 |
- fi |
901 |
- |
902 |
- # Nouveau code |
903 |
- driver_enable video_cards_nouveau nouveau |
904 |
- |
905 |
- # ATI code |
906 |
- driver_enable video_cards_r100 radeon |
907 |
- driver_enable video_cards_r200 r200 |
908 |
- if ! use video_cards_r100 && \ |
909 |
- ! use video_cards_r200; then |
910 |
- driver_enable video_cards_radeon radeon r200 |
911 |
- fi |
912 |
- fi |
913 |
- |
914 |
- if use egl; then |
915 |
- myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
916 |
- fi |
917 |
- |
918 |
- if use gallium; then |
919 |
- myconf+=" |
920 |
- $(use_enable d3d9 nine) |
921 |
- $(use_enable llvm gallium-llvm) |
922 |
- $(use_enable openmax omx) |
923 |
- $(use_enable vaapi va) |
924 |
- $(use_enable vdpau) |
925 |
- $(use_enable xa) |
926 |
- $(use_enable xvmc) |
927 |
- " |
928 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
929 |
- |
930 |
- gallium_enable swrast |
931 |
- gallium_enable video_cards_vc4 vc4 |
932 |
- gallium_enable video_cards_vmware svga |
933 |
- gallium_enable video_cards_nouveau nouveau |
934 |
- gallium_enable video_cards_i915 i915 |
935 |
- if ! use video_cards_i915 && \ |
936 |
- ! use video_cards_i965; then |
937 |
- gallium_enable video_cards_intel i915 |
938 |
- fi |
939 |
- |
940 |
- gallium_enable video_cards_r300 r300 |
941 |
- gallium_enable video_cards_r600 r600 |
942 |
- gallium_enable video_cards_radeonsi radeonsi |
943 |
- if ! use video_cards_r300 && \ |
944 |
- ! use video_cards_r600; then |
945 |
- gallium_enable video_cards_radeon r300 r600 |
946 |
- fi |
947 |
- |
948 |
- gallium_enable video_cards_freedreno freedreno |
949 |
- # opencl stuff |
950 |
- if use opencl; then |
951 |
- myconf+=" |
952 |
- $(use_enable opencl) |
953 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
954 |
- " |
955 |
- fi |
956 |
- fi |
957 |
- |
958 |
- if use vulkan; then |
959 |
- vulkan_enable video_cards_i965 intel |
960 |
- |
961 |
- # radv is disabled due to dependence on >=llvm-3.9, bug 607660 |
962 |
- #vulkan_enable video_cards_radeonsi radeon |
963 |
- fi |
964 |
- |
965 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
966 |
- if [[ ${ABI} == x86 ]]; then |
967 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
968 |
- fi |
969 |
- |
970 |
- # on abi_x86_32 hardened we need to have asm disable |
971 |
- if [[ ${ABI} == x86* ]] && use pic; then |
972 |
- myconf+=" --disable-asm" |
973 |
- fi |
974 |
- |
975 |
- if use gallium; then |
976 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
977 |
- else |
978 |
- myconf+=" $(use_enable osmesa)" |
979 |
- fi |
980 |
- |
981 |
- # build fails with BSD indent, bug #428112 |
982 |
- use userland_GNU || export INDENT=cat |
983 |
- |
984 |
- ECONF_SOURCE="${S}" \ |
985 |
- econf \ |
986 |
- --enable-dri \ |
987 |
- --enable-glx \ |
988 |
- --enable-shared-glapi \ |
989 |
- --disable-shader-cache \ |
990 |
- $(use_enable !bindist texture-float) \ |
991 |
- $(use_enable d3d9 nine) \ |
992 |
- $(use_enable debug) \ |
993 |
- $(use_enable dri3) \ |
994 |
- $(use_enable egl) \ |
995 |
- $(use_enable gbm) \ |
996 |
- $(use_enable gles1) \ |
997 |
- $(use_enable gles2) \ |
998 |
- $(use_enable nptl glx-tls) \ |
999 |
- --enable-valgrind=$(usex valgrind auto no) \ |
1000 |
- --enable-llvm-shared-libs \ |
1001 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
1002 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
1003 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
1004 |
- --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \ |
1005 |
- PYTHON2="${PYTHON}" \ |
1006 |
- ${myconf} |
1007 |
-} |
1008 |
- |
1009 |
-multilib_src_install() { |
1010 |
- emake install DESTDIR="${D}" |
1011 |
- |
1012 |
- if use classic || use gallium; then |
1013 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
1014 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
1015 |
- keepdir /usr/$(get_libdir)/dri |
1016 |
- dodir /usr/$(get_libdir)/mesa |
1017 |
- for x in ${gallium_drivers[@]}; do |
1018 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
1019 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
1020 |
- || die "Failed to move ${x}" |
1021 |
- fi |
1022 |
- done |
1023 |
- if use classic; then |
1024 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
1025 |
- fi |
1026 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
1027 |
- if [ -f ${x} -o -L ${x} ]; then |
1028 |
- mv -f "${x}" "${x/dri/mesa}" \ |
1029 |
- || die "Failed to move ${x}" |
1030 |
- fi |
1031 |
- done |
1032 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
1033 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
1034 |
- # remove symlinks to drivers known to eselect |
1035 |
- for x in ${gallium_drivers[@]}; do |
1036 |
- if [ -f ${x} -o -L ${x} ]; then |
1037 |
- rm "${x}" || die "Failed to remove ${x}" |
1038 |
- fi |
1039 |
- done |
1040 |
- popd |
1041 |
- eend $? |
1042 |
- fi |
1043 |
- if use opencl; then |
1044 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
1045 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
1046 |
- dodir ${cl_dir}/{lib,include} |
1047 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
1048 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
1049 |
- "${ED}"${cl_dir} |
1050 |
- fi |
1051 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
1052 |
- mv -f "${ED}"/usr/include/CL \ |
1053 |
- "${ED}"${cl_dir}/include |
1054 |
- fi |
1055 |
- eend $? |
1056 |
- fi |
1057 |
- |
1058 |
- if use openmax; then |
1059 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
1060 |
- doenvd "${T}"/99mesaxdgomx |
1061 |
- keepdir /usr/share/mesa/xdg |
1062 |
- fi |
1063 |
-} |
1064 |
- |
1065 |
-multilib_src_install_all() { |
1066 |
- prune_libtool_files --all |
1067 |
- einstalldocs |
1068 |
- |
1069 |
- if use !bindist; then |
1070 |
- dodoc docs/patents.txt |
1071 |
- fi |
1072 |
- |
1073 |
- # Install config file for eselect mesa |
1074 |
- insinto /usr/share/mesa |
1075 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
1076 |
- |
1077 |
- # Mesa should not install these |
1078 |
- if use vulkan; then |
1079 |
- rm "${ED}"/usr/include/vulkan/{vulkan.h,vk_platform.h} || die |
1080 |
- fi |
1081 |
-} |
1082 |
- |
1083 |
-multilib_src_test() { |
1084 |
- if use llvm; then |
1085 |
- 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' |
1086 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
1087 |
- emake ${llvm_tests} |
1088 |
- pax-mark m ${llvm_tests} |
1089 |
- popd >/dev/null || die |
1090 |
- fi |
1091 |
- emake check |
1092 |
-} |
1093 |
- |
1094 |
-pkg_postinst() { |
1095 |
- # Switch to the xorg implementation. |
1096 |
- echo |
1097 |
- eselect opengl set --use-old ${OPENGL_DIR} |
1098 |
- |
1099 |
- # Select classic/gallium drivers |
1100 |
- if use classic || use gallium; then |
1101 |
- eselect mesa set --auto |
1102 |
- fi |
1103 |
- |
1104 |
- # Switch to mesa opencl |
1105 |
- if use opencl; then |
1106 |
- eselect opencl set --use-old ${PN} |
1107 |
- fi |
1108 |
- |
1109 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
1110 |
- if use openmax; then |
1111 |
- ebegin "Registering OpenMAX drivers" |
1112 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
1113 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
1114 |
- omxregister-bellagio |
1115 |
- eend $? |
1116 |
- fi |
1117 |
- |
1118 |
- # warn about patent encumbered texture-float |
1119 |
- if use !bindist; then |
1120 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
1121 |
- elog "enabled. Please see patents.txt for an explanation." |
1122 |
- fi |
1123 |
- |
1124 |
- if ! has_version media-libs/libtxc_dxtn; then |
1125 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
1126 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
1127 |
- elog "textures in some apps, and some others even require this to run." |
1128 |
- fi |
1129 |
-} |
1130 |
- |
1131 |
-pkg_prerm() { |
1132 |
- if use openmax; then |
1133 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1134 |
- fi |
1135 |
-} |
1136 |
- |
1137 |
-# $1 - VIDEO_CARDS flag |
1138 |
-# other args - names of DRI drivers to enable |
1139 |
-# TODO: avoid code duplication for a more elegant implementation |
1140 |
-driver_enable() { |
1141 |
- case $# in |
1142 |
- # for enabling unconditionally |
1143 |
- 1) |
1144 |
- DRI_DRIVERS+=",$1" |
1145 |
- ;; |
1146 |
- *) |
1147 |
- if use $1; then |
1148 |
- shift |
1149 |
- for i in $@; do |
1150 |
- DRI_DRIVERS+=",${i}" |
1151 |
- done |
1152 |
- fi |
1153 |
- ;; |
1154 |
- esac |
1155 |
-} |
1156 |
- |
1157 |
-gallium_enable() { |
1158 |
- case $# in |
1159 |
- # for enabling unconditionally |
1160 |
- 1) |
1161 |
- GALLIUM_DRIVERS+=",$1" |
1162 |
- ;; |
1163 |
- *) |
1164 |
- if use $1; then |
1165 |
- shift |
1166 |
- for i in $@; do |
1167 |
- GALLIUM_DRIVERS+=",${i}" |
1168 |
- done |
1169 |
- fi |
1170 |
- ;; |
1171 |
- esac |
1172 |
-} |
1173 |
- |
1174 |
-vulkan_enable() { |
1175 |
- case $# in |
1176 |
- # for enabling unconditionally |
1177 |
- 1) |
1178 |
- VULKAN_DRIVERS+=",$1" |
1179 |
- ;; |
1180 |
- *) |
1181 |
- if use $1; then |
1182 |
- shift |
1183 |
- for i in $@; do |
1184 |
- VULKAN_DRIVERS+=",${i}" |
1185 |
- done |
1186 |
- fi |
1187 |
- ;; |
1188 |
- esac |
1189 |
-} |
1190 |
|
1191 |
diff --git a/media-libs/mesa/mesa-17.0.6.ebuild b/media-libs/mesa/mesa-17.0.6.ebuild |
1192 |
deleted file mode 100644 |
1193 |
index 135b1d3..0000000 |
1194 |
--- a/media-libs/mesa/mesa-17.0.6.ebuild |
1195 |
+++ /dev/null |
1196 |
@@ -1,516 +0,0 @@ |
1197 |
-# Copyright 1999-2017 Gentoo Foundation |
1198 |
-# Distributed under the terms of the GNU General Public License v2 |
1199 |
- |
1200 |
-EAPI=6 |
1201 |
- |
1202 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
1203 |
- |
1204 |
-if [[ ${PV} = 9999 ]]; then |
1205 |
- GIT_ECLASS="git-r3" |
1206 |
- EXPERIMENTAL="true" |
1207 |
-fi |
1208 |
- |
1209 |
-PYTHON_COMPAT=( python2_7 ) |
1210 |
- |
1211 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
1212 |
- |
1213 |
-OPENGL_DIR="xorg-x11" |
1214 |
- |
1215 |
-MY_P="${P/_/-}" |
1216 |
- |
1217 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
1218 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
1219 |
- |
1220 |
-if [[ $PV == 9999 ]]; then |
1221 |
- SRC_URI="" |
1222 |
-else |
1223 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
1224 |
- KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1225 |
-fi |
1226 |
- |
1227 |
-LICENSE="MIT" |
1228 |
-SLOT="0" |
1229 |
-RESTRICT="!bindist? ( bindist )" |
1230 |
- |
1231 |
-INTEL_CARDS="i915 i965 intel" |
1232 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
1233 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
1234 |
-for card in ${VIDEO_CARDS}; do |
1235 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
1236 |
-done |
1237 |
- |
1238 |
-IUSE="${IUSE_VIDEO_CARDS} |
1239 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm |
1240 |
- +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind vdpau |
1241 |
- vulkan wayland xvmc xa" |
1242 |
- |
1243 |
-REQUIRED_USE=" |
1244 |
- d3d9? ( dri3 gallium ) |
1245 |
- llvm? ( gallium ) |
1246 |
- opencl? ( gallium llvm ) |
1247 |
- openmax? ( gallium ) |
1248 |
- gles1? ( egl ) |
1249 |
- gles2? ( egl ) |
1250 |
- vaapi? ( gallium ) |
1251 |
- vdpau? ( gallium ) |
1252 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
1253 |
- video_cards_radeonsi? ( llvm ) ) |
1254 |
- wayland? ( egl gbm ) |
1255 |
- xa? ( gallium ) |
1256 |
- video_cards_freedreno? ( gallium ) |
1257 |
- video_cards_intel? ( classic ) |
1258 |
- video_cards_i915? ( || ( classic gallium ) ) |
1259 |
- video_cards_i965? ( classic ) |
1260 |
- video_cards_imx? ( gallium ) |
1261 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
1262 |
- video_cards_radeon? ( || ( classic gallium ) |
1263 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
1264 |
- video_cards_r100? ( classic ) |
1265 |
- video_cards_r200? ( classic ) |
1266 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
1267 |
- video_cards_r600? ( gallium ) |
1268 |
- video_cards_radeonsi? ( gallium llvm ) |
1269 |
- video_cards_vivante? ( gallium gbm ) |
1270 |
- video_cards_vmware? ( gallium ) |
1271 |
-" |
1272 |
- |
1273 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.74" |
1274 |
-# keep correct libdrm and dri2proto dep |
1275 |
-# keep blocks in rdepend for binpkg |
1276 |
-RDEPEND=" |
1277 |
- !<x11-base/xorg-server-1.7 |
1278 |
- !<=x11-proto/xf86driproto-2.0.3 |
1279 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
1280 |
- classic? ( app-eselect/eselect-mesa ) |
1281 |
- gallium? ( app-eselect/eselect-mesa ) |
1282 |
- >=app-eselect/eselect-opengl-1.3.0 |
1283 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
1284 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
1285 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
1286 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
1287 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
1288 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
1289 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
1290 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
1291 |
- llvm? ( |
1292 |
- video_cards_radeonsi? ( |
1293 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1294 |
- vulkan? ( |
1295 |
- || ( |
1296 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1297 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] ) ) |
1298 |
- ) |
1299 |
- video_cards_r600? ( |
1300 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1301 |
- ) |
1302 |
- video_cards_radeon? ( |
1303 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1304 |
- ) |
1305 |
- || ( |
1306 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1307 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
1308 |
- ) |
1309 |
- <sys-devel/llvm-5:=[${MULTILIB_USEDEP}] |
1310 |
- ) |
1311 |
- opencl? ( |
1312 |
- app-eselect/eselect-opencl |
1313 |
- dev-libs/libclc |
1314 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1315 |
- ) |
1316 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
1317 |
- vaapi? ( |
1318 |
- >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
1319 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
1320 |
- ) |
1321 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
1322 |
- wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] ) |
1323 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
1324 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
1325 |
-" |
1326 |
-for card in ${INTEL_CARDS}; do |
1327 |
- RDEPEND="${RDEPEND} |
1328 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1329 |
- " |
1330 |
-done |
1331 |
- |
1332 |
-for card in ${RADEON_CARDS}; do |
1333 |
- RDEPEND="${RDEPEND} |
1334 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
1335 |
- " |
1336 |
-done |
1337 |
-RDEPEND="${RDEPEND} |
1338 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
1339 |
-" |
1340 |
- |
1341 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
1342 |
-# LLVM < 3.9 is out of the game |
1343 |
-DEPEND="${RDEPEND} |
1344 |
- ${PYTHON_DEPS} |
1345 |
- llvm? ( |
1346 |
- video_cards_radeonsi? ( || ( |
1347 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
1348 |
- sys-devel/llvm[video_cards_radeon] |
1349 |
- ) ) |
1350 |
- ) |
1351 |
- opencl? ( |
1352 |
- || ( |
1353 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1354 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
1355 |
- ) |
1356 |
- || ( |
1357 |
- sys-devel/clang:4[${MULTILIB_USEDEP}] |
1358 |
- >=sys-devel/clang-3.6.0:0[${MULTILIB_USEDEP}] |
1359 |
- ) |
1360 |
- >=sys-devel/gcc-4.6 |
1361 |
- ) |
1362 |
- sys-devel/gettext |
1363 |
- virtual/pkgconfig |
1364 |
- valgrind? ( dev-util/valgrind ) |
1365 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
1366 |
- dri3? ( |
1367 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
1368 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
1369 |
- ) |
1370 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
1371 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
1372 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
1373 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
1374 |
-" |
1375 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
1376 |
- sys-devel/bison |
1377 |
- sys-devel/flex |
1378 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1379 |
-" |
1380 |
- |
1381 |
-S="${WORKDIR}/${MY_P}" |
1382 |
-EGIT_CHECKOUT_DIR=${S} |
1383 |
- |
1384 |
-QA_WX_LOAD=" |
1385 |
-x86? ( |
1386 |
- !pic? ( |
1387 |
- usr/lib*/libglapi.so.0.0.0 |
1388 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
1389 |
- usr/lib*/libGLESv2.so.2.0.0 |
1390 |
- usr/lib*/libGL.so.1.2.0 |
1391 |
- usr/lib*/libOSMesa.so.8.0.0 |
1392 |
- ) |
1393 |
-)" |
1394 |
- |
1395 |
-pkg_setup() { |
1396 |
- # warning message for bug 459306 |
1397 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
1398 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
1399 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
1400 |
- fi |
1401 |
- |
1402 |
- if use llvm || use opencl; then |
1403 |
- LLVM_MAX_SLOT=4 llvm_pkg_setup |
1404 |
- fi |
1405 |
- python-any-r1_pkg_setup |
1406 |
-} |
1407 |
- |
1408 |
-src_prepare() { |
1409 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
1410 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
1411 |
- |
1412 |
- eautoreconf |
1413 |
- |
1414 |
- eapply_user |
1415 |
-} |
1416 |
- |
1417 |
-multilib_src_configure() { |
1418 |
- local myconf |
1419 |
- |
1420 |
- if use classic; then |
1421 |
- # Configurable DRI drivers |
1422 |
- driver_enable swrast |
1423 |
- |
1424 |
- # Intel code |
1425 |
- driver_enable video_cards_i915 i915 |
1426 |
- driver_enable video_cards_i965 i965 |
1427 |
- if ! use video_cards_i915 && \ |
1428 |
- ! use video_cards_i965; then |
1429 |
- driver_enable video_cards_intel i915 i965 |
1430 |
- fi |
1431 |
- |
1432 |
- # Nouveau code |
1433 |
- driver_enable video_cards_nouveau nouveau |
1434 |
- |
1435 |
- # ATI code |
1436 |
- driver_enable video_cards_r100 radeon |
1437 |
- driver_enable video_cards_r200 r200 |
1438 |
- if ! use video_cards_r100 && \ |
1439 |
- ! use video_cards_r200; then |
1440 |
- driver_enable video_cards_radeon radeon r200 |
1441 |
- fi |
1442 |
- fi |
1443 |
- |
1444 |
- if use egl; then |
1445 |
- myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
1446 |
- fi |
1447 |
- |
1448 |
- if use gallium; then |
1449 |
- myconf+=" |
1450 |
- $(use_enable d3d9 nine) |
1451 |
- $(use_enable llvm gallium-llvm) |
1452 |
- $(use_enable openmax omx) |
1453 |
- $(use_enable vaapi va) |
1454 |
- $(use_enable vdpau) |
1455 |
- $(use_enable xa) |
1456 |
- $(use_enable xvmc) |
1457 |
- " |
1458 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
1459 |
- |
1460 |
- gallium_enable swrast |
1461 |
- gallium_enable video_cards_vc4 vc4 |
1462 |
- gallium_enable video_cards_vivante etnaviv |
1463 |
- gallium_enable video_cards_vmware svga |
1464 |
- gallium_enable video_cards_nouveau nouveau |
1465 |
- gallium_enable video_cards_i915 i915 |
1466 |
- gallium_enable video_cards_imx imx |
1467 |
- if ! use video_cards_i915 && \ |
1468 |
- ! use video_cards_i965; then |
1469 |
- gallium_enable video_cards_intel i915 |
1470 |
- fi |
1471 |
- |
1472 |
- gallium_enable video_cards_r300 r300 |
1473 |
- gallium_enable video_cards_r600 r600 |
1474 |
- gallium_enable video_cards_radeonsi radeonsi |
1475 |
- if ! use video_cards_r300 && \ |
1476 |
- ! use video_cards_r600; then |
1477 |
- gallium_enable video_cards_radeon r300 r600 |
1478 |
- fi |
1479 |
- |
1480 |
- gallium_enable video_cards_freedreno freedreno |
1481 |
- # opencl stuff |
1482 |
- if use opencl; then |
1483 |
- myconf+=" |
1484 |
- $(use_enable opencl) |
1485 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
1486 |
- " |
1487 |
- fi |
1488 |
- fi |
1489 |
- |
1490 |
- if use vulkan; then |
1491 |
- vulkan_enable video_cards_i965 intel |
1492 |
- vulkan_enable video_cards_radeonsi radeon |
1493 |
- fi |
1494 |
- |
1495 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
1496 |
- if [[ ${ABI} == x86 ]]; then |
1497 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
1498 |
- fi |
1499 |
- |
1500 |
- # on abi_x86_32 hardened we need to have asm disable |
1501 |
- if [[ ${ABI} == x86* ]] && use pic; then |
1502 |
- myconf+=" --disable-asm" |
1503 |
- fi |
1504 |
- |
1505 |
- if use gallium; then |
1506 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
1507 |
- else |
1508 |
- myconf+=" $(use_enable osmesa)" |
1509 |
- fi |
1510 |
- |
1511 |
- # build fails with BSD indent, bug #428112 |
1512 |
- use userland_GNU || export INDENT=cat |
1513 |
- |
1514 |
- ECONF_SOURCE="${S}" \ |
1515 |
- econf \ |
1516 |
- --enable-dri \ |
1517 |
- --enable-glx \ |
1518 |
- --enable-shared-glapi \ |
1519 |
- $(use_enable !bindist texture-float) \ |
1520 |
- $(use_enable d3d9 nine) \ |
1521 |
- $(use_enable debug) \ |
1522 |
- $(use_enable dri3) \ |
1523 |
- $(use_enable egl) \ |
1524 |
- $(use_enable gbm) \ |
1525 |
- $(use_enable gles1) \ |
1526 |
- $(use_enable gles2) \ |
1527 |
- $(use_enable nptl glx-tls) \ |
1528 |
- --enable-valgrind=$(usex valgrind auto no) \ |
1529 |
- --enable-llvm-shared-libs \ |
1530 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
1531 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
1532 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
1533 |
- PYTHON2="${PYTHON}" \ |
1534 |
- ${myconf} |
1535 |
-} |
1536 |
- |
1537 |
-multilib_src_install() { |
1538 |
- emake install DESTDIR="${D}" |
1539 |
- |
1540 |
- if use classic || use gallium; then |
1541 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
1542 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
1543 |
- keepdir /usr/$(get_libdir)/dri |
1544 |
- dodir /usr/$(get_libdir)/mesa |
1545 |
- for x in ${gallium_drivers[@]}; do |
1546 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
1547 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
1548 |
- || die "Failed to move ${x}" |
1549 |
- fi |
1550 |
- done |
1551 |
- if use classic; then |
1552 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
1553 |
- fi |
1554 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
1555 |
- if [ -f ${x} -o -L ${x} ]; then |
1556 |
- mv -f "${x}" "${x/dri/mesa}" \ |
1557 |
- || die "Failed to move ${x}" |
1558 |
- fi |
1559 |
- done |
1560 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
1561 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
1562 |
- # remove symlinks to drivers known to eselect |
1563 |
- for x in ${gallium_drivers[@]}; do |
1564 |
- if [ -f ${x} -o -L ${x} ]; then |
1565 |
- rm "${x}" || die "Failed to remove ${x}" |
1566 |
- fi |
1567 |
- done |
1568 |
- popd |
1569 |
- eend $? |
1570 |
- fi |
1571 |
- if use opencl; then |
1572 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
1573 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
1574 |
- dodir ${cl_dir}/{lib,include} |
1575 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
1576 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
1577 |
- "${ED}"${cl_dir} |
1578 |
- fi |
1579 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
1580 |
- mv -f "${ED}"/usr/include/CL \ |
1581 |
- "${ED}"${cl_dir}/include |
1582 |
- fi |
1583 |
- eend $? |
1584 |
- fi |
1585 |
- |
1586 |
- if use openmax; then |
1587 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
1588 |
- doenvd "${T}"/99mesaxdgomx |
1589 |
- keepdir /usr/share/mesa/xdg |
1590 |
- fi |
1591 |
-} |
1592 |
- |
1593 |
-multilib_src_install_all() { |
1594 |
- find "${ED}" -name '*.la' -delete |
1595 |
- einstalldocs |
1596 |
- |
1597 |
- if use !bindist; then |
1598 |
- dodoc docs/patents.txt |
1599 |
- fi |
1600 |
- |
1601 |
- # Install config file for eselect mesa |
1602 |
- insinto /usr/share/mesa |
1603 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
1604 |
-} |
1605 |
- |
1606 |
-multilib_src_test() { |
1607 |
- if use llvm; then |
1608 |
- 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' |
1609 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
1610 |
- emake ${llvm_tests} |
1611 |
- pax-mark m ${llvm_tests} |
1612 |
- popd >/dev/null || die |
1613 |
- fi |
1614 |
- emake check |
1615 |
-} |
1616 |
- |
1617 |
-pkg_postinst() { |
1618 |
- # Switch to the xorg implementation. |
1619 |
- echo |
1620 |
- eselect opengl set --use-old ${OPENGL_DIR} |
1621 |
- |
1622 |
- # Select classic/gallium drivers |
1623 |
- if use classic || use gallium; then |
1624 |
- eselect mesa set --auto |
1625 |
- fi |
1626 |
- |
1627 |
- # Switch to mesa opencl |
1628 |
- if use opencl; then |
1629 |
- eselect opencl set --use-old ${PN} |
1630 |
- fi |
1631 |
- |
1632 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
1633 |
- if use openmax; then |
1634 |
- ebegin "Registering OpenMAX drivers" |
1635 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
1636 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
1637 |
- omxregister-bellagio |
1638 |
- eend $? |
1639 |
- fi |
1640 |
- |
1641 |
- # warn about patent encumbered texture-float |
1642 |
- if use !bindist; then |
1643 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
1644 |
- elog "enabled. Please see patents.txt for an explanation." |
1645 |
- fi |
1646 |
- |
1647 |
- if ! has_version media-libs/libtxc_dxtn; then |
1648 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
1649 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
1650 |
- elog "textures in some apps, and some others even require this to run." |
1651 |
- fi |
1652 |
-} |
1653 |
- |
1654 |
-pkg_prerm() { |
1655 |
- if use openmax; then |
1656 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1657 |
- fi |
1658 |
-} |
1659 |
- |
1660 |
-# $1 - VIDEO_CARDS flag |
1661 |
-# other args - names of DRI drivers to enable |
1662 |
-# TODO: avoid code duplication for a more elegant implementation |
1663 |
-driver_enable() { |
1664 |
- case $# in |
1665 |
- # for enabling unconditionally |
1666 |
- 1) |
1667 |
- DRI_DRIVERS+=",$1" |
1668 |
- ;; |
1669 |
- *) |
1670 |
- if use $1; then |
1671 |
- shift |
1672 |
- for i in $@; do |
1673 |
- DRI_DRIVERS+=",${i}" |
1674 |
- done |
1675 |
- fi |
1676 |
- ;; |
1677 |
- esac |
1678 |
-} |
1679 |
- |
1680 |
-gallium_enable() { |
1681 |
- case $# in |
1682 |
- # for enabling unconditionally |
1683 |
- 1) |
1684 |
- GALLIUM_DRIVERS+=",$1" |
1685 |
- ;; |
1686 |
- *) |
1687 |
- if use $1; then |
1688 |
- shift |
1689 |
- for i in $@; do |
1690 |
- GALLIUM_DRIVERS+=",${i}" |
1691 |
- done |
1692 |
- fi |
1693 |
- ;; |
1694 |
- esac |
1695 |
-} |
1696 |
- |
1697 |
-vulkan_enable() { |
1698 |
- case $# in |
1699 |
- # for enabling unconditionally |
1700 |
- 1) |
1701 |
- VULKAN_DRIVERS+=",$1" |
1702 |
- ;; |
1703 |
- *) |
1704 |
- if use $1; then |
1705 |
- shift |
1706 |
- for i in $@; do |
1707 |
- VULKAN_DRIVERS+=",${i}" |
1708 |
- done |
1709 |
- fi |
1710 |
- ;; |
1711 |
- esac |
1712 |
-} |
1713 |
|
1714 |
diff --git a/media-libs/mesa/mesa-17.1.10.ebuild b/media-libs/mesa/mesa-17.1.10.ebuild |
1715 |
index 89c42db..de69592 100644 |
1716 |
--- a/media-libs/mesa/mesa-17.1.10.ebuild |
1717 |
+++ b/media-libs/mesa/mesa-17.1.10.ebuild |
1718 |
@@ -25,7 +25,7 @@ if [[ $PV == 9999 ]]; then |
1719 |
SRC_URI="" |
1720 |
else |
1721 |
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
1722 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1723 |
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1724 |
fi |
1725 |
|
1726 |
LICENSE="MIT" |
1727 |
|
1728 |
diff --git a/media-libs/mesa/mesa-17.1.8.ebuild b/media-libs/mesa/mesa-17.1.8.ebuild |
1729 |
deleted file mode 100644 |
1730 |
index c568579..0000000 |
1731 |
--- a/media-libs/mesa/mesa-17.1.8.ebuild |
1732 |
+++ /dev/null |
1733 |
@@ -1,507 +0,0 @@ |
1734 |
-# Copyright 1999-2017 Gentoo Foundation |
1735 |
-# Distributed under the terms of the GNU General Public License v2 |
1736 |
- |
1737 |
-EAPI=6 |
1738 |
- |
1739 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
1740 |
- |
1741 |
-if [[ ${PV} = 9999 ]]; then |
1742 |
- GIT_ECLASS="git-r3" |
1743 |
- EXPERIMENTAL="true" |
1744 |
-fi |
1745 |
- |
1746 |
-PYTHON_COMPAT=( python2_7 ) |
1747 |
- |
1748 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
1749 |
- |
1750 |
-OPENGL_DIR="xorg-x11" |
1751 |
- |
1752 |
-MY_P="${P/_/-}" |
1753 |
- |
1754 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
1755 |
-HOMEPAGE="https://www.mesa3d.org/" |
1756 |
- |
1757 |
-if [[ $PV == 9999 ]]; then |
1758 |
- SRC_URI="" |
1759 |
-else |
1760 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
1761 |
- KEYWORDS="alpha ~amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1762 |
-fi |
1763 |
- |
1764 |
-LICENSE="MIT" |
1765 |
-SLOT="0" |
1766 |
-RESTRICT="!bindist? ( bindist )" |
1767 |
- |
1768 |
-INTEL_CARDS="i915 i965 intel" |
1769 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
1770 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
1771 |
-for card in ${VIDEO_CARDS}; do |
1772 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
1773 |
-done |
1774 |
- |
1775 |
-IUSE="${IUSE_VIDEO_CARDS} |
1776 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
1777 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
1778 |
- vdpau vulkan wayland xvmc xa" |
1779 |
- |
1780 |
-REQUIRED_USE=" |
1781 |
- d3d9? ( dri3 gallium ) |
1782 |
- llvm? ( gallium ) |
1783 |
- opencl? ( gallium llvm ) |
1784 |
- openmax? ( gallium ) |
1785 |
- gles1? ( egl ) |
1786 |
- gles2? ( egl ) |
1787 |
- vaapi? ( gallium ) |
1788 |
- vdpau? ( gallium ) |
1789 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
1790 |
- video_cards_radeonsi? ( llvm ) ) |
1791 |
- wayland? ( egl gbm ) |
1792 |
- xa? ( gallium ) |
1793 |
- video_cards_freedreno? ( gallium ) |
1794 |
- video_cards_intel? ( classic ) |
1795 |
- video_cards_i915? ( || ( classic gallium ) ) |
1796 |
- video_cards_i965? ( classic ) |
1797 |
- video_cards_imx? ( gallium ) |
1798 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
1799 |
- video_cards_radeon? ( || ( classic gallium ) |
1800 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
1801 |
- video_cards_r100? ( classic ) |
1802 |
- video_cards_r200? ( classic ) |
1803 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
1804 |
- video_cards_r600? ( gallium ) |
1805 |
- video_cards_radeonsi? ( gallium llvm ) |
1806 |
- video_cards_vc4? ( gallium ) |
1807 |
- video_cards_vivante? ( gallium gbm ) |
1808 |
- video_cards_vmware? ( gallium ) |
1809 |
-" |
1810 |
- |
1811 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.77" |
1812 |
-# keep correct libdrm and dri2proto dep |
1813 |
-# keep blocks in rdepend for binpkg |
1814 |
-RDEPEND=" |
1815 |
- !<x11-base/xorg-server-1.7 |
1816 |
- !<=x11-proto/xf86driproto-2.0.3 |
1817 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
1818 |
- classic? ( app-eselect/eselect-mesa ) |
1819 |
- gallium? ( app-eselect/eselect-mesa ) |
1820 |
- >=app-eselect/eselect-opengl-1.3.0 |
1821 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
1822 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
1823 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
1824 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
1825 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
1826 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
1827 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
1828 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
1829 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
1830 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
1831 |
- llvm? ( |
1832 |
- video_cards_radeonsi? ( |
1833 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1834 |
- vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] ) |
1835 |
- ) |
1836 |
- video_cards_r600? ( |
1837 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1838 |
- ) |
1839 |
- video_cards_radeon? ( |
1840 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1841 |
- ) |
1842 |
- >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
1843 |
- ) |
1844 |
- opencl? ( |
1845 |
- app-eselect/eselect-opencl |
1846 |
- dev-libs/libclc |
1847 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1848 |
- ) |
1849 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
1850 |
- vaapi? ( |
1851 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
1852 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
1853 |
- ) |
1854 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
1855 |
- wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] ) |
1856 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
1857 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
1858 |
-" |
1859 |
-for card in ${INTEL_CARDS}; do |
1860 |
- RDEPEND="${RDEPEND} |
1861 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1862 |
- " |
1863 |
-done |
1864 |
- |
1865 |
-for card in ${RADEON_CARDS}; do |
1866 |
- RDEPEND="${RDEPEND} |
1867 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
1868 |
- " |
1869 |
-done |
1870 |
-RDEPEND="${RDEPEND} |
1871 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
1872 |
-" |
1873 |
- |
1874 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
1875 |
-# LLVM < 3.9 is out of the game |
1876 |
-DEPEND="${RDEPEND} |
1877 |
- ${PYTHON_DEPS} |
1878 |
- llvm? ( |
1879 |
- video_cards_radeonsi? ( || ( |
1880 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
1881 |
- sys-devel/llvm[video_cards_radeon] |
1882 |
- ) ) |
1883 |
- ) |
1884 |
- opencl? ( |
1885 |
- >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
1886 |
- >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}] |
1887 |
- >=sys-devel/gcc-4.6 |
1888 |
- ) |
1889 |
- sys-devel/gettext |
1890 |
- virtual/pkgconfig |
1891 |
- valgrind? ( dev-util/valgrind ) |
1892 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
1893 |
- dri3? ( |
1894 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
1895 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
1896 |
- ) |
1897 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
1898 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
1899 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
1900 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
1901 |
-" |
1902 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
1903 |
- sys-devel/bison |
1904 |
- sys-devel/flex |
1905 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1906 |
-" |
1907 |
- |
1908 |
-S="${WORKDIR}/${MY_P}" |
1909 |
-EGIT_CHECKOUT_DIR=${S} |
1910 |
- |
1911 |
-QA_WX_LOAD=" |
1912 |
-x86? ( |
1913 |
- !pic? ( |
1914 |
- usr/lib*/libglapi.so.0.0.0 |
1915 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
1916 |
- usr/lib*/libGLESv2.so.2.0.0 |
1917 |
- usr/lib*/libGL.so.1.2.0 |
1918 |
- usr/lib*/libOSMesa.so.8.0.0 |
1919 |
- ) |
1920 |
-)" |
1921 |
- |
1922 |
-pkg_setup() { |
1923 |
- # warning message for bug 459306 |
1924 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
1925 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
1926 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
1927 |
- fi |
1928 |
- |
1929 |
- if use llvm || use opencl; then |
1930 |
- llvm_pkg_setup |
1931 |
- fi |
1932 |
- python-any-r1_pkg_setup |
1933 |
-} |
1934 |
- |
1935 |
-src_prepare() { |
1936 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
1937 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
1938 |
- |
1939 |
- eautoreconf |
1940 |
- |
1941 |
- eapply_user |
1942 |
-} |
1943 |
- |
1944 |
-multilib_src_configure() { |
1945 |
- local myconf |
1946 |
- |
1947 |
- if use classic; then |
1948 |
- # Configurable DRI drivers |
1949 |
- driver_enable swrast |
1950 |
- |
1951 |
- # Intel code |
1952 |
- driver_enable video_cards_i915 i915 |
1953 |
- driver_enable video_cards_i965 i965 |
1954 |
- if ! use video_cards_i915 && \ |
1955 |
- ! use video_cards_i965; then |
1956 |
- driver_enable video_cards_intel i915 i965 |
1957 |
- fi |
1958 |
- |
1959 |
- # Nouveau code |
1960 |
- driver_enable video_cards_nouveau nouveau |
1961 |
- |
1962 |
- # ATI code |
1963 |
- driver_enable video_cards_r100 radeon |
1964 |
- driver_enable video_cards_r200 r200 |
1965 |
- if ! use video_cards_r100 && \ |
1966 |
- ! use video_cards_r200; then |
1967 |
- driver_enable video_cards_radeon radeon r200 |
1968 |
- fi |
1969 |
- fi |
1970 |
- |
1971 |
- if use egl; then |
1972 |
- myconf+=" --with-egl-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
1973 |
- fi |
1974 |
- |
1975 |
- if use gallium; then |
1976 |
- myconf+=" |
1977 |
- $(use_enable d3d9 nine) |
1978 |
- $(use_enable llvm) |
1979 |
- $(use_enable openmax omx) |
1980 |
- $(use_enable vaapi va) |
1981 |
- $(use_enable vdpau) |
1982 |
- $(use_enable xa) |
1983 |
- $(use_enable xvmc) |
1984 |
- " |
1985 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
1986 |
- |
1987 |
- gallium_enable swrast |
1988 |
- gallium_enable video_cards_vc4 vc4 |
1989 |
- gallium_enable video_cards_vivante etnaviv |
1990 |
- gallium_enable video_cards_vmware svga |
1991 |
- gallium_enable video_cards_nouveau nouveau |
1992 |
- gallium_enable video_cards_i915 i915 |
1993 |
- gallium_enable video_cards_imx imx |
1994 |
- if ! use video_cards_i915 && \ |
1995 |
- ! use video_cards_i965; then |
1996 |
- gallium_enable video_cards_intel i915 |
1997 |
- fi |
1998 |
- |
1999 |
- gallium_enable video_cards_r300 r300 |
2000 |
- gallium_enable video_cards_r600 r600 |
2001 |
- gallium_enable video_cards_radeonsi radeonsi |
2002 |
- if ! use video_cards_r300 && \ |
2003 |
- ! use video_cards_r600; then |
2004 |
- gallium_enable video_cards_radeon r300 r600 |
2005 |
- fi |
2006 |
- |
2007 |
- gallium_enable video_cards_freedreno freedreno |
2008 |
- # opencl stuff |
2009 |
- if use opencl; then |
2010 |
- myconf+=" |
2011 |
- $(use_enable opencl) |
2012 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
2013 |
- " |
2014 |
- fi |
2015 |
- fi |
2016 |
- |
2017 |
- if use vulkan; then |
2018 |
- vulkan_enable video_cards_i965 intel |
2019 |
- vulkan_enable video_cards_radeonsi radeon |
2020 |
- fi |
2021 |
- |
2022 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
2023 |
- if [[ ${ABI} == x86 ]]; then |
2024 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
2025 |
- fi |
2026 |
- |
2027 |
- # on abi_x86_32 hardened we need to have asm disable |
2028 |
- if [[ ${ABI} == x86* ]] && use pic; then |
2029 |
- myconf+=" --disable-asm" |
2030 |
- fi |
2031 |
- |
2032 |
- if use gallium; then |
2033 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
2034 |
- else |
2035 |
- myconf+=" $(use_enable osmesa)" |
2036 |
- fi |
2037 |
- |
2038 |
- # build fails with BSD indent, bug #428112 |
2039 |
- use userland_GNU || export INDENT=cat |
2040 |
- |
2041 |
- ECONF_SOURCE="${S}" \ |
2042 |
- econf \ |
2043 |
- --enable-dri \ |
2044 |
- --enable-glx \ |
2045 |
- --enable-shared-glapi \ |
2046 |
- $(use_enable !bindist texture-float) \ |
2047 |
- $(use_enable d3d9 nine) \ |
2048 |
- $(use_enable debug) \ |
2049 |
- $(use_enable dri3) \ |
2050 |
- $(use_enable egl) \ |
2051 |
- $(use_enable gbm) \ |
2052 |
- $(use_enable gles1) \ |
2053 |
- $(use_enable gles2) \ |
2054 |
- $(use_enable nptl glx-tls) \ |
2055 |
- $(use_enable unwind libunwind) \ |
2056 |
- --enable-valgrind=$(usex valgrind auto no) \ |
2057 |
- --enable-llvm-shared-libs \ |
2058 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
2059 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
2060 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
2061 |
- PYTHON2="${PYTHON}" \ |
2062 |
- ${myconf} |
2063 |
-} |
2064 |
- |
2065 |
-multilib_src_install() { |
2066 |
- emake install DESTDIR="${D}" |
2067 |
- |
2068 |
- if use classic || use gallium; then |
2069 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
2070 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
2071 |
- keepdir /usr/$(get_libdir)/dri |
2072 |
- dodir /usr/$(get_libdir)/mesa |
2073 |
- for x in ${gallium_drivers[@]}; do |
2074 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
2075 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
2076 |
- || die "Failed to move ${x}" |
2077 |
- fi |
2078 |
- done |
2079 |
- if use classic; then |
2080 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
2081 |
- fi |
2082 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
2083 |
- if [ -f ${x} -o -L ${x} ]; then |
2084 |
- mv -f "${x}" "${x/dri/mesa}" \ |
2085 |
- || die "Failed to move ${x}" |
2086 |
- fi |
2087 |
- done |
2088 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
2089 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
2090 |
- # remove symlinks to drivers known to eselect |
2091 |
- for x in ${gallium_drivers[@]}; do |
2092 |
- if [ -f ${x} -o -L ${x} ]; then |
2093 |
- rm "${x}" || die "Failed to remove ${x}" |
2094 |
- fi |
2095 |
- done |
2096 |
- popd |
2097 |
- eend $? |
2098 |
- fi |
2099 |
- if use opencl; then |
2100 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
2101 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
2102 |
- dodir ${cl_dir}/{lib,include} |
2103 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
2104 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
2105 |
- "${ED}"${cl_dir} |
2106 |
- fi |
2107 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
2108 |
- mv -f "${ED}"/usr/include/CL \ |
2109 |
- "${ED}"${cl_dir}/include |
2110 |
- fi |
2111 |
- eend $? |
2112 |
- fi |
2113 |
- |
2114 |
- if use openmax; then |
2115 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
2116 |
- doenvd "${T}"/99mesaxdgomx |
2117 |
- keepdir /usr/share/mesa/xdg |
2118 |
- fi |
2119 |
-} |
2120 |
- |
2121 |
-multilib_src_install_all() { |
2122 |
- find "${ED}" -name '*.la' -delete |
2123 |
- einstalldocs |
2124 |
- |
2125 |
- if use !bindist; then |
2126 |
- dodoc docs/patents.txt |
2127 |
- fi |
2128 |
- |
2129 |
- # Install config file for eselect mesa |
2130 |
- insinto /usr/share/mesa |
2131 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
2132 |
-} |
2133 |
- |
2134 |
-multilib_src_test() { |
2135 |
- if use llvm; then |
2136 |
- 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' |
2137 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
2138 |
- emake ${llvm_tests} |
2139 |
- pax-mark m ${llvm_tests} |
2140 |
- popd >/dev/null || die |
2141 |
- fi |
2142 |
- emake check |
2143 |
-} |
2144 |
- |
2145 |
-pkg_postinst() { |
2146 |
- # Switch to the xorg implementation. |
2147 |
- echo |
2148 |
- eselect opengl set --use-old ${OPENGL_DIR} |
2149 |
- |
2150 |
- # Select classic/gallium drivers |
2151 |
- if use classic || use gallium; then |
2152 |
- eselect mesa set --auto |
2153 |
- fi |
2154 |
- |
2155 |
- # Switch to mesa opencl |
2156 |
- if use opencl; then |
2157 |
- eselect opencl set --use-old ${PN} |
2158 |
- fi |
2159 |
- |
2160 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
2161 |
- if use openmax; then |
2162 |
- ebegin "Registering OpenMAX drivers" |
2163 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
2164 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
2165 |
- omxregister-bellagio |
2166 |
- eend $? |
2167 |
- fi |
2168 |
- |
2169 |
- # warn about patent encumbered texture-float |
2170 |
- if use !bindist; then |
2171 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
2172 |
- elog "enabled. Please see patents.txt for an explanation." |
2173 |
- fi |
2174 |
- |
2175 |
- if ! has_version media-libs/libtxc_dxtn; then |
2176 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
2177 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
2178 |
- elog "textures in some apps, and some others even require this to run." |
2179 |
- fi |
2180 |
-} |
2181 |
- |
2182 |
-pkg_prerm() { |
2183 |
- if use openmax; then |
2184 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
2185 |
- fi |
2186 |
-} |
2187 |
- |
2188 |
-# $1 - VIDEO_CARDS flag |
2189 |
-# other args - names of DRI drivers to enable |
2190 |
-# TODO: avoid code duplication for a more elegant implementation |
2191 |
-driver_enable() { |
2192 |
- case $# in |
2193 |
- # for enabling unconditionally |
2194 |
- 1) |
2195 |
- DRI_DRIVERS+=",$1" |
2196 |
- ;; |
2197 |
- *) |
2198 |
- if use $1; then |
2199 |
- shift |
2200 |
- for i in $@; do |
2201 |
- DRI_DRIVERS+=",${i}" |
2202 |
- done |
2203 |
- fi |
2204 |
- ;; |
2205 |
- esac |
2206 |
-} |
2207 |
- |
2208 |
-gallium_enable() { |
2209 |
- case $# in |
2210 |
- # for enabling unconditionally |
2211 |
- 1) |
2212 |
- GALLIUM_DRIVERS+=",$1" |
2213 |
- ;; |
2214 |
- *) |
2215 |
- if use $1; then |
2216 |
- shift |
2217 |
- for i in $@; do |
2218 |
- GALLIUM_DRIVERS+=",${i}" |
2219 |
- done |
2220 |
- fi |
2221 |
- ;; |
2222 |
- esac |
2223 |
-} |
2224 |
- |
2225 |
-vulkan_enable() { |
2226 |
- case $# in |
2227 |
- # for enabling unconditionally |
2228 |
- 1) |
2229 |
- VULKAN_DRIVERS+=",$1" |
2230 |
- ;; |
2231 |
- *) |
2232 |
- if use $1; then |
2233 |
- shift |
2234 |
- for i in $@; do |
2235 |
- VULKAN_DRIVERS+=",${i}" |
2236 |
- done |
2237 |
- fi |
2238 |
- ;; |
2239 |
- esac |
2240 |
-} |
2241 |
|
2242 |
diff --git a/media-libs/mesa/mesa-17.1.9.ebuild b/media-libs/mesa/mesa-17.1.9.ebuild |
2243 |
deleted file mode 100644 |
2244 |
index 89c42db..0000000 |
2245 |
--- a/media-libs/mesa/mesa-17.1.9.ebuild |
2246 |
+++ /dev/null |
2247 |
@@ -1,507 +0,0 @@ |
2248 |
-# Copyright 1999-2017 Gentoo Foundation |
2249 |
-# Distributed under the terms of the GNU General Public License v2 |
2250 |
- |
2251 |
-EAPI=6 |
2252 |
- |
2253 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
2254 |
- |
2255 |
-if [[ ${PV} = 9999 ]]; then |
2256 |
- GIT_ECLASS="git-r3" |
2257 |
- EXPERIMENTAL="true" |
2258 |
-fi |
2259 |
- |
2260 |
-PYTHON_COMPAT=( python2_7 ) |
2261 |
- |
2262 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
2263 |
- |
2264 |
-OPENGL_DIR="xorg-x11" |
2265 |
- |
2266 |
-MY_P="${P/_/-}" |
2267 |
- |
2268 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
2269 |
-HOMEPAGE="https://www.mesa3d.org/" |
2270 |
- |
2271 |
-if [[ $PV == 9999 ]]; then |
2272 |
- SRC_URI="" |
2273 |
-else |
2274 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
2275 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
2276 |
-fi |
2277 |
- |
2278 |
-LICENSE="MIT" |
2279 |
-SLOT="0" |
2280 |
-RESTRICT="!bindist? ( bindist )" |
2281 |
- |
2282 |
-INTEL_CARDS="i915 i965 intel" |
2283 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
2284 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
2285 |
-for card in ${VIDEO_CARDS}; do |
2286 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
2287 |
-done |
2288 |
- |
2289 |
-IUSE="${IUSE_VIDEO_CARDS} |
2290 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
2291 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
2292 |
- vdpau vulkan wayland xvmc xa" |
2293 |
- |
2294 |
-REQUIRED_USE=" |
2295 |
- d3d9? ( dri3 gallium ) |
2296 |
- llvm? ( gallium ) |
2297 |
- opencl? ( gallium llvm ) |
2298 |
- openmax? ( gallium ) |
2299 |
- gles1? ( egl ) |
2300 |
- gles2? ( egl ) |
2301 |
- vaapi? ( gallium ) |
2302 |
- vdpau? ( gallium ) |
2303 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
2304 |
- video_cards_radeonsi? ( llvm ) ) |
2305 |
- wayland? ( egl gbm ) |
2306 |
- xa? ( gallium ) |
2307 |
- video_cards_freedreno? ( gallium ) |
2308 |
- video_cards_intel? ( classic ) |
2309 |
- video_cards_i915? ( || ( classic gallium ) ) |
2310 |
- video_cards_i965? ( classic ) |
2311 |
- video_cards_imx? ( gallium ) |
2312 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
2313 |
- video_cards_radeon? ( || ( classic gallium ) |
2314 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
2315 |
- video_cards_r100? ( classic ) |
2316 |
- video_cards_r200? ( classic ) |
2317 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
2318 |
- video_cards_r600? ( gallium ) |
2319 |
- video_cards_radeonsi? ( gallium llvm ) |
2320 |
- video_cards_vc4? ( gallium ) |
2321 |
- video_cards_vivante? ( gallium gbm ) |
2322 |
- video_cards_vmware? ( gallium ) |
2323 |
-" |
2324 |
- |
2325 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.77" |
2326 |
-# keep correct libdrm and dri2proto dep |
2327 |
-# keep blocks in rdepend for binpkg |
2328 |
-RDEPEND=" |
2329 |
- !<x11-base/xorg-server-1.7 |
2330 |
- !<=x11-proto/xf86driproto-2.0.3 |
2331 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
2332 |
- classic? ( app-eselect/eselect-mesa ) |
2333 |
- gallium? ( app-eselect/eselect-mesa ) |
2334 |
- >=app-eselect/eselect-opengl-1.3.0 |
2335 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
2336 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
2337 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
2338 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
2339 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
2340 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
2341 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
2342 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
2343 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
2344 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
2345 |
- llvm? ( |
2346 |
- video_cards_radeonsi? ( |
2347 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2348 |
- vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] ) |
2349 |
- ) |
2350 |
- video_cards_r600? ( |
2351 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2352 |
- ) |
2353 |
- video_cards_radeon? ( |
2354 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2355 |
- ) |
2356 |
- >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
2357 |
- ) |
2358 |
- opencl? ( |
2359 |
- app-eselect/eselect-opencl |
2360 |
- dev-libs/libclc |
2361 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2362 |
- ) |
2363 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
2364 |
- vaapi? ( |
2365 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
2366 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
2367 |
- ) |
2368 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
2369 |
- wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] ) |
2370 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
2371 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
2372 |
-" |
2373 |
-for card in ${INTEL_CARDS}; do |
2374 |
- RDEPEND="${RDEPEND} |
2375 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
2376 |
- " |
2377 |
-done |
2378 |
- |
2379 |
-for card in ${RADEON_CARDS}; do |
2380 |
- RDEPEND="${RDEPEND} |
2381 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
2382 |
- " |
2383 |
-done |
2384 |
-RDEPEND="${RDEPEND} |
2385 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
2386 |
-" |
2387 |
- |
2388 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
2389 |
-# LLVM < 3.9 is out of the game |
2390 |
-DEPEND="${RDEPEND} |
2391 |
- ${PYTHON_DEPS} |
2392 |
- llvm? ( |
2393 |
- video_cards_radeonsi? ( || ( |
2394 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
2395 |
- sys-devel/llvm[video_cards_radeon] |
2396 |
- ) ) |
2397 |
- ) |
2398 |
- opencl? ( |
2399 |
- >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
2400 |
- >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}] |
2401 |
- >=sys-devel/gcc-4.6 |
2402 |
- ) |
2403 |
- sys-devel/gettext |
2404 |
- virtual/pkgconfig |
2405 |
- valgrind? ( dev-util/valgrind ) |
2406 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
2407 |
- dri3? ( |
2408 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
2409 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
2410 |
- ) |
2411 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
2412 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
2413 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
2414 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
2415 |
-" |
2416 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
2417 |
- sys-devel/bison |
2418 |
- sys-devel/flex |
2419 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
2420 |
-" |
2421 |
- |
2422 |
-S="${WORKDIR}/${MY_P}" |
2423 |
-EGIT_CHECKOUT_DIR=${S} |
2424 |
- |
2425 |
-QA_WX_LOAD=" |
2426 |
-x86? ( |
2427 |
- !pic? ( |
2428 |
- usr/lib*/libglapi.so.0.0.0 |
2429 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
2430 |
- usr/lib*/libGLESv2.so.2.0.0 |
2431 |
- usr/lib*/libGL.so.1.2.0 |
2432 |
- usr/lib*/libOSMesa.so.8.0.0 |
2433 |
- ) |
2434 |
-)" |
2435 |
- |
2436 |
-pkg_setup() { |
2437 |
- # warning message for bug 459306 |
2438 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
2439 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
2440 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
2441 |
- fi |
2442 |
- |
2443 |
- if use llvm || use opencl; then |
2444 |
- llvm_pkg_setup |
2445 |
- fi |
2446 |
- python-any-r1_pkg_setup |
2447 |
-} |
2448 |
- |
2449 |
-src_prepare() { |
2450 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
2451 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
2452 |
- |
2453 |
- eautoreconf |
2454 |
- |
2455 |
- eapply_user |
2456 |
-} |
2457 |
- |
2458 |
-multilib_src_configure() { |
2459 |
- local myconf |
2460 |
- |
2461 |
- if use classic; then |
2462 |
- # Configurable DRI drivers |
2463 |
- driver_enable swrast |
2464 |
- |
2465 |
- # Intel code |
2466 |
- driver_enable video_cards_i915 i915 |
2467 |
- driver_enable video_cards_i965 i965 |
2468 |
- if ! use video_cards_i915 && \ |
2469 |
- ! use video_cards_i965; then |
2470 |
- driver_enable video_cards_intel i915 i965 |
2471 |
- fi |
2472 |
- |
2473 |
- # Nouveau code |
2474 |
- driver_enable video_cards_nouveau nouveau |
2475 |
- |
2476 |
- # ATI code |
2477 |
- driver_enable video_cards_r100 radeon |
2478 |
- driver_enable video_cards_r200 r200 |
2479 |
- if ! use video_cards_r100 && \ |
2480 |
- ! use video_cards_r200; then |
2481 |
- driver_enable video_cards_radeon radeon r200 |
2482 |
- fi |
2483 |
- fi |
2484 |
- |
2485 |
- if use egl; then |
2486 |
- myconf+=" --with-egl-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
2487 |
- fi |
2488 |
- |
2489 |
- if use gallium; then |
2490 |
- myconf+=" |
2491 |
- $(use_enable d3d9 nine) |
2492 |
- $(use_enable llvm) |
2493 |
- $(use_enable openmax omx) |
2494 |
- $(use_enable vaapi va) |
2495 |
- $(use_enable vdpau) |
2496 |
- $(use_enable xa) |
2497 |
- $(use_enable xvmc) |
2498 |
- " |
2499 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
2500 |
- |
2501 |
- gallium_enable swrast |
2502 |
- gallium_enable video_cards_vc4 vc4 |
2503 |
- gallium_enable video_cards_vivante etnaviv |
2504 |
- gallium_enable video_cards_vmware svga |
2505 |
- gallium_enable video_cards_nouveau nouveau |
2506 |
- gallium_enable video_cards_i915 i915 |
2507 |
- gallium_enable video_cards_imx imx |
2508 |
- if ! use video_cards_i915 && \ |
2509 |
- ! use video_cards_i965; then |
2510 |
- gallium_enable video_cards_intel i915 |
2511 |
- fi |
2512 |
- |
2513 |
- gallium_enable video_cards_r300 r300 |
2514 |
- gallium_enable video_cards_r600 r600 |
2515 |
- gallium_enable video_cards_radeonsi radeonsi |
2516 |
- if ! use video_cards_r300 && \ |
2517 |
- ! use video_cards_r600; then |
2518 |
- gallium_enable video_cards_radeon r300 r600 |
2519 |
- fi |
2520 |
- |
2521 |
- gallium_enable video_cards_freedreno freedreno |
2522 |
- # opencl stuff |
2523 |
- if use opencl; then |
2524 |
- myconf+=" |
2525 |
- $(use_enable opencl) |
2526 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
2527 |
- " |
2528 |
- fi |
2529 |
- fi |
2530 |
- |
2531 |
- if use vulkan; then |
2532 |
- vulkan_enable video_cards_i965 intel |
2533 |
- vulkan_enable video_cards_radeonsi radeon |
2534 |
- fi |
2535 |
- |
2536 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
2537 |
- if [[ ${ABI} == x86 ]]; then |
2538 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
2539 |
- fi |
2540 |
- |
2541 |
- # on abi_x86_32 hardened we need to have asm disable |
2542 |
- if [[ ${ABI} == x86* ]] && use pic; then |
2543 |
- myconf+=" --disable-asm" |
2544 |
- fi |
2545 |
- |
2546 |
- if use gallium; then |
2547 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
2548 |
- else |
2549 |
- myconf+=" $(use_enable osmesa)" |
2550 |
- fi |
2551 |
- |
2552 |
- # build fails with BSD indent, bug #428112 |
2553 |
- use userland_GNU || export INDENT=cat |
2554 |
- |
2555 |
- ECONF_SOURCE="${S}" \ |
2556 |
- econf \ |
2557 |
- --enable-dri \ |
2558 |
- --enable-glx \ |
2559 |
- --enable-shared-glapi \ |
2560 |
- $(use_enable !bindist texture-float) \ |
2561 |
- $(use_enable d3d9 nine) \ |
2562 |
- $(use_enable debug) \ |
2563 |
- $(use_enable dri3) \ |
2564 |
- $(use_enable egl) \ |
2565 |
- $(use_enable gbm) \ |
2566 |
- $(use_enable gles1) \ |
2567 |
- $(use_enable gles2) \ |
2568 |
- $(use_enable nptl glx-tls) \ |
2569 |
- $(use_enable unwind libunwind) \ |
2570 |
- --enable-valgrind=$(usex valgrind auto no) \ |
2571 |
- --enable-llvm-shared-libs \ |
2572 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
2573 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
2574 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
2575 |
- PYTHON2="${PYTHON}" \ |
2576 |
- ${myconf} |
2577 |
-} |
2578 |
- |
2579 |
-multilib_src_install() { |
2580 |
- emake install DESTDIR="${D}" |
2581 |
- |
2582 |
- if use classic || use gallium; then |
2583 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
2584 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
2585 |
- keepdir /usr/$(get_libdir)/dri |
2586 |
- dodir /usr/$(get_libdir)/mesa |
2587 |
- for x in ${gallium_drivers[@]}; do |
2588 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
2589 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
2590 |
- || die "Failed to move ${x}" |
2591 |
- fi |
2592 |
- done |
2593 |
- if use classic; then |
2594 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
2595 |
- fi |
2596 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
2597 |
- if [ -f ${x} -o -L ${x} ]; then |
2598 |
- mv -f "${x}" "${x/dri/mesa}" \ |
2599 |
- || die "Failed to move ${x}" |
2600 |
- fi |
2601 |
- done |
2602 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
2603 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
2604 |
- # remove symlinks to drivers known to eselect |
2605 |
- for x in ${gallium_drivers[@]}; do |
2606 |
- if [ -f ${x} -o -L ${x} ]; then |
2607 |
- rm "${x}" || die "Failed to remove ${x}" |
2608 |
- fi |
2609 |
- done |
2610 |
- popd |
2611 |
- eend $? |
2612 |
- fi |
2613 |
- if use opencl; then |
2614 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
2615 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
2616 |
- dodir ${cl_dir}/{lib,include} |
2617 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
2618 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
2619 |
- "${ED}"${cl_dir} |
2620 |
- fi |
2621 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
2622 |
- mv -f "${ED}"/usr/include/CL \ |
2623 |
- "${ED}"${cl_dir}/include |
2624 |
- fi |
2625 |
- eend $? |
2626 |
- fi |
2627 |
- |
2628 |
- if use openmax; then |
2629 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
2630 |
- doenvd "${T}"/99mesaxdgomx |
2631 |
- keepdir /usr/share/mesa/xdg |
2632 |
- fi |
2633 |
-} |
2634 |
- |
2635 |
-multilib_src_install_all() { |
2636 |
- find "${ED}" -name '*.la' -delete |
2637 |
- einstalldocs |
2638 |
- |
2639 |
- if use !bindist; then |
2640 |
- dodoc docs/patents.txt |
2641 |
- fi |
2642 |
- |
2643 |
- # Install config file for eselect mesa |
2644 |
- insinto /usr/share/mesa |
2645 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
2646 |
-} |
2647 |
- |
2648 |
-multilib_src_test() { |
2649 |
- if use llvm; then |
2650 |
- 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' |
2651 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
2652 |
- emake ${llvm_tests} |
2653 |
- pax-mark m ${llvm_tests} |
2654 |
- popd >/dev/null || die |
2655 |
- fi |
2656 |
- emake check |
2657 |
-} |
2658 |
- |
2659 |
-pkg_postinst() { |
2660 |
- # Switch to the xorg implementation. |
2661 |
- echo |
2662 |
- eselect opengl set --use-old ${OPENGL_DIR} |
2663 |
- |
2664 |
- # Select classic/gallium drivers |
2665 |
- if use classic || use gallium; then |
2666 |
- eselect mesa set --auto |
2667 |
- fi |
2668 |
- |
2669 |
- # Switch to mesa opencl |
2670 |
- if use opencl; then |
2671 |
- eselect opencl set --use-old ${PN} |
2672 |
- fi |
2673 |
- |
2674 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
2675 |
- if use openmax; then |
2676 |
- ebegin "Registering OpenMAX drivers" |
2677 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
2678 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
2679 |
- omxregister-bellagio |
2680 |
- eend $? |
2681 |
- fi |
2682 |
- |
2683 |
- # warn about patent encumbered texture-float |
2684 |
- if use !bindist; then |
2685 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
2686 |
- elog "enabled. Please see patents.txt for an explanation." |
2687 |
- fi |
2688 |
- |
2689 |
- if ! has_version media-libs/libtxc_dxtn; then |
2690 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
2691 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
2692 |
- elog "textures in some apps, and some others even require this to run." |
2693 |
- fi |
2694 |
-} |
2695 |
- |
2696 |
-pkg_prerm() { |
2697 |
- if use openmax; then |
2698 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
2699 |
- fi |
2700 |
-} |
2701 |
- |
2702 |
-# $1 - VIDEO_CARDS flag |
2703 |
-# other args - names of DRI drivers to enable |
2704 |
-# TODO: avoid code duplication for a more elegant implementation |
2705 |
-driver_enable() { |
2706 |
- case $# in |
2707 |
- # for enabling unconditionally |
2708 |
- 1) |
2709 |
- DRI_DRIVERS+=",$1" |
2710 |
- ;; |
2711 |
- *) |
2712 |
- if use $1; then |
2713 |
- shift |
2714 |
- for i in $@; do |
2715 |
- DRI_DRIVERS+=",${i}" |
2716 |
- done |
2717 |
- fi |
2718 |
- ;; |
2719 |
- esac |
2720 |
-} |
2721 |
- |
2722 |
-gallium_enable() { |
2723 |
- case $# in |
2724 |
- # for enabling unconditionally |
2725 |
- 1) |
2726 |
- GALLIUM_DRIVERS+=",$1" |
2727 |
- ;; |
2728 |
- *) |
2729 |
- if use $1; then |
2730 |
- shift |
2731 |
- for i in $@; do |
2732 |
- GALLIUM_DRIVERS+=",${i}" |
2733 |
- done |
2734 |
- fi |
2735 |
- ;; |
2736 |
- esac |
2737 |
-} |
2738 |
- |
2739 |
-vulkan_enable() { |
2740 |
- case $# in |
2741 |
- # for enabling unconditionally |
2742 |
- 1) |
2743 |
- VULKAN_DRIVERS+=",$1" |
2744 |
- ;; |
2745 |
- *) |
2746 |
- if use $1; then |
2747 |
- shift |
2748 |
- for i in $@; do |
2749 |
- VULKAN_DRIVERS+=",${i}" |
2750 |
- done |
2751 |
- fi |
2752 |
- ;; |
2753 |
- esac |
2754 |
-} |
2755 |
|
2756 |
diff --git a/media-libs/mesa/mesa-17.2.0.ebuild b/media-libs/mesa/mesa-17.2.0.ebuild |
2757 |
deleted file mode 100644 |
2758 |
index 84b26ef..0000000 |
2759 |
--- a/media-libs/mesa/mesa-17.2.0.ebuild |
2760 |
+++ /dev/null |
2761 |
@@ -1,508 +0,0 @@ |
2762 |
-# Copyright 1999-2017 Gentoo Foundation |
2763 |
-# Distributed under the terms of the GNU General Public License v2 |
2764 |
- |
2765 |
-EAPI=6 |
2766 |
- |
2767 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
2768 |
- |
2769 |
-if [[ ${PV} = 9999 ]]; then |
2770 |
- GIT_ECLASS="git-r3" |
2771 |
- EXPERIMENTAL="true" |
2772 |
-fi |
2773 |
- |
2774 |
-PYTHON_COMPAT=( python2_7 ) |
2775 |
- |
2776 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
2777 |
- |
2778 |
-OPENGL_DIR="xorg-x11" |
2779 |
- |
2780 |
-MY_P="${P/_/-}" |
2781 |
- |
2782 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
2783 |
-HOMEPAGE="https://www.mesa3d.org/" |
2784 |
- |
2785 |
-if [[ $PV == 9999 ]]; then |
2786 |
- SRC_URI="" |
2787 |
-else |
2788 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
2789 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
2790 |
-fi |
2791 |
- |
2792 |
-LICENSE="MIT" |
2793 |
-SLOT="0" |
2794 |
-RESTRICT="!bindist? ( bindist )" |
2795 |
- |
2796 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
2797 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware" |
2798 |
-for card in ${VIDEO_CARDS}; do |
2799 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
2800 |
-done |
2801 |
- |
2802 |
-IUSE="${IUSE_VIDEO_CARDS} |
2803 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
2804 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
2805 |
- vdpau vulkan wayland xvmc xa" |
2806 |
- |
2807 |
-REQUIRED_USE=" |
2808 |
- d3d9? ( dri3 gallium ) |
2809 |
- llvm? ( gallium ) |
2810 |
- opencl? ( gallium llvm ) |
2811 |
- openmax? ( gallium ) |
2812 |
- gles1? ( egl ) |
2813 |
- gles2? ( egl ) |
2814 |
- vaapi? ( gallium ) |
2815 |
- vdpau? ( gallium ) |
2816 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
2817 |
- video_cards_radeonsi? ( llvm ) ) |
2818 |
- wayland? ( egl gbm ) |
2819 |
- xa? ( gallium ) |
2820 |
- video_cards_freedreno? ( gallium ) |
2821 |
- video_cards_intel? ( classic ) |
2822 |
- video_cards_i915? ( || ( classic gallium ) ) |
2823 |
- video_cards_i965? ( classic ) |
2824 |
- video_cards_imx? ( gallium ) |
2825 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
2826 |
- video_cards_radeon? ( || ( classic gallium ) |
2827 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
2828 |
- video_cards_r100? ( classic ) |
2829 |
- video_cards_r200? ( classic ) |
2830 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
2831 |
- video_cards_r600? ( gallium ) |
2832 |
- video_cards_radeonsi? ( gallium llvm ) |
2833 |
- video_cards_vc4? ( gallium ) |
2834 |
- video_cards_vivante? ( gallium gbm ) |
2835 |
- video_cards_vmware? ( gallium ) |
2836 |
-" |
2837 |
- |
2838 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82" |
2839 |
-# keep correct libdrm and dri2proto dep |
2840 |
-# keep blocks in rdepend for binpkg |
2841 |
-RDEPEND=" |
2842 |
- !<x11-base/xorg-server-1.7 |
2843 |
- !<=x11-proto/xf86driproto-2.0.3 |
2844 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
2845 |
- classic? ( app-eselect/eselect-mesa ) |
2846 |
- gallium? ( app-eselect/eselect-mesa ) |
2847 |
- >=app-eselect/eselect-opengl-1.3.0 |
2848 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
2849 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
2850 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
2851 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
2852 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
2853 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
2854 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
2855 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
2856 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
2857 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
2858 |
- llvm? ( |
2859 |
- video_cards_radeonsi? ( |
2860 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2861 |
- vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] ) |
2862 |
- ) |
2863 |
- video_cards_r600? ( |
2864 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2865 |
- ) |
2866 |
- video_cards_radeon? ( |
2867 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2868 |
- ) |
2869 |
- >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
2870 |
- ) |
2871 |
- opencl? ( |
2872 |
- app-eselect/eselect-opencl |
2873 |
- dev-libs/libclc |
2874 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
2875 |
- ) |
2876 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
2877 |
- vaapi? ( |
2878 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
2879 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
2880 |
- ) |
2881 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
2882 |
- wayland? ( |
2883 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
2884 |
- >=dev-libs/wayland-protocols-1.8 |
2885 |
- ) |
2886 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
2887 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
2888 |
- |
2889 |
- video_cards_intel? ( |
2890 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
2891 |
- ) |
2892 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
2893 |
-" |
2894 |
-for card in ${RADEON_CARDS}; do |
2895 |
- RDEPEND="${RDEPEND} |
2896 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
2897 |
- " |
2898 |
-done |
2899 |
-RDEPEND="${RDEPEND} |
2900 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
2901 |
-" |
2902 |
- |
2903 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
2904 |
-# LLVM < 3.9 is out of the game |
2905 |
-DEPEND="${RDEPEND} |
2906 |
- ${PYTHON_DEPS} |
2907 |
- llvm? ( |
2908 |
- video_cards_radeonsi? ( || ( |
2909 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
2910 |
- sys-devel/llvm[video_cards_radeon] |
2911 |
- ) ) |
2912 |
- ) |
2913 |
- opencl? ( |
2914 |
- >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
2915 |
- >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}] |
2916 |
- >=sys-devel/gcc-4.6 |
2917 |
- ) |
2918 |
- sys-devel/gettext |
2919 |
- virtual/pkgconfig |
2920 |
- valgrind? ( dev-util/valgrind ) |
2921 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
2922 |
- dri3? ( |
2923 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
2924 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
2925 |
- ) |
2926 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
2927 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
2928 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
2929 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
2930 |
-" |
2931 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
2932 |
- sys-devel/bison |
2933 |
- sys-devel/flex |
2934 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
2935 |
-" |
2936 |
- |
2937 |
-S="${WORKDIR}/${MY_P}" |
2938 |
-EGIT_CHECKOUT_DIR=${S} |
2939 |
- |
2940 |
-QA_WX_LOAD=" |
2941 |
-x86? ( |
2942 |
- !pic? ( |
2943 |
- usr/lib*/libglapi.so.0.0.0 |
2944 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
2945 |
- usr/lib*/libGLESv2.so.2.0.0 |
2946 |
- usr/lib*/libGL.so.1.2.0 |
2947 |
- usr/lib*/libOSMesa.so.8.0.0 |
2948 |
- ) |
2949 |
-)" |
2950 |
- |
2951 |
-pkg_setup() { |
2952 |
- # warning message for bug 459306 |
2953 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
2954 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
2955 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
2956 |
- fi |
2957 |
- |
2958 |
- if use llvm || use opencl; then |
2959 |
- llvm_pkg_setup |
2960 |
- fi |
2961 |
- python-any-r1_pkg_setup |
2962 |
-} |
2963 |
- |
2964 |
-src_prepare() { |
2965 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
2966 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
2967 |
- |
2968 |
- eautoreconf |
2969 |
- |
2970 |
- eapply_user |
2971 |
-} |
2972 |
- |
2973 |
-multilib_src_configure() { |
2974 |
- local myconf |
2975 |
- |
2976 |
- if use classic; then |
2977 |
- # Configurable DRI drivers |
2978 |
- driver_enable swrast |
2979 |
- |
2980 |
- # Intel code |
2981 |
- driver_enable video_cards_i915 i915 |
2982 |
- driver_enable video_cards_i965 i965 |
2983 |
- if ! use video_cards_i915 && \ |
2984 |
- ! use video_cards_i965; then |
2985 |
- driver_enable video_cards_intel i915 i965 |
2986 |
- fi |
2987 |
- |
2988 |
- # Nouveau code |
2989 |
- driver_enable video_cards_nouveau nouveau |
2990 |
- |
2991 |
- # ATI code |
2992 |
- driver_enable video_cards_r100 radeon |
2993 |
- driver_enable video_cards_r200 r200 |
2994 |
- if ! use video_cards_r100 && \ |
2995 |
- ! use video_cards_r200; then |
2996 |
- driver_enable video_cards_radeon radeon r200 |
2997 |
- fi |
2998 |
- fi |
2999 |
- |
3000 |
- if use egl; then |
3001 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
3002 |
- fi |
3003 |
- |
3004 |
- if use gallium; then |
3005 |
- myconf+=" |
3006 |
- $(use_enable d3d9 nine) |
3007 |
- $(use_enable llvm) |
3008 |
- $(use_enable openmax omx) |
3009 |
- $(use_enable vaapi va) |
3010 |
- $(use_enable vdpau) |
3011 |
- $(use_enable xa) |
3012 |
- $(use_enable xvmc) |
3013 |
- " |
3014 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
3015 |
- |
3016 |
- gallium_enable swrast |
3017 |
- gallium_enable video_cards_vc4 vc4 |
3018 |
- gallium_enable video_cards_vivante etnaviv |
3019 |
- gallium_enable video_cards_vmware svga |
3020 |
- gallium_enable video_cards_nouveau nouveau |
3021 |
- gallium_enable video_cards_i915 i915 |
3022 |
- gallium_enable video_cards_imx imx |
3023 |
- if ! use video_cards_i915 && \ |
3024 |
- ! use video_cards_i965; then |
3025 |
- gallium_enable video_cards_intel i915 |
3026 |
- fi |
3027 |
- |
3028 |
- gallium_enable video_cards_r300 r300 |
3029 |
- gallium_enable video_cards_r600 r600 |
3030 |
- gallium_enable video_cards_radeonsi radeonsi |
3031 |
- if ! use video_cards_r300 && \ |
3032 |
- ! use video_cards_r600; then |
3033 |
- gallium_enable video_cards_radeon r300 r600 |
3034 |
- fi |
3035 |
- |
3036 |
- gallium_enable video_cards_freedreno freedreno |
3037 |
- # opencl stuff |
3038 |
- if use opencl; then |
3039 |
- myconf+=" |
3040 |
- $(use_enable opencl) |
3041 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
3042 |
- " |
3043 |
- fi |
3044 |
- fi |
3045 |
- |
3046 |
- if use vulkan; then |
3047 |
- vulkan_enable video_cards_i965 intel |
3048 |
- vulkan_enable video_cards_radeonsi radeon |
3049 |
- fi |
3050 |
- |
3051 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
3052 |
- if [[ ${ABI} == x86 ]]; then |
3053 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
3054 |
- fi |
3055 |
- |
3056 |
- # on abi_x86_32 hardened we need to have asm disable |
3057 |
- if [[ ${ABI} == x86* ]] && use pic; then |
3058 |
- myconf+=" --disable-asm" |
3059 |
- fi |
3060 |
- |
3061 |
- if use gallium; then |
3062 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
3063 |
- else |
3064 |
- myconf+=" $(use_enable osmesa)" |
3065 |
- fi |
3066 |
- |
3067 |
- # build fails with BSD indent, bug #428112 |
3068 |
- use userland_GNU || export INDENT=cat |
3069 |
- |
3070 |
- ECONF_SOURCE="${S}" \ |
3071 |
- econf \ |
3072 |
- --enable-dri \ |
3073 |
- --enable-glx \ |
3074 |
- --enable-shared-glapi \ |
3075 |
- $(use_enable !bindist texture-float) \ |
3076 |
- $(use_enable d3d9 nine) \ |
3077 |
- $(use_enable debug) \ |
3078 |
- $(use_enable dri3) \ |
3079 |
- $(use_enable egl) \ |
3080 |
- $(use_enable gbm) \ |
3081 |
- $(use_enable gles1) \ |
3082 |
- $(use_enable gles2) \ |
3083 |
- $(use_enable nptl glx-tls) \ |
3084 |
- $(use_enable unwind libunwind) \ |
3085 |
- --enable-valgrind=$(usex valgrind auto no) \ |
3086 |
- --enable-llvm-shared-libs \ |
3087 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
3088 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
3089 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
3090 |
- PYTHON2="${PYTHON}" \ |
3091 |
- ${myconf} |
3092 |
-} |
3093 |
- |
3094 |
-multilib_src_install() { |
3095 |
- emake install DESTDIR="${D}" |
3096 |
- |
3097 |
- if use classic || use gallium; then |
3098 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
3099 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
3100 |
- keepdir /usr/$(get_libdir)/dri |
3101 |
- dodir /usr/$(get_libdir)/mesa |
3102 |
- for x in ${gallium_drivers[@]}; do |
3103 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
3104 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
3105 |
- || die "Failed to move ${x}" |
3106 |
- fi |
3107 |
- done |
3108 |
- if use classic; then |
3109 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
3110 |
- fi |
3111 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
3112 |
- if [ -f ${x} -o -L ${x} ]; then |
3113 |
- mv -f "${x}" "${x/dri/mesa}" \ |
3114 |
- || die "Failed to move ${x}" |
3115 |
- fi |
3116 |
- done |
3117 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
3118 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
3119 |
- # remove symlinks to drivers known to eselect |
3120 |
- for x in ${gallium_drivers[@]}; do |
3121 |
- if [ -f ${x} -o -L ${x} ]; then |
3122 |
- rm "${x}" || die "Failed to remove ${x}" |
3123 |
- fi |
3124 |
- done |
3125 |
- popd |
3126 |
- eend $? |
3127 |
- fi |
3128 |
- if use opencl; then |
3129 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
3130 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
3131 |
- dodir ${cl_dir}/{lib,include} |
3132 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
3133 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
3134 |
- "${ED}"${cl_dir} |
3135 |
- fi |
3136 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
3137 |
- mv -f "${ED}"/usr/include/CL \ |
3138 |
- "${ED}"${cl_dir}/include |
3139 |
- fi |
3140 |
- eend $? |
3141 |
- fi |
3142 |
- |
3143 |
- if use openmax; then |
3144 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
3145 |
- doenvd "${T}"/99mesaxdgomx |
3146 |
- keepdir /usr/share/mesa/xdg |
3147 |
- fi |
3148 |
-} |
3149 |
- |
3150 |
-multilib_src_install_all() { |
3151 |
- find "${ED}" -name '*.la' -delete |
3152 |
- einstalldocs |
3153 |
- |
3154 |
- if use !bindist; then |
3155 |
- dodoc docs/patents.txt |
3156 |
- fi |
3157 |
- |
3158 |
- # Install config file for eselect mesa |
3159 |
- insinto /usr/share/mesa |
3160 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
3161 |
-} |
3162 |
- |
3163 |
-multilib_src_test() { |
3164 |
- if use llvm; then |
3165 |
- 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' |
3166 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
3167 |
- emake ${llvm_tests} |
3168 |
- pax-mark m ${llvm_tests} |
3169 |
- popd >/dev/null || die |
3170 |
- fi |
3171 |
- emake check |
3172 |
-} |
3173 |
- |
3174 |
-pkg_postinst() { |
3175 |
- # Switch to the xorg implementation. |
3176 |
- echo |
3177 |
- eselect opengl set --use-old ${OPENGL_DIR} |
3178 |
- |
3179 |
- # Select classic/gallium drivers |
3180 |
- if use classic || use gallium; then |
3181 |
- eselect mesa set --auto |
3182 |
- fi |
3183 |
- |
3184 |
- # Switch to mesa opencl |
3185 |
- if use opencl; then |
3186 |
- eselect opencl set --use-old ${PN} |
3187 |
- fi |
3188 |
- |
3189 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
3190 |
- if use openmax; then |
3191 |
- ebegin "Registering OpenMAX drivers" |
3192 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
3193 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
3194 |
- omxregister-bellagio |
3195 |
- eend $? |
3196 |
- fi |
3197 |
- |
3198 |
- # warn about patent encumbered texture-float |
3199 |
- if use !bindist; then |
3200 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
3201 |
- elog "enabled. Please see patents.txt for an explanation." |
3202 |
- fi |
3203 |
- |
3204 |
- if ! has_version media-libs/libtxc_dxtn; then |
3205 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
3206 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
3207 |
- elog "textures in some apps, and some others even require this to run." |
3208 |
- fi |
3209 |
-} |
3210 |
- |
3211 |
-pkg_prerm() { |
3212 |
- if use openmax; then |
3213 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
3214 |
- fi |
3215 |
-} |
3216 |
- |
3217 |
-# $1 - VIDEO_CARDS flag |
3218 |
-# other args - names of DRI drivers to enable |
3219 |
-# TODO: avoid code duplication for a more elegant implementation |
3220 |
-driver_enable() { |
3221 |
- case $# in |
3222 |
- # for enabling unconditionally |
3223 |
- 1) |
3224 |
- DRI_DRIVERS+=",$1" |
3225 |
- ;; |
3226 |
- *) |
3227 |
- if use $1; then |
3228 |
- shift |
3229 |
- for i in $@; do |
3230 |
- DRI_DRIVERS+=",${i}" |
3231 |
- done |
3232 |
- fi |
3233 |
- ;; |
3234 |
- esac |
3235 |
-} |
3236 |
- |
3237 |
-gallium_enable() { |
3238 |
- case $# in |
3239 |
- # for enabling unconditionally |
3240 |
- 1) |
3241 |
- GALLIUM_DRIVERS+=",$1" |
3242 |
- ;; |
3243 |
- *) |
3244 |
- if use $1; then |
3245 |
- shift |
3246 |
- for i in $@; do |
3247 |
- GALLIUM_DRIVERS+=",${i}" |
3248 |
- done |
3249 |
- fi |
3250 |
- ;; |
3251 |
- esac |
3252 |
-} |
3253 |
- |
3254 |
-vulkan_enable() { |
3255 |
- case $# in |
3256 |
- # for enabling unconditionally |
3257 |
- 1) |
3258 |
- VULKAN_DRIVERS+=",$1" |
3259 |
- ;; |
3260 |
- *) |
3261 |
- if use $1; then |
3262 |
- shift |
3263 |
- for i in $@; do |
3264 |
- VULKAN_DRIVERS+=",${i}" |
3265 |
- done |
3266 |
- fi |
3267 |
- ;; |
3268 |
- esac |
3269 |
-} |
3270 |
|
3271 |
diff --git a/media-libs/mesa/mesa-17.2.1.ebuild b/media-libs/mesa/mesa-17.2.1.ebuild |
3272 |
deleted file mode 100644 |
3273 |
index 789541f..0000000 |
3274 |
--- a/media-libs/mesa/mesa-17.2.1.ebuild |
3275 |
+++ /dev/null |
3276 |
@@ -1,583 +0,0 @@ |
3277 |
-# Copyright 1999-2017 Gentoo Foundation |
3278 |
-# Distributed under the terms of the GNU General Public License v2 |
3279 |
- |
3280 |
-EAPI=6 |
3281 |
- |
3282 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
3283 |
- |
3284 |
-if [[ ${PV} = 9999 ]]; then |
3285 |
- GIT_ECLASS="git-r3" |
3286 |
- EXPERIMENTAL="true" |
3287 |
-fi |
3288 |
- |
3289 |
-PYTHON_COMPAT=( python2_7 ) |
3290 |
- |
3291 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
3292 |
- |
3293 |
-OPENGL_DIR="xorg-x11" |
3294 |
- |
3295 |
-MY_P="${P/_/-}" |
3296 |
- |
3297 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
3298 |
-HOMEPAGE="https://www.mesa3d.org/" |
3299 |
- |
3300 |
-if [[ $PV == 9999 ]]; then |
3301 |
- SRC_URI="" |
3302 |
-else |
3303 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
3304 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
3305 |
-fi |
3306 |
- |
3307 |
-LICENSE="MIT" |
3308 |
-SLOT="0" |
3309 |
-RESTRICT="!bindist? ( bindist )" |
3310 |
- |
3311 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
3312 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware" |
3313 |
-for card in ${VIDEO_CARDS}; do |
3314 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
3315 |
-done |
3316 |
- |
3317 |
-IUSE="${IUSE_VIDEO_CARDS} |
3318 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
3319 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
3320 |
- vdpau vulkan wayland xvmc xa" |
3321 |
- |
3322 |
-REQUIRED_USE=" |
3323 |
- d3d9? ( dri3 gallium ) |
3324 |
- llvm? ( gallium ) |
3325 |
- opencl? ( gallium llvm ) |
3326 |
- openmax? ( gallium ) |
3327 |
- gles1? ( egl ) |
3328 |
- gles2? ( egl ) |
3329 |
- vaapi? ( gallium ) |
3330 |
- vdpau? ( gallium ) |
3331 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
3332 |
- video_cards_radeonsi? ( llvm ) ) |
3333 |
- wayland? ( egl gbm ) |
3334 |
- xa? ( gallium ) |
3335 |
- video_cards_freedreno? ( gallium ) |
3336 |
- video_cards_intel? ( classic ) |
3337 |
- video_cards_i915? ( || ( classic gallium ) ) |
3338 |
- video_cards_i965? ( classic ) |
3339 |
- video_cards_imx? ( gallium ) |
3340 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
3341 |
- video_cards_radeon? ( || ( classic gallium ) |
3342 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
3343 |
- video_cards_r100? ( classic ) |
3344 |
- video_cards_r200? ( classic ) |
3345 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
3346 |
- video_cards_r600? ( gallium ) |
3347 |
- video_cards_radeonsi? ( gallium llvm ) |
3348 |
- video_cards_vc4? ( gallium ) |
3349 |
- video_cards_vivante? ( gallium gbm ) |
3350 |
- video_cards_vmware? ( gallium ) |
3351 |
-" |
3352 |
- |
3353 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82" |
3354 |
-# keep correct libdrm and dri2proto dep |
3355 |
-# keep blocks in rdepend for binpkg |
3356 |
-RDEPEND=" |
3357 |
- !<x11-base/xorg-server-1.7 |
3358 |
- !<=x11-proto/xf86driproto-2.0.3 |
3359 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
3360 |
- classic? ( app-eselect/eselect-mesa ) |
3361 |
- gallium? ( app-eselect/eselect-mesa ) |
3362 |
- >=app-eselect/eselect-opengl-1.3.0 |
3363 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
3364 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
3365 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
3366 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
3367 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
3368 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
3369 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
3370 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
3371 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
3372 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
3373 |
- llvm? ( |
3374 |
- video_cards_radeonsi? ( |
3375 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3376 |
- ) |
3377 |
- video_cards_r600? ( |
3378 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3379 |
- ) |
3380 |
- video_cards_radeon? ( |
3381 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3382 |
- ) |
3383 |
- ) |
3384 |
- opencl? ( |
3385 |
- app-eselect/eselect-opencl |
3386 |
- dev-libs/libclc |
3387 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3388 |
- ) |
3389 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
3390 |
- vaapi? ( |
3391 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
3392 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
3393 |
- ) |
3394 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
3395 |
- wayland? ( |
3396 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
3397 |
- >=dev-libs/wayland-protocols-1.8 |
3398 |
- ) |
3399 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
3400 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
3401 |
- |
3402 |
- video_cards_intel? ( |
3403 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
3404 |
- ) |
3405 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
3406 |
-" |
3407 |
-for card in ${RADEON_CARDS}; do |
3408 |
- RDEPEND="${RDEPEND} |
3409 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
3410 |
- " |
3411 |
-done |
3412 |
-RDEPEND="${RDEPEND} |
3413 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
3414 |
-" |
3415 |
- |
3416 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
3417 |
-# we need to *really* make sure we're not pulling one than more slot |
3418 |
-# simultaneously. |
3419 |
-# |
3420 |
-# How to use it: |
3421 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
3422 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
3423 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
3424 |
-LLVM_MAX_SLOT="5" |
3425 |
-LLVM_DEPSTR=" |
3426 |
- || ( |
3427 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
3428 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
3429 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
3430 |
- ) |
3431 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
3432 |
-" |
3433 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
3434 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
3435 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
3436 |
-RDEPEND="${RDEPEND} |
3437 |
- llvm? ( |
3438 |
- opencl? ( |
3439 |
- video_cards_r600? ( |
3440 |
- ${CLANG_DEPSTR_AMDGPU} |
3441 |
- ) |
3442 |
- !video_cards_r600? ( |
3443 |
- video_cards_radeonsi? ( |
3444 |
- ${CLANG_DEPSTR_AMDGPU} |
3445 |
- ) |
3446 |
- ) |
3447 |
- !video_cards_r600? ( |
3448 |
- !video_cards_radeonsi? ( |
3449 |
- video_cards_radeon? ( |
3450 |
- ${CLANG_DEPSTR_AMDGPU} |
3451 |
- ) |
3452 |
- ) |
3453 |
- ) |
3454 |
- !video_cards_r600? ( |
3455 |
- !video_cards_radeon? ( |
3456 |
- !video_cards_radeonsi? ( |
3457 |
- ${CLANG_DEPSTR} |
3458 |
- ) |
3459 |
- ) |
3460 |
- ) |
3461 |
- ) |
3462 |
- !opencl? ( |
3463 |
- video_cards_r600? ( |
3464 |
- ${LLVM_DEPSTR_AMDGPU} |
3465 |
- ) |
3466 |
- !video_cards_r600? ( |
3467 |
- video_cards_radeonsi? ( |
3468 |
- ${LLVM_DEPSTR_AMDGPU} |
3469 |
- ) |
3470 |
- ) |
3471 |
- !video_cards_r600? ( |
3472 |
- !video_cards_radeonsi? ( |
3473 |
- video_cards_radeon? ( |
3474 |
- ${LLVM_DEPSTR_AMDGPU} |
3475 |
- ) |
3476 |
- ) |
3477 |
- ) |
3478 |
- !video_cards_r600? ( |
3479 |
- !video_cards_radeon? ( |
3480 |
- !video_cards_radeonsi? ( |
3481 |
- ${LLVM_DEPSTR} |
3482 |
- ) |
3483 |
- ) |
3484 |
- ) |
3485 |
- ) |
3486 |
- ) |
3487 |
-" |
3488 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
3489 |
- |
3490 |
-DEPEND="${RDEPEND} |
3491 |
- ${PYTHON_DEPS} |
3492 |
- opencl? ( |
3493 |
- >=sys-devel/gcc-4.6 |
3494 |
- ) |
3495 |
- sys-devel/gettext |
3496 |
- virtual/pkgconfig |
3497 |
- valgrind? ( dev-util/valgrind ) |
3498 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
3499 |
- dri3? ( |
3500 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
3501 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
3502 |
- ) |
3503 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
3504 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
3505 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
3506 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
3507 |
-" |
3508 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
3509 |
- sys-devel/bison |
3510 |
- sys-devel/flex |
3511 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
3512 |
-" |
3513 |
- |
3514 |
-S="${WORKDIR}/${MY_P}" |
3515 |
-EGIT_CHECKOUT_DIR=${S} |
3516 |
- |
3517 |
-QA_WX_LOAD=" |
3518 |
-x86? ( |
3519 |
- !pic? ( |
3520 |
- usr/lib*/libglapi.so.0.0.0 |
3521 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
3522 |
- usr/lib*/libGLESv2.so.2.0.0 |
3523 |
- usr/lib*/libGL.so.1.2.0 |
3524 |
- usr/lib*/libOSMesa.so.8.0.0 |
3525 |
- ) |
3526 |
-)" |
3527 |
- |
3528 |
-llvm_check_deps() { |
3529 |
- local flags=${MULTILIB_USEDEP} |
3530 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
3531 |
- then |
3532 |
- flags+=",llvm_targets_AMDGPU(-)" |
3533 |
- fi |
3534 |
- |
3535 |
- if use opencl; then |
3536 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
3537 |
- fi |
3538 |
- has_version "sys-devel/llvm[${flags}]" |
3539 |
-} |
3540 |
- |
3541 |
-pkg_setup() { |
3542 |
- # warning message for bug 459306 |
3543 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
3544 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
3545 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
3546 |
- fi |
3547 |
- |
3548 |
- if use llvm; then |
3549 |
- llvm_pkg_setup |
3550 |
- fi |
3551 |
- python-any-r1_pkg_setup |
3552 |
-} |
3553 |
- |
3554 |
-src_prepare() { |
3555 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
3556 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
3557 |
- |
3558 |
- eautoreconf |
3559 |
- |
3560 |
- eapply_user |
3561 |
-} |
3562 |
- |
3563 |
-multilib_src_configure() { |
3564 |
- local myconf |
3565 |
- |
3566 |
- if use classic; then |
3567 |
- # Configurable DRI drivers |
3568 |
- driver_enable swrast |
3569 |
- |
3570 |
- # Intel code |
3571 |
- driver_enable video_cards_i915 i915 |
3572 |
- driver_enable video_cards_i965 i965 |
3573 |
- if ! use video_cards_i915 && \ |
3574 |
- ! use video_cards_i965; then |
3575 |
- driver_enable video_cards_intel i915 i965 |
3576 |
- fi |
3577 |
- |
3578 |
- # Nouveau code |
3579 |
- driver_enable video_cards_nouveau nouveau |
3580 |
- |
3581 |
- # ATI code |
3582 |
- driver_enable video_cards_r100 radeon |
3583 |
- driver_enable video_cards_r200 r200 |
3584 |
- if ! use video_cards_r100 && \ |
3585 |
- ! use video_cards_r200; then |
3586 |
- driver_enable video_cards_radeon radeon r200 |
3587 |
- fi |
3588 |
- fi |
3589 |
- |
3590 |
- if use egl; then |
3591 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
3592 |
- fi |
3593 |
- |
3594 |
- if use gallium; then |
3595 |
- myconf+=" |
3596 |
- $(use_enable d3d9 nine) |
3597 |
- $(use_enable llvm) |
3598 |
- $(use_enable openmax omx) |
3599 |
- $(use_enable vaapi va) |
3600 |
- $(use_enable vdpau) |
3601 |
- $(use_enable xa) |
3602 |
- $(use_enable xvmc) |
3603 |
- " |
3604 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
3605 |
- |
3606 |
- gallium_enable swrast |
3607 |
- gallium_enable video_cards_vc4 vc4 |
3608 |
- gallium_enable video_cards_vivante etnaviv |
3609 |
- gallium_enable video_cards_vmware svga |
3610 |
- gallium_enable video_cards_nouveau nouveau |
3611 |
- gallium_enable video_cards_i915 i915 |
3612 |
- gallium_enable video_cards_imx imx |
3613 |
- if ! use video_cards_i915 && \ |
3614 |
- ! use video_cards_i965; then |
3615 |
- gallium_enable video_cards_intel i915 |
3616 |
- fi |
3617 |
- |
3618 |
- gallium_enable video_cards_r300 r300 |
3619 |
- gallium_enable video_cards_r600 r600 |
3620 |
- gallium_enable video_cards_radeonsi radeonsi |
3621 |
- if ! use video_cards_r300 && \ |
3622 |
- ! use video_cards_r600; then |
3623 |
- gallium_enable video_cards_radeon r300 r600 |
3624 |
- fi |
3625 |
- |
3626 |
- gallium_enable video_cards_freedreno freedreno |
3627 |
- # opencl stuff |
3628 |
- if use opencl; then |
3629 |
- myconf+=" |
3630 |
- $(use_enable opencl) |
3631 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
3632 |
- " |
3633 |
- fi |
3634 |
- fi |
3635 |
- |
3636 |
- if use vulkan; then |
3637 |
- vulkan_enable video_cards_i965 intel |
3638 |
- vulkan_enable video_cards_radeonsi radeon |
3639 |
- fi |
3640 |
- |
3641 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
3642 |
- if [[ ${ABI} == x86 ]]; then |
3643 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
3644 |
- fi |
3645 |
- |
3646 |
- # on abi_x86_32 hardened we need to have asm disable |
3647 |
- if [[ ${ABI} == x86* ]] && use pic; then |
3648 |
- myconf+=" --disable-asm" |
3649 |
- fi |
3650 |
- |
3651 |
- if use gallium; then |
3652 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
3653 |
- else |
3654 |
- myconf+=" $(use_enable osmesa)" |
3655 |
- fi |
3656 |
- |
3657 |
- # build fails with BSD indent, bug #428112 |
3658 |
- use userland_GNU || export INDENT=cat |
3659 |
- |
3660 |
- ECONF_SOURCE="${S}" \ |
3661 |
- econf \ |
3662 |
- --enable-dri \ |
3663 |
- --enable-glx \ |
3664 |
- --enable-shared-glapi \ |
3665 |
- $(use_enable !bindist texture-float) \ |
3666 |
- $(use_enable d3d9 nine) \ |
3667 |
- $(use_enable debug) \ |
3668 |
- $(use_enable dri3) \ |
3669 |
- $(use_enable egl) \ |
3670 |
- $(use_enable gbm) \ |
3671 |
- $(use_enable gles1) \ |
3672 |
- $(use_enable gles2) \ |
3673 |
- $(use_enable nptl glx-tls) \ |
3674 |
- $(use_enable unwind libunwind) \ |
3675 |
- --enable-valgrind=$(usex valgrind auto no) \ |
3676 |
- --enable-llvm-shared-libs \ |
3677 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
3678 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
3679 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
3680 |
- PYTHON2="${PYTHON}" \ |
3681 |
- ${myconf} |
3682 |
-} |
3683 |
- |
3684 |
-multilib_src_install() { |
3685 |
- emake install DESTDIR="${D}" |
3686 |
- |
3687 |
- if use classic || use gallium; then |
3688 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
3689 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
3690 |
- keepdir /usr/$(get_libdir)/dri |
3691 |
- dodir /usr/$(get_libdir)/mesa |
3692 |
- for x in ${gallium_drivers[@]}; do |
3693 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
3694 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
3695 |
- || die "Failed to move ${x}" |
3696 |
- fi |
3697 |
- done |
3698 |
- if use classic; then |
3699 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
3700 |
- fi |
3701 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
3702 |
- if [ -f ${x} -o -L ${x} ]; then |
3703 |
- mv -f "${x}" "${x/dri/mesa}" \ |
3704 |
- || die "Failed to move ${x}" |
3705 |
- fi |
3706 |
- done |
3707 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
3708 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
3709 |
- # remove symlinks to drivers known to eselect |
3710 |
- for x in ${gallium_drivers[@]}; do |
3711 |
- if [ -f ${x} -o -L ${x} ]; then |
3712 |
- rm "${x}" || die "Failed to remove ${x}" |
3713 |
- fi |
3714 |
- done |
3715 |
- popd |
3716 |
- eend $? |
3717 |
- fi |
3718 |
- if use opencl; then |
3719 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
3720 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
3721 |
- dodir ${cl_dir}/{lib,include} |
3722 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
3723 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
3724 |
- "${ED}"${cl_dir} |
3725 |
- fi |
3726 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
3727 |
- mv -f "${ED}"/usr/include/CL \ |
3728 |
- "${ED}"${cl_dir}/include |
3729 |
- fi |
3730 |
- eend $? |
3731 |
- fi |
3732 |
- |
3733 |
- if use openmax; then |
3734 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
3735 |
- doenvd "${T}"/99mesaxdgomx |
3736 |
- keepdir /usr/share/mesa/xdg |
3737 |
- fi |
3738 |
-} |
3739 |
- |
3740 |
-multilib_src_install_all() { |
3741 |
- find "${ED}" -name '*.la' -delete |
3742 |
- einstalldocs |
3743 |
- |
3744 |
- if use !bindist; then |
3745 |
- dodoc docs/patents.txt |
3746 |
- fi |
3747 |
- |
3748 |
- # Install config file for eselect mesa |
3749 |
- insinto /usr/share/mesa |
3750 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
3751 |
-} |
3752 |
- |
3753 |
-multilib_src_test() { |
3754 |
- if use llvm; then |
3755 |
- 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' |
3756 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
3757 |
- emake ${llvm_tests} |
3758 |
- pax-mark m ${llvm_tests} |
3759 |
- popd >/dev/null || die |
3760 |
- fi |
3761 |
- emake check |
3762 |
-} |
3763 |
- |
3764 |
-pkg_postinst() { |
3765 |
- # Switch to the xorg implementation. |
3766 |
- echo |
3767 |
- eselect opengl set --use-old ${OPENGL_DIR} |
3768 |
- |
3769 |
- # Select classic/gallium drivers |
3770 |
- if use classic || use gallium; then |
3771 |
- eselect mesa set --auto |
3772 |
- fi |
3773 |
- |
3774 |
- # Switch to mesa opencl |
3775 |
- if use opencl; then |
3776 |
- eselect opencl set --use-old ${PN} |
3777 |
- fi |
3778 |
- |
3779 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
3780 |
- if use openmax; then |
3781 |
- ebegin "Registering OpenMAX drivers" |
3782 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
3783 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
3784 |
- omxregister-bellagio |
3785 |
- eend $? |
3786 |
- fi |
3787 |
- |
3788 |
- # warn about patent encumbered texture-float |
3789 |
- if use !bindist; then |
3790 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
3791 |
- elog "enabled. Please see patents.txt for an explanation." |
3792 |
- fi |
3793 |
- |
3794 |
- if ! has_version media-libs/libtxc_dxtn; then |
3795 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
3796 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
3797 |
- elog "textures in some apps, and some others even require this to run." |
3798 |
- fi |
3799 |
-} |
3800 |
- |
3801 |
-pkg_prerm() { |
3802 |
- if use openmax; then |
3803 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
3804 |
- fi |
3805 |
-} |
3806 |
- |
3807 |
-# $1 - VIDEO_CARDS flag |
3808 |
-# other args - names of DRI drivers to enable |
3809 |
-# TODO: avoid code duplication for a more elegant implementation |
3810 |
-driver_enable() { |
3811 |
- case $# in |
3812 |
- # for enabling unconditionally |
3813 |
- 1) |
3814 |
- DRI_DRIVERS+=",$1" |
3815 |
- ;; |
3816 |
- *) |
3817 |
- if use $1; then |
3818 |
- shift |
3819 |
- for i in $@; do |
3820 |
- DRI_DRIVERS+=",${i}" |
3821 |
- done |
3822 |
- fi |
3823 |
- ;; |
3824 |
- esac |
3825 |
-} |
3826 |
- |
3827 |
-gallium_enable() { |
3828 |
- case $# in |
3829 |
- # for enabling unconditionally |
3830 |
- 1) |
3831 |
- GALLIUM_DRIVERS+=",$1" |
3832 |
- ;; |
3833 |
- *) |
3834 |
- if use $1; then |
3835 |
- shift |
3836 |
- for i in $@; do |
3837 |
- GALLIUM_DRIVERS+=",${i}" |
3838 |
- done |
3839 |
- fi |
3840 |
- ;; |
3841 |
- esac |
3842 |
-} |
3843 |
- |
3844 |
-vulkan_enable() { |
3845 |
- case $# in |
3846 |
- # for enabling unconditionally |
3847 |
- 1) |
3848 |
- VULKAN_DRIVERS+=",$1" |
3849 |
- ;; |
3850 |
- *) |
3851 |
- if use $1; then |
3852 |
- shift |
3853 |
- for i in $@; do |
3854 |
- VULKAN_DRIVERS+=",${i}" |
3855 |
- done |
3856 |
- fi |
3857 |
- ;; |
3858 |
- esac |
3859 |
-} |
3860 |
|
3861 |
diff --git a/media-libs/mesa/mesa-17.2.2.ebuild b/media-libs/mesa/mesa-17.2.2.ebuild |
3862 |
deleted file mode 100644 |
3863 |
index 789541f..0000000 |
3864 |
--- a/media-libs/mesa/mesa-17.2.2.ebuild |
3865 |
+++ /dev/null |
3866 |
@@ -1,583 +0,0 @@ |
3867 |
-# Copyright 1999-2017 Gentoo Foundation |
3868 |
-# Distributed under the terms of the GNU General Public License v2 |
3869 |
- |
3870 |
-EAPI=6 |
3871 |
- |
3872 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
3873 |
- |
3874 |
-if [[ ${PV} = 9999 ]]; then |
3875 |
- GIT_ECLASS="git-r3" |
3876 |
- EXPERIMENTAL="true" |
3877 |
-fi |
3878 |
- |
3879 |
-PYTHON_COMPAT=( python2_7 ) |
3880 |
- |
3881 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
3882 |
- |
3883 |
-OPENGL_DIR="xorg-x11" |
3884 |
- |
3885 |
-MY_P="${P/_/-}" |
3886 |
- |
3887 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
3888 |
-HOMEPAGE="https://www.mesa3d.org/" |
3889 |
- |
3890 |
-if [[ $PV == 9999 ]]; then |
3891 |
- SRC_URI="" |
3892 |
-else |
3893 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
3894 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
3895 |
-fi |
3896 |
- |
3897 |
-LICENSE="MIT" |
3898 |
-SLOT="0" |
3899 |
-RESTRICT="!bindist? ( bindist )" |
3900 |
- |
3901 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
3902 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware" |
3903 |
-for card in ${VIDEO_CARDS}; do |
3904 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
3905 |
-done |
3906 |
- |
3907 |
-IUSE="${IUSE_VIDEO_CARDS} |
3908 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
3909 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
3910 |
- vdpau vulkan wayland xvmc xa" |
3911 |
- |
3912 |
-REQUIRED_USE=" |
3913 |
- d3d9? ( dri3 gallium ) |
3914 |
- llvm? ( gallium ) |
3915 |
- opencl? ( gallium llvm ) |
3916 |
- openmax? ( gallium ) |
3917 |
- gles1? ( egl ) |
3918 |
- gles2? ( egl ) |
3919 |
- vaapi? ( gallium ) |
3920 |
- vdpau? ( gallium ) |
3921 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
3922 |
- video_cards_radeonsi? ( llvm ) ) |
3923 |
- wayland? ( egl gbm ) |
3924 |
- xa? ( gallium ) |
3925 |
- video_cards_freedreno? ( gallium ) |
3926 |
- video_cards_intel? ( classic ) |
3927 |
- video_cards_i915? ( || ( classic gallium ) ) |
3928 |
- video_cards_i965? ( classic ) |
3929 |
- video_cards_imx? ( gallium ) |
3930 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
3931 |
- video_cards_radeon? ( || ( classic gallium ) |
3932 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
3933 |
- video_cards_r100? ( classic ) |
3934 |
- video_cards_r200? ( classic ) |
3935 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
3936 |
- video_cards_r600? ( gallium ) |
3937 |
- video_cards_radeonsi? ( gallium llvm ) |
3938 |
- video_cards_vc4? ( gallium ) |
3939 |
- video_cards_vivante? ( gallium gbm ) |
3940 |
- video_cards_vmware? ( gallium ) |
3941 |
-" |
3942 |
- |
3943 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82" |
3944 |
-# keep correct libdrm and dri2proto dep |
3945 |
-# keep blocks in rdepend for binpkg |
3946 |
-RDEPEND=" |
3947 |
- !<x11-base/xorg-server-1.7 |
3948 |
- !<=x11-proto/xf86driproto-2.0.3 |
3949 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
3950 |
- classic? ( app-eselect/eselect-mesa ) |
3951 |
- gallium? ( app-eselect/eselect-mesa ) |
3952 |
- >=app-eselect/eselect-opengl-1.3.0 |
3953 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
3954 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
3955 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
3956 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
3957 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
3958 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
3959 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
3960 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
3961 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
3962 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
3963 |
- llvm? ( |
3964 |
- video_cards_radeonsi? ( |
3965 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3966 |
- ) |
3967 |
- video_cards_r600? ( |
3968 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3969 |
- ) |
3970 |
- video_cards_radeon? ( |
3971 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3972 |
- ) |
3973 |
- ) |
3974 |
- opencl? ( |
3975 |
- app-eselect/eselect-opencl |
3976 |
- dev-libs/libclc |
3977 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
3978 |
- ) |
3979 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
3980 |
- vaapi? ( |
3981 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
3982 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
3983 |
- ) |
3984 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
3985 |
- wayland? ( |
3986 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
3987 |
- >=dev-libs/wayland-protocols-1.8 |
3988 |
- ) |
3989 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
3990 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
3991 |
- |
3992 |
- video_cards_intel? ( |
3993 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
3994 |
- ) |
3995 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
3996 |
-" |
3997 |
-for card in ${RADEON_CARDS}; do |
3998 |
- RDEPEND="${RDEPEND} |
3999 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
4000 |
- " |
4001 |
-done |
4002 |
-RDEPEND="${RDEPEND} |
4003 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
4004 |
-" |
4005 |
- |
4006 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
4007 |
-# we need to *really* make sure we're not pulling one than more slot |
4008 |
-# simultaneously. |
4009 |
-# |
4010 |
-# How to use it: |
4011 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
4012 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
4013 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
4014 |
-LLVM_MAX_SLOT="5" |
4015 |
-LLVM_DEPSTR=" |
4016 |
- || ( |
4017 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
4018 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
4019 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
4020 |
- ) |
4021 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
4022 |
-" |
4023 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
4024 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
4025 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
4026 |
-RDEPEND="${RDEPEND} |
4027 |
- llvm? ( |
4028 |
- opencl? ( |
4029 |
- video_cards_r600? ( |
4030 |
- ${CLANG_DEPSTR_AMDGPU} |
4031 |
- ) |
4032 |
- !video_cards_r600? ( |
4033 |
- video_cards_radeonsi? ( |
4034 |
- ${CLANG_DEPSTR_AMDGPU} |
4035 |
- ) |
4036 |
- ) |
4037 |
- !video_cards_r600? ( |
4038 |
- !video_cards_radeonsi? ( |
4039 |
- video_cards_radeon? ( |
4040 |
- ${CLANG_DEPSTR_AMDGPU} |
4041 |
- ) |
4042 |
- ) |
4043 |
- ) |
4044 |
- !video_cards_r600? ( |
4045 |
- !video_cards_radeon? ( |
4046 |
- !video_cards_radeonsi? ( |
4047 |
- ${CLANG_DEPSTR} |
4048 |
- ) |
4049 |
- ) |
4050 |
- ) |
4051 |
- ) |
4052 |
- !opencl? ( |
4053 |
- video_cards_r600? ( |
4054 |
- ${LLVM_DEPSTR_AMDGPU} |
4055 |
- ) |
4056 |
- !video_cards_r600? ( |
4057 |
- video_cards_radeonsi? ( |
4058 |
- ${LLVM_DEPSTR_AMDGPU} |
4059 |
- ) |
4060 |
- ) |
4061 |
- !video_cards_r600? ( |
4062 |
- !video_cards_radeonsi? ( |
4063 |
- video_cards_radeon? ( |
4064 |
- ${LLVM_DEPSTR_AMDGPU} |
4065 |
- ) |
4066 |
- ) |
4067 |
- ) |
4068 |
- !video_cards_r600? ( |
4069 |
- !video_cards_radeon? ( |
4070 |
- !video_cards_radeonsi? ( |
4071 |
- ${LLVM_DEPSTR} |
4072 |
- ) |
4073 |
- ) |
4074 |
- ) |
4075 |
- ) |
4076 |
- ) |
4077 |
-" |
4078 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
4079 |
- |
4080 |
-DEPEND="${RDEPEND} |
4081 |
- ${PYTHON_DEPS} |
4082 |
- opencl? ( |
4083 |
- >=sys-devel/gcc-4.6 |
4084 |
- ) |
4085 |
- sys-devel/gettext |
4086 |
- virtual/pkgconfig |
4087 |
- valgrind? ( dev-util/valgrind ) |
4088 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
4089 |
- dri3? ( |
4090 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
4091 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
4092 |
- ) |
4093 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
4094 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
4095 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
4096 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
4097 |
-" |
4098 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
4099 |
- sys-devel/bison |
4100 |
- sys-devel/flex |
4101 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
4102 |
-" |
4103 |
- |
4104 |
-S="${WORKDIR}/${MY_P}" |
4105 |
-EGIT_CHECKOUT_DIR=${S} |
4106 |
- |
4107 |
-QA_WX_LOAD=" |
4108 |
-x86? ( |
4109 |
- !pic? ( |
4110 |
- usr/lib*/libglapi.so.0.0.0 |
4111 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
4112 |
- usr/lib*/libGLESv2.so.2.0.0 |
4113 |
- usr/lib*/libGL.so.1.2.0 |
4114 |
- usr/lib*/libOSMesa.so.8.0.0 |
4115 |
- ) |
4116 |
-)" |
4117 |
- |
4118 |
-llvm_check_deps() { |
4119 |
- local flags=${MULTILIB_USEDEP} |
4120 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
4121 |
- then |
4122 |
- flags+=",llvm_targets_AMDGPU(-)" |
4123 |
- fi |
4124 |
- |
4125 |
- if use opencl; then |
4126 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
4127 |
- fi |
4128 |
- has_version "sys-devel/llvm[${flags}]" |
4129 |
-} |
4130 |
- |
4131 |
-pkg_setup() { |
4132 |
- # warning message for bug 459306 |
4133 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
4134 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
4135 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
4136 |
- fi |
4137 |
- |
4138 |
- if use llvm; then |
4139 |
- llvm_pkg_setup |
4140 |
- fi |
4141 |
- python-any-r1_pkg_setup |
4142 |
-} |
4143 |
- |
4144 |
-src_prepare() { |
4145 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
4146 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
4147 |
- |
4148 |
- eautoreconf |
4149 |
- |
4150 |
- eapply_user |
4151 |
-} |
4152 |
- |
4153 |
-multilib_src_configure() { |
4154 |
- local myconf |
4155 |
- |
4156 |
- if use classic; then |
4157 |
- # Configurable DRI drivers |
4158 |
- driver_enable swrast |
4159 |
- |
4160 |
- # Intel code |
4161 |
- driver_enable video_cards_i915 i915 |
4162 |
- driver_enable video_cards_i965 i965 |
4163 |
- if ! use video_cards_i915 && \ |
4164 |
- ! use video_cards_i965; then |
4165 |
- driver_enable video_cards_intel i915 i965 |
4166 |
- fi |
4167 |
- |
4168 |
- # Nouveau code |
4169 |
- driver_enable video_cards_nouveau nouveau |
4170 |
- |
4171 |
- # ATI code |
4172 |
- driver_enable video_cards_r100 radeon |
4173 |
- driver_enable video_cards_r200 r200 |
4174 |
- if ! use video_cards_r100 && \ |
4175 |
- ! use video_cards_r200; then |
4176 |
- driver_enable video_cards_radeon radeon r200 |
4177 |
- fi |
4178 |
- fi |
4179 |
- |
4180 |
- if use egl; then |
4181 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
4182 |
- fi |
4183 |
- |
4184 |
- if use gallium; then |
4185 |
- myconf+=" |
4186 |
- $(use_enable d3d9 nine) |
4187 |
- $(use_enable llvm) |
4188 |
- $(use_enable openmax omx) |
4189 |
- $(use_enable vaapi va) |
4190 |
- $(use_enable vdpau) |
4191 |
- $(use_enable xa) |
4192 |
- $(use_enable xvmc) |
4193 |
- " |
4194 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
4195 |
- |
4196 |
- gallium_enable swrast |
4197 |
- gallium_enable video_cards_vc4 vc4 |
4198 |
- gallium_enable video_cards_vivante etnaviv |
4199 |
- gallium_enable video_cards_vmware svga |
4200 |
- gallium_enable video_cards_nouveau nouveau |
4201 |
- gallium_enable video_cards_i915 i915 |
4202 |
- gallium_enable video_cards_imx imx |
4203 |
- if ! use video_cards_i915 && \ |
4204 |
- ! use video_cards_i965; then |
4205 |
- gallium_enable video_cards_intel i915 |
4206 |
- fi |
4207 |
- |
4208 |
- gallium_enable video_cards_r300 r300 |
4209 |
- gallium_enable video_cards_r600 r600 |
4210 |
- gallium_enable video_cards_radeonsi radeonsi |
4211 |
- if ! use video_cards_r300 && \ |
4212 |
- ! use video_cards_r600; then |
4213 |
- gallium_enable video_cards_radeon r300 r600 |
4214 |
- fi |
4215 |
- |
4216 |
- gallium_enable video_cards_freedreno freedreno |
4217 |
- # opencl stuff |
4218 |
- if use opencl; then |
4219 |
- myconf+=" |
4220 |
- $(use_enable opencl) |
4221 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
4222 |
- " |
4223 |
- fi |
4224 |
- fi |
4225 |
- |
4226 |
- if use vulkan; then |
4227 |
- vulkan_enable video_cards_i965 intel |
4228 |
- vulkan_enable video_cards_radeonsi radeon |
4229 |
- fi |
4230 |
- |
4231 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
4232 |
- if [[ ${ABI} == x86 ]]; then |
4233 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
4234 |
- fi |
4235 |
- |
4236 |
- # on abi_x86_32 hardened we need to have asm disable |
4237 |
- if [[ ${ABI} == x86* ]] && use pic; then |
4238 |
- myconf+=" --disable-asm" |
4239 |
- fi |
4240 |
- |
4241 |
- if use gallium; then |
4242 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
4243 |
- else |
4244 |
- myconf+=" $(use_enable osmesa)" |
4245 |
- fi |
4246 |
- |
4247 |
- # build fails with BSD indent, bug #428112 |
4248 |
- use userland_GNU || export INDENT=cat |
4249 |
- |
4250 |
- ECONF_SOURCE="${S}" \ |
4251 |
- econf \ |
4252 |
- --enable-dri \ |
4253 |
- --enable-glx \ |
4254 |
- --enable-shared-glapi \ |
4255 |
- $(use_enable !bindist texture-float) \ |
4256 |
- $(use_enable d3d9 nine) \ |
4257 |
- $(use_enable debug) \ |
4258 |
- $(use_enable dri3) \ |
4259 |
- $(use_enable egl) \ |
4260 |
- $(use_enable gbm) \ |
4261 |
- $(use_enable gles1) \ |
4262 |
- $(use_enable gles2) \ |
4263 |
- $(use_enable nptl glx-tls) \ |
4264 |
- $(use_enable unwind libunwind) \ |
4265 |
- --enable-valgrind=$(usex valgrind auto no) \ |
4266 |
- --enable-llvm-shared-libs \ |
4267 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
4268 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
4269 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
4270 |
- PYTHON2="${PYTHON}" \ |
4271 |
- ${myconf} |
4272 |
-} |
4273 |
- |
4274 |
-multilib_src_install() { |
4275 |
- emake install DESTDIR="${D}" |
4276 |
- |
4277 |
- if use classic || use gallium; then |
4278 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
4279 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
4280 |
- keepdir /usr/$(get_libdir)/dri |
4281 |
- dodir /usr/$(get_libdir)/mesa |
4282 |
- for x in ${gallium_drivers[@]}; do |
4283 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
4284 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
4285 |
- || die "Failed to move ${x}" |
4286 |
- fi |
4287 |
- done |
4288 |
- if use classic; then |
4289 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
4290 |
- fi |
4291 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
4292 |
- if [ -f ${x} -o -L ${x} ]; then |
4293 |
- mv -f "${x}" "${x/dri/mesa}" \ |
4294 |
- || die "Failed to move ${x}" |
4295 |
- fi |
4296 |
- done |
4297 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
4298 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
4299 |
- # remove symlinks to drivers known to eselect |
4300 |
- for x in ${gallium_drivers[@]}; do |
4301 |
- if [ -f ${x} -o -L ${x} ]; then |
4302 |
- rm "${x}" || die "Failed to remove ${x}" |
4303 |
- fi |
4304 |
- done |
4305 |
- popd |
4306 |
- eend $? |
4307 |
- fi |
4308 |
- if use opencl; then |
4309 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
4310 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
4311 |
- dodir ${cl_dir}/{lib,include} |
4312 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
4313 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
4314 |
- "${ED}"${cl_dir} |
4315 |
- fi |
4316 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
4317 |
- mv -f "${ED}"/usr/include/CL \ |
4318 |
- "${ED}"${cl_dir}/include |
4319 |
- fi |
4320 |
- eend $? |
4321 |
- fi |
4322 |
- |
4323 |
- if use openmax; then |
4324 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
4325 |
- doenvd "${T}"/99mesaxdgomx |
4326 |
- keepdir /usr/share/mesa/xdg |
4327 |
- fi |
4328 |
-} |
4329 |
- |
4330 |
-multilib_src_install_all() { |
4331 |
- find "${ED}" -name '*.la' -delete |
4332 |
- einstalldocs |
4333 |
- |
4334 |
- if use !bindist; then |
4335 |
- dodoc docs/patents.txt |
4336 |
- fi |
4337 |
- |
4338 |
- # Install config file for eselect mesa |
4339 |
- insinto /usr/share/mesa |
4340 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
4341 |
-} |
4342 |
- |
4343 |
-multilib_src_test() { |
4344 |
- if use llvm; then |
4345 |
- 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' |
4346 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
4347 |
- emake ${llvm_tests} |
4348 |
- pax-mark m ${llvm_tests} |
4349 |
- popd >/dev/null || die |
4350 |
- fi |
4351 |
- emake check |
4352 |
-} |
4353 |
- |
4354 |
-pkg_postinst() { |
4355 |
- # Switch to the xorg implementation. |
4356 |
- echo |
4357 |
- eselect opengl set --use-old ${OPENGL_DIR} |
4358 |
- |
4359 |
- # Select classic/gallium drivers |
4360 |
- if use classic || use gallium; then |
4361 |
- eselect mesa set --auto |
4362 |
- fi |
4363 |
- |
4364 |
- # Switch to mesa opencl |
4365 |
- if use opencl; then |
4366 |
- eselect opencl set --use-old ${PN} |
4367 |
- fi |
4368 |
- |
4369 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
4370 |
- if use openmax; then |
4371 |
- ebegin "Registering OpenMAX drivers" |
4372 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
4373 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
4374 |
- omxregister-bellagio |
4375 |
- eend $? |
4376 |
- fi |
4377 |
- |
4378 |
- # warn about patent encumbered texture-float |
4379 |
- if use !bindist; then |
4380 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
4381 |
- elog "enabled. Please see patents.txt for an explanation." |
4382 |
- fi |
4383 |
- |
4384 |
- if ! has_version media-libs/libtxc_dxtn; then |
4385 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
4386 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
4387 |
- elog "textures in some apps, and some others even require this to run." |
4388 |
- fi |
4389 |
-} |
4390 |
- |
4391 |
-pkg_prerm() { |
4392 |
- if use openmax; then |
4393 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
4394 |
- fi |
4395 |
-} |
4396 |
- |
4397 |
-# $1 - VIDEO_CARDS flag |
4398 |
-# other args - names of DRI drivers to enable |
4399 |
-# TODO: avoid code duplication for a more elegant implementation |
4400 |
-driver_enable() { |
4401 |
- case $# in |
4402 |
- # for enabling unconditionally |
4403 |
- 1) |
4404 |
- DRI_DRIVERS+=",$1" |
4405 |
- ;; |
4406 |
- *) |
4407 |
- if use $1; then |
4408 |
- shift |
4409 |
- for i in $@; do |
4410 |
- DRI_DRIVERS+=",${i}" |
4411 |
- done |
4412 |
- fi |
4413 |
- ;; |
4414 |
- esac |
4415 |
-} |
4416 |
- |
4417 |
-gallium_enable() { |
4418 |
- case $# in |
4419 |
- # for enabling unconditionally |
4420 |
- 1) |
4421 |
- GALLIUM_DRIVERS+=",$1" |
4422 |
- ;; |
4423 |
- *) |
4424 |
- if use $1; then |
4425 |
- shift |
4426 |
- for i in $@; do |
4427 |
- GALLIUM_DRIVERS+=",${i}" |
4428 |
- done |
4429 |
- fi |
4430 |
- ;; |
4431 |
- esac |
4432 |
-} |
4433 |
- |
4434 |
-vulkan_enable() { |
4435 |
- case $# in |
4436 |
- # for enabling unconditionally |
4437 |
- 1) |
4438 |
- VULKAN_DRIVERS+=",$1" |
4439 |
- ;; |
4440 |
- *) |
4441 |
- if use $1; then |
4442 |
- shift |
4443 |
- for i in $@; do |
4444 |
- VULKAN_DRIVERS+=",${i}" |
4445 |
- done |
4446 |
- fi |
4447 |
- ;; |
4448 |
- esac |
4449 |
-} |
4450 |
|
4451 |
diff --git a/media-libs/mesa/mesa-17.2.3.ebuild b/media-libs/mesa/mesa-17.2.3.ebuild |
4452 |
deleted file mode 100644 |
4453 |
index 827ebae..0000000 |
4454 |
--- a/media-libs/mesa/mesa-17.2.3.ebuild |
4455 |
+++ /dev/null |
4456 |
@@ -1,586 +0,0 @@ |
4457 |
-# Copyright 1999-2017 Gentoo Foundation |
4458 |
-# Distributed under the terms of the GNU General Public License v2 |
4459 |
- |
4460 |
-EAPI=6 |
4461 |
- |
4462 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
4463 |
- |
4464 |
-if [[ ${PV} = 9999 ]]; then |
4465 |
- GIT_ECLASS="git-r3" |
4466 |
- EXPERIMENTAL="true" |
4467 |
-fi |
4468 |
- |
4469 |
-PYTHON_COMPAT=( python2_7 ) |
4470 |
- |
4471 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
4472 |
- |
4473 |
-OPENGL_DIR="xorg-x11" |
4474 |
- |
4475 |
-MY_P="${P/_/-}" |
4476 |
- |
4477 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
4478 |
-HOMEPAGE="https://www.mesa3d.org/" |
4479 |
- |
4480 |
-if [[ $PV == 9999 ]]; then |
4481 |
- SRC_URI="" |
4482 |
-else |
4483 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
4484 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
4485 |
-fi |
4486 |
- |
4487 |
-LICENSE="MIT" |
4488 |
-SLOT="0" |
4489 |
-RESTRICT="!bindist? ( bindist )" |
4490 |
- |
4491 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
4492 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
4493 |
-for card in ${VIDEO_CARDS}; do |
4494 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
4495 |
-done |
4496 |
- |
4497 |
-IUSE="${IUSE_VIDEO_CARDS} |
4498 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
4499 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
4500 |
- vdpau vulkan wayland xvmc xa" |
4501 |
- |
4502 |
-REQUIRED_USE=" |
4503 |
- d3d9? ( dri3 gallium ) |
4504 |
- llvm? ( gallium ) |
4505 |
- opencl? ( gallium llvm ) |
4506 |
- openmax? ( gallium ) |
4507 |
- gles1? ( egl ) |
4508 |
- gles2? ( egl ) |
4509 |
- vaapi? ( gallium ) |
4510 |
- vdpau? ( gallium ) |
4511 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
4512 |
- video_cards_radeonsi? ( llvm ) ) |
4513 |
- wayland? ( egl gbm ) |
4514 |
- xa? ( gallium ) |
4515 |
- video_cards_freedreno? ( gallium ) |
4516 |
- video_cards_intel? ( classic ) |
4517 |
- video_cards_i915? ( || ( classic gallium ) ) |
4518 |
- video_cards_i965? ( classic ) |
4519 |
- video_cards_imx? ( gallium ) |
4520 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
4521 |
- video_cards_radeon? ( || ( classic gallium ) |
4522 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
4523 |
- video_cards_r100? ( classic ) |
4524 |
- video_cards_r200? ( classic ) |
4525 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
4526 |
- video_cards_r600? ( gallium ) |
4527 |
- video_cards_radeonsi? ( gallium llvm ) |
4528 |
- video_cards_vc4? ( gallium ) |
4529 |
- video_cards_virgl? ( gallium ) |
4530 |
- video_cards_vivante? ( gallium gbm ) |
4531 |
- video_cards_vmware? ( gallium ) |
4532 |
-" |
4533 |
- |
4534 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82" |
4535 |
-# keep correct libdrm and dri2proto dep |
4536 |
-# keep blocks in rdepend for binpkg |
4537 |
-RDEPEND=" |
4538 |
- !<x11-base/xorg-server-1.7 |
4539 |
- !<=x11-proto/xf86driproto-2.0.3 |
4540 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
4541 |
- classic? ( app-eselect/eselect-mesa ) |
4542 |
- gallium? ( app-eselect/eselect-mesa ) |
4543 |
- >=app-eselect/eselect-opengl-1.3.0 |
4544 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
4545 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
4546 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
4547 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
4548 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
4549 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
4550 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
4551 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
4552 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
4553 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
4554 |
- llvm? ( |
4555 |
- video_cards_radeonsi? ( |
4556 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
4557 |
- ) |
4558 |
- video_cards_r600? ( |
4559 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
4560 |
- ) |
4561 |
- video_cards_radeon? ( |
4562 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
4563 |
- ) |
4564 |
- ) |
4565 |
- opencl? ( |
4566 |
- app-eselect/eselect-opencl |
4567 |
- dev-libs/libclc |
4568 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
4569 |
- ) |
4570 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
4571 |
- vaapi? ( |
4572 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
4573 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
4574 |
- ) |
4575 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
4576 |
- wayland? ( |
4577 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
4578 |
- >=dev-libs/wayland-protocols-1.8 |
4579 |
- ) |
4580 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
4581 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
4582 |
- |
4583 |
- video_cards_intel? ( |
4584 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
4585 |
- ) |
4586 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
4587 |
-" |
4588 |
-for card in ${RADEON_CARDS}; do |
4589 |
- RDEPEND="${RDEPEND} |
4590 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
4591 |
- " |
4592 |
-done |
4593 |
-RDEPEND="${RDEPEND} |
4594 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
4595 |
-" |
4596 |
- |
4597 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
4598 |
-# we need to *really* make sure we're not pulling one than more slot |
4599 |
-# simultaneously. |
4600 |
-# |
4601 |
-# How to use it: |
4602 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
4603 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
4604 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
4605 |
-LLVM_MAX_SLOT="5" |
4606 |
-LLVM_DEPSTR=" |
4607 |
- || ( |
4608 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
4609 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
4610 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
4611 |
- ) |
4612 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
4613 |
-" |
4614 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
4615 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
4616 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
4617 |
-RDEPEND="${RDEPEND} |
4618 |
- llvm? ( |
4619 |
- opencl? ( |
4620 |
- video_cards_r600? ( |
4621 |
- ${CLANG_DEPSTR_AMDGPU} |
4622 |
- ) |
4623 |
- !video_cards_r600? ( |
4624 |
- video_cards_radeonsi? ( |
4625 |
- ${CLANG_DEPSTR_AMDGPU} |
4626 |
- ) |
4627 |
- ) |
4628 |
- !video_cards_r600? ( |
4629 |
- !video_cards_radeonsi? ( |
4630 |
- video_cards_radeon? ( |
4631 |
- ${CLANG_DEPSTR_AMDGPU} |
4632 |
- ) |
4633 |
- ) |
4634 |
- ) |
4635 |
- !video_cards_r600? ( |
4636 |
- !video_cards_radeon? ( |
4637 |
- !video_cards_radeonsi? ( |
4638 |
- ${CLANG_DEPSTR} |
4639 |
- ) |
4640 |
- ) |
4641 |
- ) |
4642 |
- ) |
4643 |
- !opencl? ( |
4644 |
- video_cards_r600? ( |
4645 |
- ${LLVM_DEPSTR_AMDGPU} |
4646 |
- ) |
4647 |
- !video_cards_r600? ( |
4648 |
- video_cards_radeonsi? ( |
4649 |
- ${LLVM_DEPSTR_AMDGPU} |
4650 |
- ) |
4651 |
- ) |
4652 |
- !video_cards_r600? ( |
4653 |
- !video_cards_radeonsi? ( |
4654 |
- video_cards_radeon? ( |
4655 |
- ${LLVM_DEPSTR_AMDGPU} |
4656 |
- ) |
4657 |
- ) |
4658 |
- ) |
4659 |
- !video_cards_r600? ( |
4660 |
- !video_cards_radeon? ( |
4661 |
- !video_cards_radeonsi? ( |
4662 |
- ${LLVM_DEPSTR} |
4663 |
- ) |
4664 |
- ) |
4665 |
- ) |
4666 |
- ) |
4667 |
- ) |
4668 |
-" |
4669 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
4670 |
- |
4671 |
-DEPEND="${RDEPEND} |
4672 |
- ${PYTHON_DEPS} |
4673 |
- opencl? ( |
4674 |
- >=sys-devel/gcc-4.6 |
4675 |
- ) |
4676 |
- sys-devel/gettext |
4677 |
- virtual/pkgconfig |
4678 |
- valgrind? ( dev-util/valgrind ) |
4679 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
4680 |
- dri3? ( |
4681 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
4682 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
4683 |
- ) |
4684 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
4685 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
4686 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
4687 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
4688 |
-" |
4689 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
4690 |
- sys-devel/bison |
4691 |
- sys-devel/flex |
4692 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
4693 |
-" |
4694 |
- |
4695 |
-S="${WORKDIR}/${MY_P}" |
4696 |
-EGIT_CHECKOUT_DIR=${S} |
4697 |
- |
4698 |
-QA_WX_LOAD=" |
4699 |
-x86? ( |
4700 |
- !pic? ( |
4701 |
- usr/lib*/libglapi.so.0.0.0 |
4702 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
4703 |
- usr/lib*/libGLESv2.so.2.0.0 |
4704 |
- usr/lib*/libGL.so.1.2.0 |
4705 |
- usr/lib*/libOSMesa.so.8.0.0 |
4706 |
- ) |
4707 |
-)" |
4708 |
- |
4709 |
-llvm_check_deps() { |
4710 |
- local flags=${MULTILIB_USEDEP} |
4711 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
4712 |
- then |
4713 |
- flags+=",llvm_targets_AMDGPU(-)" |
4714 |
- fi |
4715 |
- |
4716 |
- if use opencl; then |
4717 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
4718 |
- fi |
4719 |
- has_version "sys-devel/llvm[${flags}]" |
4720 |
-} |
4721 |
- |
4722 |
-pkg_setup() { |
4723 |
- # warning message for bug 459306 |
4724 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
4725 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
4726 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
4727 |
- fi |
4728 |
- |
4729 |
- if use llvm; then |
4730 |
- llvm_pkg_setup |
4731 |
- fi |
4732 |
- python-any-r1_pkg_setup |
4733 |
-} |
4734 |
- |
4735 |
-src_prepare() { |
4736 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
4737 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
4738 |
- |
4739 |
- eautoreconf |
4740 |
- |
4741 |
- eapply_user |
4742 |
-} |
4743 |
- |
4744 |
-multilib_src_configure() { |
4745 |
- local myconf |
4746 |
- |
4747 |
- if use classic; then |
4748 |
- # Configurable DRI drivers |
4749 |
- driver_enable swrast |
4750 |
- |
4751 |
- # Intel code |
4752 |
- driver_enable video_cards_i915 i915 |
4753 |
- driver_enable video_cards_i965 i965 |
4754 |
- if ! use video_cards_i915 && \ |
4755 |
- ! use video_cards_i965; then |
4756 |
- driver_enable video_cards_intel i915 i965 |
4757 |
- fi |
4758 |
- |
4759 |
- # Nouveau code |
4760 |
- driver_enable video_cards_nouveau nouveau |
4761 |
- |
4762 |
- # ATI code |
4763 |
- driver_enable video_cards_r100 radeon |
4764 |
- driver_enable video_cards_r200 r200 |
4765 |
- if ! use video_cards_r100 && \ |
4766 |
- ! use video_cards_r200; then |
4767 |
- driver_enable video_cards_radeon radeon r200 |
4768 |
- fi |
4769 |
- fi |
4770 |
- |
4771 |
- if use egl; then |
4772 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
4773 |
- fi |
4774 |
- |
4775 |
- if use gallium; then |
4776 |
- myconf+=" |
4777 |
- $(use_enable d3d9 nine) |
4778 |
- $(use_enable llvm) |
4779 |
- $(use_enable openmax omx) |
4780 |
- $(use_enable vaapi va) |
4781 |
- $(use_enable vdpau) |
4782 |
- $(use_enable xa) |
4783 |
- $(use_enable xvmc) |
4784 |
- " |
4785 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
4786 |
- |
4787 |
- gallium_enable swrast |
4788 |
- gallium_enable video_cards_vc4 vc4 |
4789 |
- gallium_enable video_cards_vivante etnaviv |
4790 |
- gallium_enable video_cards_vmware svga |
4791 |
- gallium_enable video_cards_nouveau nouveau |
4792 |
- gallium_enable video_cards_i915 i915 |
4793 |
- gallium_enable video_cards_imx imx |
4794 |
- if ! use video_cards_i915 && \ |
4795 |
- ! use video_cards_i965; then |
4796 |
- gallium_enable video_cards_intel i915 |
4797 |
- fi |
4798 |
- |
4799 |
- gallium_enable video_cards_r300 r300 |
4800 |
- gallium_enable video_cards_r600 r600 |
4801 |
- gallium_enable video_cards_radeonsi radeonsi |
4802 |
- if ! use video_cards_r300 && \ |
4803 |
- ! use video_cards_r600; then |
4804 |
- gallium_enable video_cards_radeon r300 r600 |
4805 |
- fi |
4806 |
- |
4807 |
- gallium_enable video_cards_freedreno freedreno |
4808 |
- # opencl stuff |
4809 |
- if use opencl; then |
4810 |
- myconf+=" |
4811 |
- $(use_enable opencl) |
4812 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
4813 |
- " |
4814 |
- fi |
4815 |
- |
4816 |
- gallium_enable video_cards_virgl virgl |
4817 |
- fi |
4818 |
- |
4819 |
- if use vulkan; then |
4820 |
- vulkan_enable video_cards_i965 intel |
4821 |
- vulkan_enable video_cards_radeonsi radeon |
4822 |
- fi |
4823 |
- |
4824 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
4825 |
- if [[ ${ABI} == x86 ]]; then |
4826 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
4827 |
- fi |
4828 |
- |
4829 |
- # on abi_x86_32 hardened we need to have asm disable |
4830 |
- if [[ ${ABI} == x86* ]] && use pic; then |
4831 |
- myconf+=" --disable-asm" |
4832 |
- fi |
4833 |
- |
4834 |
- if use gallium; then |
4835 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
4836 |
- else |
4837 |
- myconf+=" $(use_enable osmesa)" |
4838 |
- fi |
4839 |
- |
4840 |
- # build fails with BSD indent, bug #428112 |
4841 |
- use userland_GNU || export INDENT=cat |
4842 |
- |
4843 |
- ECONF_SOURCE="${S}" \ |
4844 |
- econf \ |
4845 |
- --enable-dri \ |
4846 |
- --enable-glx \ |
4847 |
- --enable-shared-glapi \ |
4848 |
- $(use_enable !bindist texture-float) \ |
4849 |
- $(use_enable d3d9 nine) \ |
4850 |
- $(use_enable debug) \ |
4851 |
- $(use_enable dri3) \ |
4852 |
- $(use_enable egl) \ |
4853 |
- $(use_enable gbm) \ |
4854 |
- $(use_enable gles1) \ |
4855 |
- $(use_enable gles2) \ |
4856 |
- $(use_enable nptl glx-tls) \ |
4857 |
- $(use_enable unwind libunwind) \ |
4858 |
- --enable-valgrind=$(usex valgrind auto no) \ |
4859 |
- --enable-llvm-shared-libs \ |
4860 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
4861 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
4862 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
4863 |
- PYTHON2="${PYTHON}" \ |
4864 |
- ${myconf} |
4865 |
-} |
4866 |
- |
4867 |
-multilib_src_install() { |
4868 |
- emake install DESTDIR="${D}" |
4869 |
- |
4870 |
- if use classic || use gallium; then |
4871 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
4872 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
4873 |
- keepdir /usr/$(get_libdir)/dri |
4874 |
- dodir /usr/$(get_libdir)/mesa |
4875 |
- for x in ${gallium_drivers[@]}; do |
4876 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
4877 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
4878 |
- || die "Failed to move ${x}" |
4879 |
- fi |
4880 |
- done |
4881 |
- if use classic; then |
4882 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
4883 |
- fi |
4884 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
4885 |
- if [ -f ${x} -o -L ${x} ]; then |
4886 |
- mv -f "${x}" "${x/dri/mesa}" \ |
4887 |
- || die "Failed to move ${x}" |
4888 |
- fi |
4889 |
- done |
4890 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
4891 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
4892 |
- # remove symlinks to drivers known to eselect |
4893 |
- for x in ${gallium_drivers[@]}; do |
4894 |
- if [ -f ${x} -o -L ${x} ]; then |
4895 |
- rm "${x}" || die "Failed to remove ${x}" |
4896 |
- fi |
4897 |
- done |
4898 |
- popd |
4899 |
- eend $? |
4900 |
- fi |
4901 |
- if use opencl; then |
4902 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
4903 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
4904 |
- dodir ${cl_dir}/{lib,include} |
4905 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
4906 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
4907 |
- "${ED}"${cl_dir} |
4908 |
- fi |
4909 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
4910 |
- mv -f "${ED}"/usr/include/CL \ |
4911 |
- "${ED}"${cl_dir}/include |
4912 |
- fi |
4913 |
- eend $? |
4914 |
- fi |
4915 |
- |
4916 |
- if use openmax; then |
4917 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
4918 |
- doenvd "${T}"/99mesaxdgomx |
4919 |
- keepdir /usr/share/mesa/xdg |
4920 |
- fi |
4921 |
-} |
4922 |
- |
4923 |
-multilib_src_install_all() { |
4924 |
- find "${ED}" -name '*.la' -delete |
4925 |
- einstalldocs |
4926 |
- |
4927 |
- if use !bindist; then |
4928 |
- dodoc docs/patents.txt |
4929 |
- fi |
4930 |
- |
4931 |
- # Install config file for eselect mesa |
4932 |
- insinto /usr/share/mesa |
4933 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
4934 |
-} |
4935 |
- |
4936 |
-multilib_src_test() { |
4937 |
- if use llvm; then |
4938 |
- 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' |
4939 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
4940 |
- emake ${llvm_tests} |
4941 |
- pax-mark m ${llvm_tests} |
4942 |
- popd >/dev/null || die |
4943 |
- fi |
4944 |
- emake check |
4945 |
-} |
4946 |
- |
4947 |
-pkg_postinst() { |
4948 |
- # Switch to the xorg implementation. |
4949 |
- echo |
4950 |
- eselect opengl set --use-old ${OPENGL_DIR} |
4951 |
- |
4952 |
- # Select classic/gallium drivers |
4953 |
- if use classic || use gallium; then |
4954 |
- eselect mesa set --auto |
4955 |
- fi |
4956 |
- |
4957 |
- # Switch to mesa opencl |
4958 |
- if use opencl; then |
4959 |
- eselect opencl set --use-old ${PN} |
4960 |
- fi |
4961 |
- |
4962 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
4963 |
- if use openmax; then |
4964 |
- ebegin "Registering OpenMAX drivers" |
4965 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
4966 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
4967 |
- omxregister-bellagio |
4968 |
- eend $? |
4969 |
- fi |
4970 |
- |
4971 |
- # warn about patent encumbered texture-float |
4972 |
- if use !bindist; then |
4973 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
4974 |
- elog "enabled. Please see patents.txt for an explanation." |
4975 |
- fi |
4976 |
- |
4977 |
- if ! has_version media-libs/libtxc_dxtn; then |
4978 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
4979 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
4980 |
- elog "textures in some apps, and some others even require this to run." |
4981 |
- fi |
4982 |
-} |
4983 |
- |
4984 |
-pkg_prerm() { |
4985 |
- if use openmax; then |
4986 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
4987 |
- fi |
4988 |
-} |
4989 |
- |
4990 |
-# $1 - VIDEO_CARDS flag |
4991 |
-# other args - names of DRI drivers to enable |
4992 |
-# TODO: avoid code duplication for a more elegant implementation |
4993 |
-driver_enable() { |
4994 |
- case $# in |
4995 |
- # for enabling unconditionally |
4996 |
- 1) |
4997 |
- DRI_DRIVERS+=",$1" |
4998 |
- ;; |
4999 |
- *) |
5000 |
- if use $1; then |
5001 |
- shift |
5002 |
- for i in $@; do |
5003 |
- DRI_DRIVERS+=",${i}" |
5004 |
- done |
5005 |
- fi |
5006 |
- ;; |
5007 |
- esac |
5008 |
-} |
5009 |
- |
5010 |
-gallium_enable() { |
5011 |
- case $# in |
5012 |
- # for enabling unconditionally |
5013 |
- 1) |
5014 |
- GALLIUM_DRIVERS+=",$1" |
5015 |
- ;; |
5016 |
- *) |
5017 |
- if use $1; then |
5018 |
- shift |
5019 |
- for i in $@; do |
5020 |
- GALLIUM_DRIVERS+=",${i}" |
5021 |
- done |
5022 |
- fi |
5023 |
- ;; |
5024 |
- esac |
5025 |
-} |
5026 |
- |
5027 |
-vulkan_enable() { |
5028 |
- case $# in |
5029 |
- # for enabling unconditionally |
5030 |
- 1) |
5031 |
- VULKAN_DRIVERS+=",$1" |
5032 |
- ;; |
5033 |
- *) |
5034 |
- if use $1; then |
5035 |
- shift |
5036 |
- for i in $@; do |
5037 |
- VULKAN_DRIVERS+=",${i}" |
5038 |
- done |
5039 |
- fi |
5040 |
- ;; |
5041 |
- esac |
5042 |
-} |
5043 |
|
5044 |
diff --git a/media-libs/mesa/mesa-17.2.4.ebuild b/media-libs/mesa/mesa-17.2.4.ebuild |
5045 |
deleted file mode 100644 |
5046 |
index 827ebae..0000000 |
5047 |
--- a/media-libs/mesa/mesa-17.2.4.ebuild |
5048 |
+++ /dev/null |
5049 |
@@ -1,586 +0,0 @@ |
5050 |
-# Copyright 1999-2017 Gentoo Foundation |
5051 |
-# Distributed under the terms of the GNU General Public License v2 |
5052 |
- |
5053 |
-EAPI=6 |
5054 |
- |
5055 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
5056 |
- |
5057 |
-if [[ ${PV} = 9999 ]]; then |
5058 |
- GIT_ECLASS="git-r3" |
5059 |
- EXPERIMENTAL="true" |
5060 |
-fi |
5061 |
- |
5062 |
-PYTHON_COMPAT=( python2_7 ) |
5063 |
- |
5064 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
5065 |
- |
5066 |
-OPENGL_DIR="xorg-x11" |
5067 |
- |
5068 |
-MY_P="${P/_/-}" |
5069 |
- |
5070 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
5071 |
-HOMEPAGE="https://www.mesa3d.org/" |
5072 |
- |
5073 |
-if [[ $PV == 9999 ]]; then |
5074 |
- SRC_URI="" |
5075 |
-else |
5076 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
5077 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
5078 |
-fi |
5079 |
- |
5080 |
-LICENSE="MIT" |
5081 |
-SLOT="0" |
5082 |
-RESTRICT="!bindist? ( bindist )" |
5083 |
- |
5084 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
5085 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
5086 |
-for card in ${VIDEO_CARDS}; do |
5087 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
5088 |
-done |
5089 |
- |
5090 |
-IUSE="${IUSE_VIDEO_CARDS} |
5091 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
5092 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
5093 |
- vdpau vulkan wayland xvmc xa" |
5094 |
- |
5095 |
-REQUIRED_USE=" |
5096 |
- d3d9? ( dri3 gallium ) |
5097 |
- llvm? ( gallium ) |
5098 |
- opencl? ( gallium llvm ) |
5099 |
- openmax? ( gallium ) |
5100 |
- gles1? ( egl ) |
5101 |
- gles2? ( egl ) |
5102 |
- vaapi? ( gallium ) |
5103 |
- vdpau? ( gallium ) |
5104 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
5105 |
- video_cards_radeonsi? ( llvm ) ) |
5106 |
- wayland? ( egl gbm ) |
5107 |
- xa? ( gallium ) |
5108 |
- video_cards_freedreno? ( gallium ) |
5109 |
- video_cards_intel? ( classic ) |
5110 |
- video_cards_i915? ( || ( classic gallium ) ) |
5111 |
- video_cards_i965? ( classic ) |
5112 |
- video_cards_imx? ( gallium ) |
5113 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
5114 |
- video_cards_radeon? ( || ( classic gallium ) |
5115 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
5116 |
- video_cards_r100? ( classic ) |
5117 |
- video_cards_r200? ( classic ) |
5118 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
5119 |
- video_cards_r600? ( gallium ) |
5120 |
- video_cards_radeonsi? ( gallium llvm ) |
5121 |
- video_cards_vc4? ( gallium ) |
5122 |
- video_cards_virgl? ( gallium ) |
5123 |
- video_cards_vivante? ( gallium gbm ) |
5124 |
- video_cards_vmware? ( gallium ) |
5125 |
-" |
5126 |
- |
5127 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82" |
5128 |
-# keep correct libdrm and dri2proto dep |
5129 |
-# keep blocks in rdepend for binpkg |
5130 |
-RDEPEND=" |
5131 |
- !<x11-base/xorg-server-1.7 |
5132 |
- !<=x11-proto/xf86driproto-2.0.3 |
5133 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
5134 |
- classic? ( app-eselect/eselect-mesa ) |
5135 |
- gallium? ( app-eselect/eselect-mesa ) |
5136 |
- >=app-eselect/eselect-opengl-1.3.0 |
5137 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
5138 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
5139 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
5140 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
5141 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
5142 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
5143 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
5144 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
5145 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
5146 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
5147 |
- llvm? ( |
5148 |
- video_cards_radeonsi? ( |
5149 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5150 |
- ) |
5151 |
- video_cards_r600? ( |
5152 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5153 |
- ) |
5154 |
- video_cards_radeon? ( |
5155 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5156 |
- ) |
5157 |
- ) |
5158 |
- opencl? ( |
5159 |
- app-eselect/eselect-opencl |
5160 |
- dev-libs/libclc |
5161 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5162 |
- ) |
5163 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
5164 |
- vaapi? ( |
5165 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
5166 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
5167 |
- ) |
5168 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
5169 |
- wayland? ( |
5170 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
5171 |
- >=dev-libs/wayland-protocols-1.8 |
5172 |
- ) |
5173 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
5174 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
5175 |
- |
5176 |
- video_cards_intel? ( |
5177 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
5178 |
- ) |
5179 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
5180 |
-" |
5181 |
-for card in ${RADEON_CARDS}; do |
5182 |
- RDEPEND="${RDEPEND} |
5183 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
5184 |
- " |
5185 |
-done |
5186 |
-RDEPEND="${RDEPEND} |
5187 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
5188 |
-" |
5189 |
- |
5190 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
5191 |
-# we need to *really* make sure we're not pulling one than more slot |
5192 |
-# simultaneously. |
5193 |
-# |
5194 |
-# How to use it: |
5195 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
5196 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
5197 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
5198 |
-LLVM_MAX_SLOT="5" |
5199 |
-LLVM_DEPSTR=" |
5200 |
- || ( |
5201 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
5202 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
5203 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
5204 |
- ) |
5205 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
5206 |
-" |
5207 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
5208 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
5209 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
5210 |
-RDEPEND="${RDEPEND} |
5211 |
- llvm? ( |
5212 |
- opencl? ( |
5213 |
- video_cards_r600? ( |
5214 |
- ${CLANG_DEPSTR_AMDGPU} |
5215 |
- ) |
5216 |
- !video_cards_r600? ( |
5217 |
- video_cards_radeonsi? ( |
5218 |
- ${CLANG_DEPSTR_AMDGPU} |
5219 |
- ) |
5220 |
- ) |
5221 |
- !video_cards_r600? ( |
5222 |
- !video_cards_radeonsi? ( |
5223 |
- video_cards_radeon? ( |
5224 |
- ${CLANG_DEPSTR_AMDGPU} |
5225 |
- ) |
5226 |
- ) |
5227 |
- ) |
5228 |
- !video_cards_r600? ( |
5229 |
- !video_cards_radeon? ( |
5230 |
- !video_cards_radeonsi? ( |
5231 |
- ${CLANG_DEPSTR} |
5232 |
- ) |
5233 |
- ) |
5234 |
- ) |
5235 |
- ) |
5236 |
- !opencl? ( |
5237 |
- video_cards_r600? ( |
5238 |
- ${LLVM_DEPSTR_AMDGPU} |
5239 |
- ) |
5240 |
- !video_cards_r600? ( |
5241 |
- video_cards_radeonsi? ( |
5242 |
- ${LLVM_DEPSTR_AMDGPU} |
5243 |
- ) |
5244 |
- ) |
5245 |
- !video_cards_r600? ( |
5246 |
- !video_cards_radeonsi? ( |
5247 |
- video_cards_radeon? ( |
5248 |
- ${LLVM_DEPSTR_AMDGPU} |
5249 |
- ) |
5250 |
- ) |
5251 |
- ) |
5252 |
- !video_cards_r600? ( |
5253 |
- !video_cards_radeon? ( |
5254 |
- !video_cards_radeonsi? ( |
5255 |
- ${LLVM_DEPSTR} |
5256 |
- ) |
5257 |
- ) |
5258 |
- ) |
5259 |
- ) |
5260 |
- ) |
5261 |
-" |
5262 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
5263 |
- |
5264 |
-DEPEND="${RDEPEND} |
5265 |
- ${PYTHON_DEPS} |
5266 |
- opencl? ( |
5267 |
- >=sys-devel/gcc-4.6 |
5268 |
- ) |
5269 |
- sys-devel/gettext |
5270 |
- virtual/pkgconfig |
5271 |
- valgrind? ( dev-util/valgrind ) |
5272 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
5273 |
- dri3? ( |
5274 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
5275 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
5276 |
- ) |
5277 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
5278 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
5279 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
5280 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
5281 |
-" |
5282 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
5283 |
- sys-devel/bison |
5284 |
- sys-devel/flex |
5285 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
5286 |
-" |
5287 |
- |
5288 |
-S="${WORKDIR}/${MY_P}" |
5289 |
-EGIT_CHECKOUT_DIR=${S} |
5290 |
- |
5291 |
-QA_WX_LOAD=" |
5292 |
-x86? ( |
5293 |
- !pic? ( |
5294 |
- usr/lib*/libglapi.so.0.0.0 |
5295 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
5296 |
- usr/lib*/libGLESv2.so.2.0.0 |
5297 |
- usr/lib*/libGL.so.1.2.0 |
5298 |
- usr/lib*/libOSMesa.so.8.0.0 |
5299 |
- ) |
5300 |
-)" |
5301 |
- |
5302 |
-llvm_check_deps() { |
5303 |
- local flags=${MULTILIB_USEDEP} |
5304 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
5305 |
- then |
5306 |
- flags+=",llvm_targets_AMDGPU(-)" |
5307 |
- fi |
5308 |
- |
5309 |
- if use opencl; then |
5310 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
5311 |
- fi |
5312 |
- has_version "sys-devel/llvm[${flags}]" |
5313 |
-} |
5314 |
- |
5315 |
-pkg_setup() { |
5316 |
- # warning message for bug 459306 |
5317 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
5318 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
5319 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
5320 |
- fi |
5321 |
- |
5322 |
- if use llvm; then |
5323 |
- llvm_pkg_setup |
5324 |
- fi |
5325 |
- python-any-r1_pkg_setup |
5326 |
-} |
5327 |
- |
5328 |
-src_prepare() { |
5329 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
5330 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
5331 |
- |
5332 |
- eautoreconf |
5333 |
- |
5334 |
- eapply_user |
5335 |
-} |
5336 |
- |
5337 |
-multilib_src_configure() { |
5338 |
- local myconf |
5339 |
- |
5340 |
- if use classic; then |
5341 |
- # Configurable DRI drivers |
5342 |
- driver_enable swrast |
5343 |
- |
5344 |
- # Intel code |
5345 |
- driver_enable video_cards_i915 i915 |
5346 |
- driver_enable video_cards_i965 i965 |
5347 |
- if ! use video_cards_i915 && \ |
5348 |
- ! use video_cards_i965; then |
5349 |
- driver_enable video_cards_intel i915 i965 |
5350 |
- fi |
5351 |
- |
5352 |
- # Nouveau code |
5353 |
- driver_enable video_cards_nouveau nouveau |
5354 |
- |
5355 |
- # ATI code |
5356 |
- driver_enable video_cards_r100 radeon |
5357 |
- driver_enable video_cards_r200 r200 |
5358 |
- if ! use video_cards_r100 && \ |
5359 |
- ! use video_cards_r200; then |
5360 |
- driver_enable video_cards_radeon radeon r200 |
5361 |
- fi |
5362 |
- fi |
5363 |
- |
5364 |
- if use egl; then |
5365 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
5366 |
- fi |
5367 |
- |
5368 |
- if use gallium; then |
5369 |
- myconf+=" |
5370 |
- $(use_enable d3d9 nine) |
5371 |
- $(use_enable llvm) |
5372 |
- $(use_enable openmax omx) |
5373 |
- $(use_enable vaapi va) |
5374 |
- $(use_enable vdpau) |
5375 |
- $(use_enable xa) |
5376 |
- $(use_enable xvmc) |
5377 |
- " |
5378 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
5379 |
- |
5380 |
- gallium_enable swrast |
5381 |
- gallium_enable video_cards_vc4 vc4 |
5382 |
- gallium_enable video_cards_vivante etnaviv |
5383 |
- gallium_enable video_cards_vmware svga |
5384 |
- gallium_enable video_cards_nouveau nouveau |
5385 |
- gallium_enable video_cards_i915 i915 |
5386 |
- gallium_enable video_cards_imx imx |
5387 |
- if ! use video_cards_i915 && \ |
5388 |
- ! use video_cards_i965; then |
5389 |
- gallium_enable video_cards_intel i915 |
5390 |
- fi |
5391 |
- |
5392 |
- gallium_enable video_cards_r300 r300 |
5393 |
- gallium_enable video_cards_r600 r600 |
5394 |
- gallium_enable video_cards_radeonsi radeonsi |
5395 |
- if ! use video_cards_r300 && \ |
5396 |
- ! use video_cards_r600; then |
5397 |
- gallium_enable video_cards_radeon r300 r600 |
5398 |
- fi |
5399 |
- |
5400 |
- gallium_enable video_cards_freedreno freedreno |
5401 |
- # opencl stuff |
5402 |
- if use opencl; then |
5403 |
- myconf+=" |
5404 |
- $(use_enable opencl) |
5405 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
5406 |
- " |
5407 |
- fi |
5408 |
- |
5409 |
- gallium_enable video_cards_virgl virgl |
5410 |
- fi |
5411 |
- |
5412 |
- if use vulkan; then |
5413 |
- vulkan_enable video_cards_i965 intel |
5414 |
- vulkan_enable video_cards_radeonsi radeon |
5415 |
- fi |
5416 |
- |
5417 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
5418 |
- if [[ ${ABI} == x86 ]]; then |
5419 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
5420 |
- fi |
5421 |
- |
5422 |
- # on abi_x86_32 hardened we need to have asm disable |
5423 |
- if [[ ${ABI} == x86* ]] && use pic; then |
5424 |
- myconf+=" --disable-asm" |
5425 |
- fi |
5426 |
- |
5427 |
- if use gallium; then |
5428 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
5429 |
- else |
5430 |
- myconf+=" $(use_enable osmesa)" |
5431 |
- fi |
5432 |
- |
5433 |
- # build fails with BSD indent, bug #428112 |
5434 |
- use userland_GNU || export INDENT=cat |
5435 |
- |
5436 |
- ECONF_SOURCE="${S}" \ |
5437 |
- econf \ |
5438 |
- --enable-dri \ |
5439 |
- --enable-glx \ |
5440 |
- --enable-shared-glapi \ |
5441 |
- $(use_enable !bindist texture-float) \ |
5442 |
- $(use_enable d3d9 nine) \ |
5443 |
- $(use_enable debug) \ |
5444 |
- $(use_enable dri3) \ |
5445 |
- $(use_enable egl) \ |
5446 |
- $(use_enable gbm) \ |
5447 |
- $(use_enable gles1) \ |
5448 |
- $(use_enable gles2) \ |
5449 |
- $(use_enable nptl glx-tls) \ |
5450 |
- $(use_enable unwind libunwind) \ |
5451 |
- --enable-valgrind=$(usex valgrind auto no) \ |
5452 |
- --enable-llvm-shared-libs \ |
5453 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
5454 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
5455 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
5456 |
- PYTHON2="${PYTHON}" \ |
5457 |
- ${myconf} |
5458 |
-} |
5459 |
- |
5460 |
-multilib_src_install() { |
5461 |
- emake install DESTDIR="${D}" |
5462 |
- |
5463 |
- if use classic || use gallium; then |
5464 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
5465 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
5466 |
- keepdir /usr/$(get_libdir)/dri |
5467 |
- dodir /usr/$(get_libdir)/mesa |
5468 |
- for x in ${gallium_drivers[@]}; do |
5469 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
5470 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
5471 |
- || die "Failed to move ${x}" |
5472 |
- fi |
5473 |
- done |
5474 |
- if use classic; then |
5475 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
5476 |
- fi |
5477 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
5478 |
- if [ -f ${x} -o -L ${x} ]; then |
5479 |
- mv -f "${x}" "${x/dri/mesa}" \ |
5480 |
- || die "Failed to move ${x}" |
5481 |
- fi |
5482 |
- done |
5483 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
5484 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
5485 |
- # remove symlinks to drivers known to eselect |
5486 |
- for x in ${gallium_drivers[@]}; do |
5487 |
- if [ -f ${x} -o -L ${x} ]; then |
5488 |
- rm "${x}" || die "Failed to remove ${x}" |
5489 |
- fi |
5490 |
- done |
5491 |
- popd |
5492 |
- eend $? |
5493 |
- fi |
5494 |
- if use opencl; then |
5495 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
5496 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
5497 |
- dodir ${cl_dir}/{lib,include} |
5498 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
5499 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
5500 |
- "${ED}"${cl_dir} |
5501 |
- fi |
5502 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
5503 |
- mv -f "${ED}"/usr/include/CL \ |
5504 |
- "${ED}"${cl_dir}/include |
5505 |
- fi |
5506 |
- eend $? |
5507 |
- fi |
5508 |
- |
5509 |
- if use openmax; then |
5510 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
5511 |
- doenvd "${T}"/99mesaxdgomx |
5512 |
- keepdir /usr/share/mesa/xdg |
5513 |
- fi |
5514 |
-} |
5515 |
- |
5516 |
-multilib_src_install_all() { |
5517 |
- find "${ED}" -name '*.la' -delete |
5518 |
- einstalldocs |
5519 |
- |
5520 |
- if use !bindist; then |
5521 |
- dodoc docs/patents.txt |
5522 |
- fi |
5523 |
- |
5524 |
- # Install config file for eselect mesa |
5525 |
- insinto /usr/share/mesa |
5526 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
5527 |
-} |
5528 |
- |
5529 |
-multilib_src_test() { |
5530 |
- if use llvm; then |
5531 |
- 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' |
5532 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
5533 |
- emake ${llvm_tests} |
5534 |
- pax-mark m ${llvm_tests} |
5535 |
- popd >/dev/null || die |
5536 |
- fi |
5537 |
- emake check |
5538 |
-} |
5539 |
- |
5540 |
-pkg_postinst() { |
5541 |
- # Switch to the xorg implementation. |
5542 |
- echo |
5543 |
- eselect opengl set --use-old ${OPENGL_DIR} |
5544 |
- |
5545 |
- # Select classic/gallium drivers |
5546 |
- if use classic || use gallium; then |
5547 |
- eselect mesa set --auto |
5548 |
- fi |
5549 |
- |
5550 |
- # Switch to mesa opencl |
5551 |
- if use opencl; then |
5552 |
- eselect opencl set --use-old ${PN} |
5553 |
- fi |
5554 |
- |
5555 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
5556 |
- if use openmax; then |
5557 |
- ebegin "Registering OpenMAX drivers" |
5558 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
5559 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
5560 |
- omxregister-bellagio |
5561 |
- eend $? |
5562 |
- fi |
5563 |
- |
5564 |
- # warn about patent encumbered texture-float |
5565 |
- if use !bindist; then |
5566 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
5567 |
- elog "enabled. Please see patents.txt for an explanation." |
5568 |
- fi |
5569 |
- |
5570 |
- if ! has_version media-libs/libtxc_dxtn; then |
5571 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
5572 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
5573 |
- elog "textures in some apps, and some others even require this to run." |
5574 |
- fi |
5575 |
-} |
5576 |
- |
5577 |
-pkg_prerm() { |
5578 |
- if use openmax; then |
5579 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
5580 |
- fi |
5581 |
-} |
5582 |
- |
5583 |
-# $1 - VIDEO_CARDS flag |
5584 |
-# other args - names of DRI drivers to enable |
5585 |
-# TODO: avoid code duplication for a more elegant implementation |
5586 |
-driver_enable() { |
5587 |
- case $# in |
5588 |
- # for enabling unconditionally |
5589 |
- 1) |
5590 |
- DRI_DRIVERS+=",$1" |
5591 |
- ;; |
5592 |
- *) |
5593 |
- if use $1; then |
5594 |
- shift |
5595 |
- for i in $@; do |
5596 |
- DRI_DRIVERS+=",${i}" |
5597 |
- done |
5598 |
- fi |
5599 |
- ;; |
5600 |
- esac |
5601 |
-} |
5602 |
- |
5603 |
-gallium_enable() { |
5604 |
- case $# in |
5605 |
- # for enabling unconditionally |
5606 |
- 1) |
5607 |
- GALLIUM_DRIVERS+=",$1" |
5608 |
- ;; |
5609 |
- *) |
5610 |
- if use $1; then |
5611 |
- shift |
5612 |
- for i in $@; do |
5613 |
- GALLIUM_DRIVERS+=",${i}" |
5614 |
- done |
5615 |
- fi |
5616 |
- ;; |
5617 |
- esac |
5618 |
-} |
5619 |
- |
5620 |
-vulkan_enable() { |
5621 |
- case $# in |
5622 |
- # for enabling unconditionally |
5623 |
- 1) |
5624 |
- VULKAN_DRIVERS+=",$1" |
5625 |
- ;; |
5626 |
- *) |
5627 |
- if use $1; then |
5628 |
- shift |
5629 |
- for i in $@; do |
5630 |
- VULKAN_DRIVERS+=",${i}" |
5631 |
- done |
5632 |
- fi |
5633 |
- ;; |
5634 |
- esac |
5635 |
-} |
5636 |
|
5637 |
diff --git a/media-libs/mesa/mesa-17.2.5.ebuild b/media-libs/mesa/mesa-17.2.6.ebuild |
5638 |
similarity index 99% |
5639 |
rename from media-libs/mesa/mesa-17.2.5.ebuild |
5640 |
rename to media-libs/mesa/mesa-17.2.6.ebuild |
5641 |
index 827ebae..084bed6 100644 |
5642 |
--- a/media-libs/mesa/mesa-17.2.5.ebuild |
5643 |
+++ b/media-libs/mesa/mesa-17.2.6.ebuild |
5644 |
@@ -153,7 +153,7 @@ LLVM_DEPSTR=" |
5645 |
sys-devel/llvm:4[${MULTILIB_USEDEP}] |
5646 |
>=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
5647 |
) |
5648 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
5649 |
+ <sys-devel/llvm-6:=[${MULTILIB_USEDEP}] |
5650 |
" |
5651 |
LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
5652 |
CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
5653 |
|
5654 |
diff --git a/media-libs/mesa/mesa-17.3.0_rc3.ebuild b/media-libs/mesa/mesa-17.3.0.ebuild |
5655 |
similarity index 97% |
5656 |
rename from media-libs/mesa/mesa-17.3.0_rc3.ebuild |
5657 |
rename to media-libs/mesa/mesa-17.3.0.ebuild |
5658 |
index 1887909..1513134 100644 |
5659 |
--- a/media-libs/mesa/mesa-17.3.0_rc3.ebuild |
5660 |
+++ b/media-libs/mesa/mesa-17.3.0.ebuild |
5661 |
@@ -146,14 +146,14 @@ RDEPEND="${RDEPEND} |
5662 |
# 1. List all the working slots (with min versions) in ||, newest first. |
5663 |
# 2. Update the := to specify *max* version, e.g. < 7. |
5664 |
# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
5665 |
+LLVM_MAX_SLOT="5" |
5666 |
LLVM_DEPSTR=" |
5667 |
|| ( |
5668 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
5669 |
sys-devel/llvm:5[${MULTILIB_USEDEP}] |
5670 |
sys-devel/llvm:4[${MULTILIB_USEDEP}] |
5671 |
>=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
5672 |
) |
5673 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
5674 |
+ <sys-devel/llvm-6:=[${MULTILIB_USEDEP}] |
5675 |
" |
5676 |
LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
5677 |
CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
5678 |
@@ -518,13 +518,8 @@ pkg_postinst() { |
5679 |
# warn about patent encumbered texture-float |
5680 |
if use !bindist; then |
5681 |
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
5682 |
- elog "enabled. Please see patents.txt for an explanation." |
5683 |
- fi |
5684 |
- |
5685 |
- if ! has_version media-libs/libtxc_dxtn; then |
5686 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
5687 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
5688 |
- elog "textures in some apps, and some others even require this to run." |
5689 |
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
5690 |
+ elog "explanation." |
5691 |
fi |
5692 |
} |
5693 |
|
5694 |
|
5695 |
diff --git a/media-libs/mesa/mesa-17.3.0_rc2.ebuild b/media-libs/mesa/mesa-17.3.0_rc2.ebuild |
5696 |
deleted file mode 100644 |
5697 |
index 1887909..0000000 |
5698 |
--- a/media-libs/mesa/mesa-17.3.0_rc2.ebuild |
5699 |
+++ /dev/null |
5700 |
@@ -1,589 +0,0 @@ |
5701 |
-# Copyright 1999-2017 Gentoo Foundation |
5702 |
-# Distributed under the terms of the GNU General Public License v2 |
5703 |
- |
5704 |
-EAPI=6 |
5705 |
- |
5706 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
5707 |
- |
5708 |
-if [[ ${PV} = 9999 ]]; then |
5709 |
- GIT_ECLASS="git-r3" |
5710 |
- EXPERIMENTAL="true" |
5711 |
-fi |
5712 |
- |
5713 |
-PYTHON_COMPAT=( python2_7 ) |
5714 |
- |
5715 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
5716 |
- |
5717 |
-OPENGL_DIR="xorg-x11" |
5718 |
- |
5719 |
-MY_P="${P/_/-}" |
5720 |
- |
5721 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
5722 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
5723 |
- |
5724 |
-if [[ $PV == 9999 ]]; then |
5725 |
- SRC_URI="" |
5726 |
-else |
5727 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
5728 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
5729 |
-fi |
5730 |
- |
5731 |
-LICENSE="MIT" |
5732 |
-SLOT="0" |
5733 |
-RESTRICT="!bindist? ( bindist )" |
5734 |
- |
5735 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
5736 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
5737 |
-for card in ${VIDEO_CARDS}; do |
5738 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
5739 |
-done |
5740 |
- |
5741 |
-IUSE="${IUSE_VIDEO_CARDS} |
5742 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
5743 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
5744 |
- vdpau vulkan wayland xvmc xa" |
5745 |
- |
5746 |
-REQUIRED_USE=" |
5747 |
- d3d9? ( dri3 gallium ) |
5748 |
- llvm? ( gallium ) |
5749 |
- opencl? ( gallium llvm ) |
5750 |
- openmax? ( gallium ) |
5751 |
- gles1? ( egl ) |
5752 |
- gles2? ( egl ) |
5753 |
- vaapi? ( gallium ) |
5754 |
- vdpau? ( gallium ) |
5755 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
5756 |
- video_cards_radeonsi? ( llvm ) ) |
5757 |
- wayland? ( egl gbm ) |
5758 |
- xa? ( gallium ) |
5759 |
- video_cards_freedreno? ( gallium ) |
5760 |
- video_cards_intel? ( classic ) |
5761 |
- video_cards_i915? ( || ( classic gallium ) ) |
5762 |
- video_cards_i965? ( classic ) |
5763 |
- video_cards_imx? ( gallium video_cards_vivante ) |
5764 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
5765 |
- video_cards_radeon? ( || ( classic gallium ) |
5766 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
5767 |
- video_cards_r100? ( classic ) |
5768 |
- video_cards_r200? ( classic ) |
5769 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
5770 |
- video_cards_r600? ( gallium ) |
5771 |
- video_cards_radeonsi? ( gallium llvm ) |
5772 |
- video_cards_vc4? ( gallium ) |
5773 |
- video_cards_virgl? ( gallium ) |
5774 |
- video_cards_vivante? ( gallium gbm ) |
5775 |
- video_cards_vmware? ( gallium ) |
5776 |
-" |
5777 |
- |
5778 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85" |
5779 |
-# keep correct libdrm and dri2proto dep |
5780 |
-# keep blocks in rdepend for binpkg |
5781 |
-RDEPEND=" |
5782 |
- !<x11-base/xorg-server-1.7 |
5783 |
- !<=x11-proto/xf86driproto-2.0.3 |
5784 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
5785 |
- classic? ( app-eselect/eselect-mesa ) |
5786 |
- gallium? ( app-eselect/eselect-mesa ) |
5787 |
- >=app-eselect/eselect-opengl-1.3.0 |
5788 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
5789 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
5790 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
5791 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
5792 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
5793 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
5794 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
5795 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
5796 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
5797 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
5798 |
- llvm? ( |
5799 |
- video_cards_radeonsi? ( |
5800 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5801 |
- ) |
5802 |
- video_cards_r600? ( |
5803 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5804 |
- ) |
5805 |
- video_cards_radeon? ( |
5806 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5807 |
- ) |
5808 |
- ) |
5809 |
- opencl? ( |
5810 |
- app-eselect/eselect-opencl |
5811 |
- dev-libs/libclc |
5812 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
5813 |
- ) |
5814 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
5815 |
- vaapi? ( |
5816 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
5817 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
5818 |
- ) |
5819 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
5820 |
- wayland? ( |
5821 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
5822 |
- >=dev-libs/wayland-protocols-1.8 |
5823 |
- ) |
5824 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
5825 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
5826 |
- |
5827 |
- video_cards_intel? ( |
5828 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
5829 |
- ) |
5830 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
5831 |
-" |
5832 |
-for card in ${RADEON_CARDS}; do |
5833 |
- RDEPEND="${RDEPEND} |
5834 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
5835 |
- " |
5836 |
-done |
5837 |
-RDEPEND="${RDEPEND} |
5838 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
5839 |
-" |
5840 |
- |
5841 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
5842 |
-# we need to *really* make sure we're not pulling one than more slot |
5843 |
-# simultaneously. |
5844 |
-# |
5845 |
-# How to use it: |
5846 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
5847 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
5848 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
5849 |
-LLVM_DEPSTR=" |
5850 |
- || ( |
5851 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
5852 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
5853 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
5854 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
5855 |
- ) |
5856 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
5857 |
-" |
5858 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
5859 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
5860 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
5861 |
-RDEPEND="${RDEPEND} |
5862 |
- llvm? ( |
5863 |
- opencl? ( |
5864 |
- video_cards_r600? ( |
5865 |
- ${CLANG_DEPSTR_AMDGPU} |
5866 |
- ) |
5867 |
- !video_cards_r600? ( |
5868 |
- video_cards_radeonsi? ( |
5869 |
- ${CLANG_DEPSTR_AMDGPU} |
5870 |
- ) |
5871 |
- ) |
5872 |
- !video_cards_r600? ( |
5873 |
- !video_cards_radeonsi? ( |
5874 |
- video_cards_radeon? ( |
5875 |
- ${CLANG_DEPSTR_AMDGPU} |
5876 |
- ) |
5877 |
- ) |
5878 |
- ) |
5879 |
- !video_cards_r600? ( |
5880 |
- !video_cards_radeon? ( |
5881 |
- !video_cards_radeonsi? ( |
5882 |
- ${CLANG_DEPSTR} |
5883 |
- ) |
5884 |
- ) |
5885 |
- ) |
5886 |
- ) |
5887 |
- !opencl? ( |
5888 |
- video_cards_r600? ( |
5889 |
- ${LLVM_DEPSTR_AMDGPU} |
5890 |
- ) |
5891 |
- !video_cards_r600? ( |
5892 |
- video_cards_radeonsi? ( |
5893 |
- ${LLVM_DEPSTR_AMDGPU} |
5894 |
- ) |
5895 |
- ) |
5896 |
- !video_cards_r600? ( |
5897 |
- !video_cards_radeonsi? ( |
5898 |
- video_cards_radeon? ( |
5899 |
- ${LLVM_DEPSTR_AMDGPU} |
5900 |
- ) |
5901 |
- ) |
5902 |
- ) |
5903 |
- !video_cards_r600? ( |
5904 |
- !video_cards_radeon? ( |
5905 |
- !video_cards_radeonsi? ( |
5906 |
- ${LLVM_DEPSTR} |
5907 |
- ) |
5908 |
- ) |
5909 |
- ) |
5910 |
- ) |
5911 |
- ) |
5912 |
-" |
5913 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
5914 |
- |
5915 |
-DEPEND="${RDEPEND} |
5916 |
- ${PYTHON_DEPS} |
5917 |
- opencl? ( |
5918 |
- >=sys-devel/gcc-4.6 |
5919 |
- ) |
5920 |
- sys-devel/gettext |
5921 |
- virtual/pkgconfig |
5922 |
- valgrind? ( dev-util/valgrind ) |
5923 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
5924 |
- dri3? ( |
5925 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
5926 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
5927 |
- ) |
5928 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
5929 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
5930 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
5931 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
5932 |
- vulkan? ( |
5933 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
5934 |
- ) |
5935 |
-" |
5936 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
5937 |
- sys-devel/bison |
5938 |
- sys-devel/flex |
5939 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
5940 |
-" |
5941 |
- |
5942 |
-S="${WORKDIR}/${MY_P}" |
5943 |
-EGIT_CHECKOUT_DIR=${S} |
5944 |
- |
5945 |
-QA_WX_LOAD=" |
5946 |
-x86? ( |
5947 |
- !pic? ( |
5948 |
- usr/lib*/libglapi.so.0.0.0 |
5949 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
5950 |
- usr/lib*/libGLESv2.so.2.0.0 |
5951 |
- usr/lib*/libGL.so.1.2.0 |
5952 |
- usr/lib*/libOSMesa.so.8.0.0 |
5953 |
- ) |
5954 |
-)" |
5955 |
- |
5956 |
-llvm_check_deps() { |
5957 |
- local flags=${MULTILIB_USEDEP} |
5958 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
5959 |
- then |
5960 |
- flags+=",llvm_targets_AMDGPU(-)" |
5961 |
- fi |
5962 |
- |
5963 |
- if use opencl; then |
5964 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
5965 |
- fi |
5966 |
- has_version "sys-devel/llvm[${flags}]" |
5967 |
-} |
5968 |
- |
5969 |
-pkg_setup() { |
5970 |
- # warning message for bug 459306 |
5971 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
5972 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
5973 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
5974 |
- fi |
5975 |
- |
5976 |
- if use llvm; then |
5977 |
- llvm_pkg_setup |
5978 |
- fi |
5979 |
- python-any-r1_pkg_setup |
5980 |
-} |
5981 |
- |
5982 |
-src_prepare() { |
5983 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
5984 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
5985 |
- |
5986 |
- eautoreconf |
5987 |
- |
5988 |
- eapply_user |
5989 |
-} |
5990 |
- |
5991 |
-multilib_src_configure() { |
5992 |
- local myconf |
5993 |
- |
5994 |
- if use classic; then |
5995 |
- # Configurable DRI drivers |
5996 |
- driver_enable swrast |
5997 |
- |
5998 |
- # Intel code |
5999 |
- driver_enable video_cards_i915 i915 |
6000 |
- driver_enable video_cards_i965 i965 |
6001 |
- if ! use video_cards_i915 && \ |
6002 |
- ! use video_cards_i965; then |
6003 |
- driver_enable video_cards_intel i915 i965 |
6004 |
- fi |
6005 |
- |
6006 |
- # Nouveau code |
6007 |
- driver_enable video_cards_nouveau nouveau |
6008 |
- |
6009 |
- # ATI code |
6010 |
- driver_enable video_cards_r100 radeon |
6011 |
- driver_enable video_cards_r200 r200 |
6012 |
- if ! use video_cards_r100 && \ |
6013 |
- ! use video_cards_r200; then |
6014 |
- driver_enable video_cards_radeon radeon r200 |
6015 |
- fi |
6016 |
- fi |
6017 |
- |
6018 |
- if use egl; then |
6019 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
6020 |
- fi |
6021 |
- |
6022 |
- if use gallium; then |
6023 |
- myconf+=" |
6024 |
- $(use_enable d3d9 nine) |
6025 |
- $(use_enable llvm) |
6026 |
- $(use_enable openmax omx-bellagio) |
6027 |
- $(use_enable vaapi va) |
6028 |
- $(use_enable vdpau) |
6029 |
- $(use_enable xa) |
6030 |
- $(use_enable xvmc) |
6031 |
- " |
6032 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
6033 |
- |
6034 |
- gallium_enable swrast |
6035 |
- gallium_enable video_cards_vc4 vc4 |
6036 |
- gallium_enable video_cards_vivante etnaviv |
6037 |
- gallium_enable video_cards_vmware svga |
6038 |
- gallium_enable video_cards_nouveau nouveau |
6039 |
- gallium_enable video_cards_i915 i915 |
6040 |
- gallium_enable video_cards_imx imx |
6041 |
- if ! use video_cards_i915 && \ |
6042 |
- ! use video_cards_i965; then |
6043 |
- gallium_enable video_cards_intel i915 |
6044 |
- fi |
6045 |
- |
6046 |
- gallium_enable video_cards_r300 r300 |
6047 |
- gallium_enable video_cards_r600 r600 |
6048 |
- gallium_enable video_cards_radeonsi radeonsi |
6049 |
- if ! use video_cards_r300 && \ |
6050 |
- ! use video_cards_r600; then |
6051 |
- gallium_enable video_cards_radeon r300 r600 |
6052 |
- fi |
6053 |
- |
6054 |
- gallium_enable video_cards_freedreno freedreno |
6055 |
- # opencl stuff |
6056 |
- if use opencl; then |
6057 |
- myconf+=" |
6058 |
- $(use_enable opencl) |
6059 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
6060 |
- " |
6061 |
- fi |
6062 |
- |
6063 |
- gallium_enable video_cards_virgl virgl |
6064 |
- fi |
6065 |
- |
6066 |
- if use vulkan; then |
6067 |
- vulkan_enable video_cards_i965 intel |
6068 |
- vulkan_enable video_cards_radeonsi radeon |
6069 |
- fi |
6070 |
- |
6071 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
6072 |
- if [[ ${ABI} == x86 ]]; then |
6073 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
6074 |
- fi |
6075 |
- |
6076 |
- # on abi_x86_32 hardened we need to have asm disable |
6077 |
- if [[ ${ABI} == x86* ]] && use pic; then |
6078 |
- myconf+=" --disable-asm" |
6079 |
- fi |
6080 |
- |
6081 |
- if use gallium; then |
6082 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
6083 |
- else |
6084 |
- myconf+=" $(use_enable osmesa)" |
6085 |
- fi |
6086 |
- |
6087 |
- # build fails with BSD indent, bug #428112 |
6088 |
- use userland_GNU || export INDENT=cat |
6089 |
- |
6090 |
- ECONF_SOURCE="${S}" \ |
6091 |
- econf \ |
6092 |
- --enable-dri \ |
6093 |
- --enable-glx \ |
6094 |
- --enable-shared-glapi \ |
6095 |
- $(use_enable !bindist texture-float) \ |
6096 |
- $(use_enable d3d9 nine) \ |
6097 |
- $(use_enable debug) \ |
6098 |
- $(use_enable dri3) \ |
6099 |
- $(use_enable egl) \ |
6100 |
- $(use_enable gbm) \ |
6101 |
- $(use_enable gles1) \ |
6102 |
- $(use_enable gles2) \ |
6103 |
- $(use_enable nptl glx-tls) \ |
6104 |
- $(use_enable unwind libunwind) \ |
6105 |
- --enable-valgrind=$(usex valgrind auto no) \ |
6106 |
- --enable-llvm-shared-libs \ |
6107 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
6108 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
6109 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
6110 |
- PYTHON2="${PYTHON}" \ |
6111 |
- ${myconf} |
6112 |
-} |
6113 |
- |
6114 |
-multilib_src_install() { |
6115 |
- emake install DESTDIR="${D}" |
6116 |
- |
6117 |
- if use classic || use gallium; then |
6118 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
6119 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
6120 |
- keepdir /usr/$(get_libdir)/dri |
6121 |
- dodir /usr/$(get_libdir)/mesa |
6122 |
- for x in ${gallium_drivers[@]}; do |
6123 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
6124 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
6125 |
- || die "Failed to move ${x}" |
6126 |
- fi |
6127 |
- done |
6128 |
- if use classic; then |
6129 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
6130 |
- fi |
6131 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
6132 |
- if [ -f ${x} -o -L ${x} ]; then |
6133 |
- mv -f "${x}" "${x/dri/mesa}" \ |
6134 |
- || die "Failed to move ${x}" |
6135 |
- fi |
6136 |
- done |
6137 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
6138 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
6139 |
- # remove symlinks to drivers known to eselect |
6140 |
- for x in ${gallium_drivers[@]}; do |
6141 |
- if [ -f ${x} -o -L ${x} ]; then |
6142 |
- rm "${x}" || die "Failed to remove ${x}" |
6143 |
- fi |
6144 |
- done |
6145 |
- popd |
6146 |
- eend $? |
6147 |
- fi |
6148 |
- if use opencl; then |
6149 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
6150 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
6151 |
- dodir ${cl_dir}/{lib,include} |
6152 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
6153 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
6154 |
- "${ED}"${cl_dir} |
6155 |
- fi |
6156 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
6157 |
- mv -f "${ED}"/usr/include/CL \ |
6158 |
- "${ED}"${cl_dir}/include |
6159 |
- fi |
6160 |
- eend $? |
6161 |
- fi |
6162 |
- |
6163 |
- if use openmax; then |
6164 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
6165 |
- doenvd "${T}"/99mesaxdgomx |
6166 |
- keepdir /usr/share/mesa/xdg |
6167 |
- fi |
6168 |
-} |
6169 |
- |
6170 |
-multilib_src_install_all() { |
6171 |
- find "${ED}" -name '*.la' -delete |
6172 |
- einstalldocs |
6173 |
- |
6174 |
- if use !bindist; then |
6175 |
- dodoc docs/patents.txt |
6176 |
- fi |
6177 |
- |
6178 |
- # Install config file for eselect mesa |
6179 |
- insinto /usr/share/mesa |
6180 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
6181 |
-} |
6182 |
- |
6183 |
-multilib_src_test() { |
6184 |
- if use llvm; then |
6185 |
- 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' |
6186 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
6187 |
- emake ${llvm_tests} |
6188 |
- pax-mark m ${llvm_tests} |
6189 |
- popd >/dev/null || die |
6190 |
- fi |
6191 |
- emake check |
6192 |
-} |
6193 |
- |
6194 |
-pkg_postinst() { |
6195 |
- # Switch to the xorg implementation. |
6196 |
- echo |
6197 |
- eselect opengl set --use-old ${OPENGL_DIR} |
6198 |
- |
6199 |
- # Select classic/gallium drivers |
6200 |
- if use classic || use gallium; then |
6201 |
- eselect mesa set --auto |
6202 |
- fi |
6203 |
- |
6204 |
- # Switch to mesa opencl |
6205 |
- if use opencl; then |
6206 |
- eselect opencl set --use-old ${PN} |
6207 |
- fi |
6208 |
- |
6209 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
6210 |
- if use openmax; then |
6211 |
- ebegin "Registering OpenMAX drivers" |
6212 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
6213 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
6214 |
- omxregister-bellagio |
6215 |
- eend $? |
6216 |
- fi |
6217 |
- |
6218 |
- # warn about patent encumbered texture-float |
6219 |
- if use !bindist; then |
6220 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
6221 |
- elog "enabled. Please see patents.txt for an explanation." |
6222 |
- fi |
6223 |
- |
6224 |
- if ! has_version media-libs/libtxc_dxtn; then |
6225 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
6226 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
6227 |
- elog "textures in some apps, and some others even require this to run." |
6228 |
- fi |
6229 |
-} |
6230 |
- |
6231 |
-pkg_prerm() { |
6232 |
- if use openmax; then |
6233 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
6234 |
- fi |
6235 |
-} |
6236 |
- |
6237 |
-# $1 - VIDEO_CARDS flag |
6238 |
-# other args - names of DRI drivers to enable |
6239 |
-# TODO: avoid code duplication for a more elegant implementation |
6240 |
-driver_enable() { |
6241 |
- case $# in |
6242 |
- # for enabling unconditionally |
6243 |
- 1) |
6244 |
- DRI_DRIVERS+=",$1" |
6245 |
- ;; |
6246 |
- *) |
6247 |
- if use $1; then |
6248 |
- shift |
6249 |
- for i in $@; do |
6250 |
- DRI_DRIVERS+=",${i}" |
6251 |
- done |
6252 |
- fi |
6253 |
- ;; |
6254 |
- esac |
6255 |
-} |
6256 |
- |
6257 |
-gallium_enable() { |
6258 |
- case $# in |
6259 |
- # for enabling unconditionally |
6260 |
- 1) |
6261 |
- GALLIUM_DRIVERS+=",$1" |
6262 |
- ;; |
6263 |
- *) |
6264 |
- if use $1; then |
6265 |
- shift |
6266 |
- for i in $@; do |
6267 |
- GALLIUM_DRIVERS+=",${i}" |
6268 |
- done |
6269 |
- fi |
6270 |
- ;; |
6271 |
- esac |
6272 |
-} |
6273 |
- |
6274 |
-vulkan_enable() { |
6275 |
- case $# in |
6276 |
- # for enabling unconditionally |
6277 |
- 1) |
6278 |
- VULKAN_DRIVERS+=",$1" |
6279 |
- ;; |
6280 |
- *) |
6281 |
- if use $1; then |
6282 |
- shift |
6283 |
- for i in $@; do |
6284 |
- VULKAN_DRIVERS+=",${i}" |
6285 |
- done |
6286 |
- fi |
6287 |
- ;; |
6288 |
- esac |
6289 |
-} |
6290 |
|
6291 |
diff --git a/media-libs/mesa/mesa-17.3.0_rc4.ebuild b/media-libs/mesa/mesa-17.3.0_rc4.ebuild |
6292 |
deleted file mode 100644 |
6293 |
index 1887909..0000000 |
6294 |
--- a/media-libs/mesa/mesa-17.3.0_rc4.ebuild |
6295 |
+++ /dev/null |
6296 |
@@ -1,589 +0,0 @@ |
6297 |
-# Copyright 1999-2017 Gentoo Foundation |
6298 |
-# Distributed under the terms of the GNU General Public License v2 |
6299 |
- |
6300 |
-EAPI=6 |
6301 |
- |
6302 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
6303 |
- |
6304 |
-if [[ ${PV} = 9999 ]]; then |
6305 |
- GIT_ECLASS="git-r3" |
6306 |
- EXPERIMENTAL="true" |
6307 |
-fi |
6308 |
- |
6309 |
-PYTHON_COMPAT=( python2_7 ) |
6310 |
- |
6311 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
6312 |
- |
6313 |
-OPENGL_DIR="xorg-x11" |
6314 |
- |
6315 |
-MY_P="${P/_/-}" |
6316 |
- |
6317 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
6318 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
6319 |
- |
6320 |
-if [[ $PV == 9999 ]]; then |
6321 |
- SRC_URI="" |
6322 |
-else |
6323 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
6324 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
6325 |
-fi |
6326 |
- |
6327 |
-LICENSE="MIT" |
6328 |
-SLOT="0" |
6329 |
-RESTRICT="!bindist? ( bindist )" |
6330 |
- |
6331 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
6332 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
6333 |
-for card in ${VIDEO_CARDS}; do |
6334 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
6335 |
-done |
6336 |
- |
6337 |
-IUSE="${IUSE_VIDEO_CARDS} |
6338 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
6339 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
6340 |
- vdpau vulkan wayland xvmc xa" |
6341 |
- |
6342 |
-REQUIRED_USE=" |
6343 |
- d3d9? ( dri3 gallium ) |
6344 |
- llvm? ( gallium ) |
6345 |
- opencl? ( gallium llvm ) |
6346 |
- openmax? ( gallium ) |
6347 |
- gles1? ( egl ) |
6348 |
- gles2? ( egl ) |
6349 |
- vaapi? ( gallium ) |
6350 |
- vdpau? ( gallium ) |
6351 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
6352 |
- video_cards_radeonsi? ( llvm ) ) |
6353 |
- wayland? ( egl gbm ) |
6354 |
- xa? ( gallium ) |
6355 |
- video_cards_freedreno? ( gallium ) |
6356 |
- video_cards_intel? ( classic ) |
6357 |
- video_cards_i915? ( || ( classic gallium ) ) |
6358 |
- video_cards_i965? ( classic ) |
6359 |
- video_cards_imx? ( gallium video_cards_vivante ) |
6360 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
6361 |
- video_cards_radeon? ( || ( classic gallium ) |
6362 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
6363 |
- video_cards_r100? ( classic ) |
6364 |
- video_cards_r200? ( classic ) |
6365 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
6366 |
- video_cards_r600? ( gallium ) |
6367 |
- video_cards_radeonsi? ( gallium llvm ) |
6368 |
- video_cards_vc4? ( gallium ) |
6369 |
- video_cards_virgl? ( gallium ) |
6370 |
- video_cards_vivante? ( gallium gbm ) |
6371 |
- video_cards_vmware? ( gallium ) |
6372 |
-" |
6373 |
- |
6374 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85" |
6375 |
-# keep correct libdrm and dri2proto dep |
6376 |
-# keep blocks in rdepend for binpkg |
6377 |
-RDEPEND=" |
6378 |
- !<x11-base/xorg-server-1.7 |
6379 |
- !<=x11-proto/xf86driproto-2.0.3 |
6380 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
6381 |
- classic? ( app-eselect/eselect-mesa ) |
6382 |
- gallium? ( app-eselect/eselect-mesa ) |
6383 |
- >=app-eselect/eselect-opengl-1.3.0 |
6384 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
6385 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
6386 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
6387 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
6388 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
6389 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
6390 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
6391 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
6392 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
6393 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
6394 |
- llvm? ( |
6395 |
- video_cards_radeonsi? ( |
6396 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6397 |
- ) |
6398 |
- video_cards_r600? ( |
6399 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6400 |
- ) |
6401 |
- video_cards_radeon? ( |
6402 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6403 |
- ) |
6404 |
- ) |
6405 |
- opencl? ( |
6406 |
- app-eselect/eselect-opencl |
6407 |
- dev-libs/libclc |
6408 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6409 |
- ) |
6410 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
6411 |
- vaapi? ( |
6412 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
6413 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
6414 |
- ) |
6415 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
6416 |
- wayland? ( |
6417 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
6418 |
- >=dev-libs/wayland-protocols-1.8 |
6419 |
- ) |
6420 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
6421 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
6422 |
- |
6423 |
- video_cards_intel? ( |
6424 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
6425 |
- ) |
6426 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
6427 |
-" |
6428 |
-for card in ${RADEON_CARDS}; do |
6429 |
- RDEPEND="${RDEPEND} |
6430 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
6431 |
- " |
6432 |
-done |
6433 |
-RDEPEND="${RDEPEND} |
6434 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
6435 |
-" |
6436 |
- |
6437 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
6438 |
-# we need to *really* make sure we're not pulling one than more slot |
6439 |
-# simultaneously. |
6440 |
-# |
6441 |
-# How to use it: |
6442 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
6443 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
6444 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
6445 |
-LLVM_DEPSTR=" |
6446 |
- || ( |
6447 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
6448 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
6449 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
6450 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
6451 |
- ) |
6452 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
6453 |
-" |
6454 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
6455 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
6456 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
6457 |
-RDEPEND="${RDEPEND} |
6458 |
- llvm? ( |
6459 |
- opencl? ( |
6460 |
- video_cards_r600? ( |
6461 |
- ${CLANG_DEPSTR_AMDGPU} |
6462 |
- ) |
6463 |
- !video_cards_r600? ( |
6464 |
- video_cards_radeonsi? ( |
6465 |
- ${CLANG_DEPSTR_AMDGPU} |
6466 |
- ) |
6467 |
- ) |
6468 |
- !video_cards_r600? ( |
6469 |
- !video_cards_radeonsi? ( |
6470 |
- video_cards_radeon? ( |
6471 |
- ${CLANG_DEPSTR_AMDGPU} |
6472 |
- ) |
6473 |
- ) |
6474 |
- ) |
6475 |
- !video_cards_r600? ( |
6476 |
- !video_cards_radeon? ( |
6477 |
- !video_cards_radeonsi? ( |
6478 |
- ${CLANG_DEPSTR} |
6479 |
- ) |
6480 |
- ) |
6481 |
- ) |
6482 |
- ) |
6483 |
- !opencl? ( |
6484 |
- video_cards_r600? ( |
6485 |
- ${LLVM_DEPSTR_AMDGPU} |
6486 |
- ) |
6487 |
- !video_cards_r600? ( |
6488 |
- video_cards_radeonsi? ( |
6489 |
- ${LLVM_DEPSTR_AMDGPU} |
6490 |
- ) |
6491 |
- ) |
6492 |
- !video_cards_r600? ( |
6493 |
- !video_cards_radeonsi? ( |
6494 |
- video_cards_radeon? ( |
6495 |
- ${LLVM_DEPSTR_AMDGPU} |
6496 |
- ) |
6497 |
- ) |
6498 |
- ) |
6499 |
- !video_cards_r600? ( |
6500 |
- !video_cards_radeon? ( |
6501 |
- !video_cards_radeonsi? ( |
6502 |
- ${LLVM_DEPSTR} |
6503 |
- ) |
6504 |
- ) |
6505 |
- ) |
6506 |
- ) |
6507 |
- ) |
6508 |
-" |
6509 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
6510 |
- |
6511 |
-DEPEND="${RDEPEND} |
6512 |
- ${PYTHON_DEPS} |
6513 |
- opencl? ( |
6514 |
- >=sys-devel/gcc-4.6 |
6515 |
- ) |
6516 |
- sys-devel/gettext |
6517 |
- virtual/pkgconfig |
6518 |
- valgrind? ( dev-util/valgrind ) |
6519 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
6520 |
- dri3? ( |
6521 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
6522 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
6523 |
- ) |
6524 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
6525 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
6526 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
6527 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
6528 |
- vulkan? ( |
6529 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
6530 |
- ) |
6531 |
-" |
6532 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
6533 |
- sys-devel/bison |
6534 |
- sys-devel/flex |
6535 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
6536 |
-" |
6537 |
- |
6538 |
-S="${WORKDIR}/${MY_P}" |
6539 |
-EGIT_CHECKOUT_DIR=${S} |
6540 |
- |
6541 |
-QA_WX_LOAD=" |
6542 |
-x86? ( |
6543 |
- !pic? ( |
6544 |
- usr/lib*/libglapi.so.0.0.0 |
6545 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
6546 |
- usr/lib*/libGLESv2.so.2.0.0 |
6547 |
- usr/lib*/libGL.so.1.2.0 |
6548 |
- usr/lib*/libOSMesa.so.8.0.0 |
6549 |
- ) |
6550 |
-)" |
6551 |
- |
6552 |
-llvm_check_deps() { |
6553 |
- local flags=${MULTILIB_USEDEP} |
6554 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
6555 |
- then |
6556 |
- flags+=",llvm_targets_AMDGPU(-)" |
6557 |
- fi |
6558 |
- |
6559 |
- if use opencl; then |
6560 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
6561 |
- fi |
6562 |
- has_version "sys-devel/llvm[${flags}]" |
6563 |
-} |
6564 |
- |
6565 |
-pkg_setup() { |
6566 |
- # warning message for bug 459306 |
6567 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
6568 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
6569 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
6570 |
- fi |
6571 |
- |
6572 |
- if use llvm; then |
6573 |
- llvm_pkg_setup |
6574 |
- fi |
6575 |
- python-any-r1_pkg_setup |
6576 |
-} |
6577 |
- |
6578 |
-src_prepare() { |
6579 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
6580 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
6581 |
- |
6582 |
- eautoreconf |
6583 |
- |
6584 |
- eapply_user |
6585 |
-} |
6586 |
- |
6587 |
-multilib_src_configure() { |
6588 |
- local myconf |
6589 |
- |
6590 |
- if use classic; then |
6591 |
- # Configurable DRI drivers |
6592 |
- driver_enable swrast |
6593 |
- |
6594 |
- # Intel code |
6595 |
- driver_enable video_cards_i915 i915 |
6596 |
- driver_enable video_cards_i965 i965 |
6597 |
- if ! use video_cards_i915 && \ |
6598 |
- ! use video_cards_i965; then |
6599 |
- driver_enable video_cards_intel i915 i965 |
6600 |
- fi |
6601 |
- |
6602 |
- # Nouveau code |
6603 |
- driver_enable video_cards_nouveau nouveau |
6604 |
- |
6605 |
- # ATI code |
6606 |
- driver_enable video_cards_r100 radeon |
6607 |
- driver_enable video_cards_r200 r200 |
6608 |
- if ! use video_cards_r100 && \ |
6609 |
- ! use video_cards_r200; then |
6610 |
- driver_enable video_cards_radeon radeon r200 |
6611 |
- fi |
6612 |
- fi |
6613 |
- |
6614 |
- if use egl; then |
6615 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
6616 |
- fi |
6617 |
- |
6618 |
- if use gallium; then |
6619 |
- myconf+=" |
6620 |
- $(use_enable d3d9 nine) |
6621 |
- $(use_enable llvm) |
6622 |
- $(use_enable openmax omx-bellagio) |
6623 |
- $(use_enable vaapi va) |
6624 |
- $(use_enable vdpau) |
6625 |
- $(use_enable xa) |
6626 |
- $(use_enable xvmc) |
6627 |
- " |
6628 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
6629 |
- |
6630 |
- gallium_enable swrast |
6631 |
- gallium_enable video_cards_vc4 vc4 |
6632 |
- gallium_enable video_cards_vivante etnaviv |
6633 |
- gallium_enable video_cards_vmware svga |
6634 |
- gallium_enable video_cards_nouveau nouveau |
6635 |
- gallium_enable video_cards_i915 i915 |
6636 |
- gallium_enable video_cards_imx imx |
6637 |
- if ! use video_cards_i915 && \ |
6638 |
- ! use video_cards_i965; then |
6639 |
- gallium_enable video_cards_intel i915 |
6640 |
- fi |
6641 |
- |
6642 |
- gallium_enable video_cards_r300 r300 |
6643 |
- gallium_enable video_cards_r600 r600 |
6644 |
- gallium_enable video_cards_radeonsi radeonsi |
6645 |
- if ! use video_cards_r300 && \ |
6646 |
- ! use video_cards_r600; then |
6647 |
- gallium_enable video_cards_radeon r300 r600 |
6648 |
- fi |
6649 |
- |
6650 |
- gallium_enable video_cards_freedreno freedreno |
6651 |
- # opencl stuff |
6652 |
- if use opencl; then |
6653 |
- myconf+=" |
6654 |
- $(use_enable opencl) |
6655 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
6656 |
- " |
6657 |
- fi |
6658 |
- |
6659 |
- gallium_enable video_cards_virgl virgl |
6660 |
- fi |
6661 |
- |
6662 |
- if use vulkan; then |
6663 |
- vulkan_enable video_cards_i965 intel |
6664 |
- vulkan_enable video_cards_radeonsi radeon |
6665 |
- fi |
6666 |
- |
6667 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
6668 |
- if [[ ${ABI} == x86 ]]; then |
6669 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
6670 |
- fi |
6671 |
- |
6672 |
- # on abi_x86_32 hardened we need to have asm disable |
6673 |
- if [[ ${ABI} == x86* ]] && use pic; then |
6674 |
- myconf+=" --disable-asm" |
6675 |
- fi |
6676 |
- |
6677 |
- if use gallium; then |
6678 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
6679 |
- else |
6680 |
- myconf+=" $(use_enable osmesa)" |
6681 |
- fi |
6682 |
- |
6683 |
- # build fails with BSD indent, bug #428112 |
6684 |
- use userland_GNU || export INDENT=cat |
6685 |
- |
6686 |
- ECONF_SOURCE="${S}" \ |
6687 |
- econf \ |
6688 |
- --enable-dri \ |
6689 |
- --enable-glx \ |
6690 |
- --enable-shared-glapi \ |
6691 |
- $(use_enable !bindist texture-float) \ |
6692 |
- $(use_enable d3d9 nine) \ |
6693 |
- $(use_enable debug) \ |
6694 |
- $(use_enable dri3) \ |
6695 |
- $(use_enable egl) \ |
6696 |
- $(use_enable gbm) \ |
6697 |
- $(use_enable gles1) \ |
6698 |
- $(use_enable gles2) \ |
6699 |
- $(use_enable nptl glx-tls) \ |
6700 |
- $(use_enable unwind libunwind) \ |
6701 |
- --enable-valgrind=$(usex valgrind auto no) \ |
6702 |
- --enable-llvm-shared-libs \ |
6703 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
6704 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
6705 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
6706 |
- PYTHON2="${PYTHON}" \ |
6707 |
- ${myconf} |
6708 |
-} |
6709 |
- |
6710 |
-multilib_src_install() { |
6711 |
- emake install DESTDIR="${D}" |
6712 |
- |
6713 |
- if use classic || use gallium; then |
6714 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
6715 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
6716 |
- keepdir /usr/$(get_libdir)/dri |
6717 |
- dodir /usr/$(get_libdir)/mesa |
6718 |
- for x in ${gallium_drivers[@]}; do |
6719 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
6720 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
6721 |
- || die "Failed to move ${x}" |
6722 |
- fi |
6723 |
- done |
6724 |
- if use classic; then |
6725 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
6726 |
- fi |
6727 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
6728 |
- if [ -f ${x} -o -L ${x} ]; then |
6729 |
- mv -f "${x}" "${x/dri/mesa}" \ |
6730 |
- || die "Failed to move ${x}" |
6731 |
- fi |
6732 |
- done |
6733 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
6734 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
6735 |
- # remove symlinks to drivers known to eselect |
6736 |
- for x in ${gallium_drivers[@]}; do |
6737 |
- if [ -f ${x} -o -L ${x} ]; then |
6738 |
- rm "${x}" || die "Failed to remove ${x}" |
6739 |
- fi |
6740 |
- done |
6741 |
- popd |
6742 |
- eend $? |
6743 |
- fi |
6744 |
- if use opencl; then |
6745 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
6746 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
6747 |
- dodir ${cl_dir}/{lib,include} |
6748 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
6749 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
6750 |
- "${ED}"${cl_dir} |
6751 |
- fi |
6752 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
6753 |
- mv -f "${ED}"/usr/include/CL \ |
6754 |
- "${ED}"${cl_dir}/include |
6755 |
- fi |
6756 |
- eend $? |
6757 |
- fi |
6758 |
- |
6759 |
- if use openmax; then |
6760 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
6761 |
- doenvd "${T}"/99mesaxdgomx |
6762 |
- keepdir /usr/share/mesa/xdg |
6763 |
- fi |
6764 |
-} |
6765 |
- |
6766 |
-multilib_src_install_all() { |
6767 |
- find "${ED}" -name '*.la' -delete |
6768 |
- einstalldocs |
6769 |
- |
6770 |
- if use !bindist; then |
6771 |
- dodoc docs/patents.txt |
6772 |
- fi |
6773 |
- |
6774 |
- # Install config file for eselect mesa |
6775 |
- insinto /usr/share/mesa |
6776 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
6777 |
-} |
6778 |
- |
6779 |
-multilib_src_test() { |
6780 |
- if use llvm; then |
6781 |
- 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' |
6782 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
6783 |
- emake ${llvm_tests} |
6784 |
- pax-mark m ${llvm_tests} |
6785 |
- popd >/dev/null || die |
6786 |
- fi |
6787 |
- emake check |
6788 |
-} |
6789 |
- |
6790 |
-pkg_postinst() { |
6791 |
- # Switch to the xorg implementation. |
6792 |
- echo |
6793 |
- eselect opengl set --use-old ${OPENGL_DIR} |
6794 |
- |
6795 |
- # Select classic/gallium drivers |
6796 |
- if use classic || use gallium; then |
6797 |
- eselect mesa set --auto |
6798 |
- fi |
6799 |
- |
6800 |
- # Switch to mesa opencl |
6801 |
- if use opencl; then |
6802 |
- eselect opencl set --use-old ${PN} |
6803 |
- fi |
6804 |
- |
6805 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
6806 |
- if use openmax; then |
6807 |
- ebegin "Registering OpenMAX drivers" |
6808 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
6809 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
6810 |
- omxregister-bellagio |
6811 |
- eend $? |
6812 |
- fi |
6813 |
- |
6814 |
- # warn about patent encumbered texture-float |
6815 |
- if use !bindist; then |
6816 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
6817 |
- elog "enabled. Please see patents.txt for an explanation." |
6818 |
- fi |
6819 |
- |
6820 |
- if ! has_version media-libs/libtxc_dxtn; then |
6821 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
6822 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
6823 |
- elog "textures in some apps, and some others even require this to run." |
6824 |
- fi |
6825 |
-} |
6826 |
- |
6827 |
-pkg_prerm() { |
6828 |
- if use openmax; then |
6829 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
6830 |
- fi |
6831 |
-} |
6832 |
- |
6833 |
-# $1 - VIDEO_CARDS flag |
6834 |
-# other args - names of DRI drivers to enable |
6835 |
-# TODO: avoid code duplication for a more elegant implementation |
6836 |
-driver_enable() { |
6837 |
- case $# in |
6838 |
- # for enabling unconditionally |
6839 |
- 1) |
6840 |
- DRI_DRIVERS+=",$1" |
6841 |
- ;; |
6842 |
- *) |
6843 |
- if use $1; then |
6844 |
- shift |
6845 |
- for i in $@; do |
6846 |
- DRI_DRIVERS+=",${i}" |
6847 |
- done |
6848 |
- fi |
6849 |
- ;; |
6850 |
- esac |
6851 |
-} |
6852 |
- |
6853 |
-gallium_enable() { |
6854 |
- case $# in |
6855 |
- # for enabling unconditionally |
6856 |
- 1) |
6857 |
- GALLIUM_DRIVERS+=",$1" |
6858 |
- ;; |
6859 |
- *) |
6860 |
- if use $1; then |
6861 |
- shift |
6862 |
- for i in $@; do |
6863 |
- GALLIUM_DRIVERS+=",${i}" |
6864 |
- done |
6865 |
- fi |
6866 |
- ;; |
6867 |
- esac |
6868 |
-} |
6869 |
- |
6870 |
-vulkan_enable() { |
6871 |
- case $# in |
6872 |
- # for enabling unconditionally |
6873 |
- 1) |
6874 |
- VULKAN_DRIVERS+=",$1" |
6875 |
- ;; |
6876 |
- *) |
6877 |
- if use $1; then |
6878 |
- shift |
6879 |
- for i in $@; do |
6880 |
- VULKAN_DRIVERS+=",${i}" |
6881 |
- done |
6882 |
- fi |
6883 |
- ;; |
6884 |
- esac |
6885 |
-} |
6886 |
|
6887 |
diff --git a/media-libs/mesa/mesa-17.3.0_rc5.ebuild b/media-libs/mesa/mesa-17.3.0_rc5.ebuild |
6888 |
deleted file mode 100644 |
6889 |
index 1887909..0000000 |
6890 |
--- a/media-libs/mesa/mesa-17.3.0_rc5.ebuild |
6891 |
+++ /dev/null |
6892 |
@@ -1,589 +0,0 @@ |
6893 |
-# Copyright 1999-2017 Gentoo Foundation |
6894 |
-# Distributed under the terms of the GNU General Public License v2 |
6895 |
- |
6896 |
-EAPI=6 |
6897 |
- |
6898 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
6899 |
- |
6900 |
-if [[ ${PV} = 9999 ]]; then |
6901 |
- GIT_ECLASS="git-r3" |
6902 |
- EXPERIMENTAL="true" |
6903 |
-fi |
6904 |
- |
6905 |
-PYTHON_COMPAT=( python2_7 ) |
6906 |
- |
6907 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
6908 |
- |
6909 |
-OPENGL_DIR="xorg-x11" |
6910 |
- |
6911 |
-MY_P="${P/_/-}" |
6912 |
- |
6913 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
6914 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
6915 |
- |
6916 |
-if [[ $PV == 9999 ]]; then |
6917 |
- SRC_URI="" |
6918 |
-else |
6919 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
6920 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
6921 |
-fi |
6922 |
- |
6923 |
-LICENSE="MIT" |
6924 |
-SLOT="0" |
6925 |
-RESTRICT="!bindist? ( bindist )" |
6926 |
- |
6927 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
6928 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
6929 |
-for card in ${VIDEO_CARDS}; do |
6930 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
6931 |
-done |
6932 |
- |
6933 |
-IUSE="${IUSE_VIDEO_CARDS} |
6934 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
6935 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
6936 |
- vdpau vulkan wayland xvmc xa" |
6937 |
- |
6938 |
-REQUIRED_USE=" |
6939 |
- d3d9? ( dri3 gallium ) |
6940 |
- llvm? ( gallium ) |
6941 |
- opencl? ( gallium llvm ) |
6942 |
- openmax? ( gallium ) |
6943 |
- gles1? ( egl ) |
6944 |
- gles2? ( egl ) |
6945 |
- vaapi? ( gallium ) |
6946 |
- vdpau? ( gallium ) |
6947 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
6948 |
- video_cards_radeonsi? ( llvm ) ) |
6949 |
- wayland? ( egl gbm ) |
6950 |
- xa? ( gallium ) |
6951 |
- video_cards_freedreno? ( gallium ) |
6952 |
- video_cards_intel? ( classic ) |
6953 |
- video_cards_i915? ( || ( classic gallium ) ) |
6954 |
- video_cards_i965? ( classic ) |
6955 |
- video_cards_imx? ( gallium video_cards_vivante ) |
6956 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
6957 |
- video_cards_radeon? ( || ( classic gallium ) |
6958 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
6959 |
- video_cards_r100? ( classic ) |
6960 |
- video_cards_r200? ( classic ) |
6961 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
6962 |
- video_cards_r600? ( gallium ) |
6963 |
- video_cards_radeonsi? ( gallium llvm ) |
6964 |
- video_cards_vc4? ( gallium ) |
6965 |
- video_cards_virgl? ( gallium ) |
6966 |
- video_cards_vivante? ( gallium gbm ) |
6967 |
- video_cards_vmware? ( gallium ) |
6968 |
-" |
6969 |
- |
6970 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85" |
6971 |
-# keep correct libdrm and dri2proto dep |
6972 |
-# keep blocks in rdepend for binpkg |
6973 |
-RDEPEND=" |
6974 |
- !<x11-base/xorg-server-1.7 |
6975 |
- !<=x11-proto/xf86driproto-2.0.3 |
6976 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
6977 |
- classic? ( app-eselect/eselect-mesa ) |
6978 |
- gallium? ( app-eselect/eselect-mesa ) |
6979 |
- >=app-eselect/eselect-opengl-1.3.0 |
6980 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
6981 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
6982 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
6983 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
6984 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
6985 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
6986 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
6987 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
6988 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
6989 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
6990 |
- llvm? ( |
6991 |
- video_cards_radeonsi? ( |
6992 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6993 |
- ) |
6994 |
- video_cards_r600? ( |
6995 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6996 |
- ) |
6997 |
- video_cards_radeon? ( |
6998 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
6999 |
- ) |
7000 |
- ) |
7001 |
- opencl? ( |
7002 |
- app-eselect/eselect-opencl |
7003 |
- dev-libs/libclc |
7004 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
7005 |
- ) |
7006 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
7007 |
- vaapi? ( |
7008 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
7009 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
7010 |
- ) |
7011 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
7012 |
- wayland? ( |
7013 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
7014 |
- >=dev-libs/wayland-protocols-1.8 |
7015 |
- ) |
7016 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
7017 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
7018 |
- |
7019 |
- video_cards_intel? ( |
7020 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
7021 |
- ) |
7022 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
7023 |
-" |
7024 |
-for card in ${RADEON_CARDS}; do |
7025 |
- RDEPEND="${RDEPEND} |
7026 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
7027 |
- " |
7028 |
-done |
7029 |
-RDEPEND="${RDEPEND} |
7030 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
7031 |
-" |
7032 |
- |
7033 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
7034 |
-# we need to *really* make sure we're not pulling one than more slot |
7035 |
-# simultaneously. |
7036 |
-# |
7037 |
-# How to use it: |
7038 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
7039 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
7040 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
7041 |
-LLVM_DEPSTR=" |
7042 |
- || ( |
7043 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
7044 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
7045 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
7046 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
7047 |
- ) |
7048 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
7049 |
-" |
7050 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
7051 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
7052 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
7053 |
-RDEPEND="${RDEPEND} |
7054 |
- llvm? ( |
7055 |
- opencl? ( |
7056 |
- video_cards_r600? ( |
7057 |
- ${CLANG_DEPSTR_AMDGPU} |
7058 |
- ) |
7059 |
- !video_cards_r600? ( |
7060 |
- video_cards_radeonsi? ( |
7061 |
- ${CLANG_DEPSTR_AMDGPU} |
7062 |
- ) |
7063 |
- ) |
7064 |
- !video_cards_r600? ( |
7065 |
- !video_cards_radeonsi? ( |
7066 |
- video_cards_radeon? ( |
7067 |
- ${CLANG_DEPSTR_AMDGPU} |
7068 |
- ) |
7069 |
- ) |
7070 |
- ) |
7071 |
- !video_cards_r600? ( |
7072 |
- !video_cards_radeon? ( |
7073 |
- !video_cards_radeonsi? ( |
7074 |
- ${CLANG_DEPSTR} |
7075 |
- ) |
7076 |
- ) |
7077 |
- ) |
7078 |
- ) |
7079 |
- !opencl? ( |
7080 |
- video_cards_r600? ( |
7081 |
- ${LLVM_DEPSTR_AMDGPU} |
7082 |
- ) |
7083 |
- !video_cards_r600? ( |
7084 |
- video_cards_radeonsi? ( |
7085 |
- ${LLVM_DEPSTR_AMDGPU} |
7086 |
- ) |
7087 |
- ) |
7088 |
- !video_cards_r600? ( |
7089 |
- !video_cards_radeonsi? ( |
7090 |
- video_cards_radeon? ( |
7091 |
- ${LLVM_DEPSTR_AMDGPU} |
7092 |
- ) |
7093 |
- ) |
7094 |
- ) |
7095 |
- !video_cards_r600? ( |
7096 |
- !video_cards_radeon? ( |
7097 |
- !video_cards_radeonsi? ( |
7098 |
- ${LLVM_DEPSTR} |
7099 |
- ) |
7100 |
- ) |
7101 |
- ) |
7102 |
- ) |
7103 |
- ) |
7104 |
-" |
7105 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
7106 |
- |
7107 |
-DEPEND="${RDEPEND} |
7108 |
- ${PYTHON_DEPS} |
7109 |
- opencl? ( |
7110 |
- >=sys-devel/gcc-4.6 |
7111 |
- ) |
7112 |
- sys-devel/gettext |
7113 |
- virtual/pkgconfig |
7114 |
- valgrind? ( dev-util/valgrind ) |
7115 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
7116 |
- dri3? ( |
7117 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
7118 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
7119 |
- ) |
7120 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
7121 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
7122 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
7123 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
7124 |
- vulkan? ( |
7125 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
7126 |
- ) |
7127 |
-" |
7128 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
7129 |
- sys-devel/bison |
7130 |
- sys-devel/flex |
7131 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
7132 |
-" |
7133 |
- |
7134 |
-S="${WORKDIR}/${MY_P}" |
7135 |
-EGIT_CHECKOUT_DIR=${S} |
7136 |
- |
7137 |
-QA_WX_LOAD=" |
7138 |
-x86? ( |
7139 |
- !pic? ( |
7140 |
- usr/lib*/libglapi.so.0.0.0 |
7141 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
7142 |
- usr/lib*/libGLESv2.so.2.0.0 |
7143 |
- usr/lib*/libGL.so.1.2.0 |
7144 |
- usr/lib*/libOSMesa.so.8.0.0 |
7145 |
- ) |
7146 |
-)" |
7147 |
- |
7148 |
-llvm_check_deps() { |
7149 |
- local flags=${MULTILIB_USEDEP} |
7150 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
7151 |
- then |
7152 |
- flags+=",llvm_targets_AMDGPU(-)" |
7153 |
- fi |
7154 |
- |
7155 |
- if use opencl; then |
7156 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
7157 |
- fi |
7158 |
- has_version "sys-devel/llvm[${flags}]" |
7159 |
-} |
7160 |
- |
7161 |
-pkg_setup() { |
7162 |
- # warning message for bug 459306 |
7163 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
7164 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
7165 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
7166 |
- fi |
7167 |
- |
7168 |
- if use llvm; then |
7169 |
- llvm_pkg_setup |
7170 |
- fi |
7171 |
- python-any-r1_pkg_setup |
7172 |
-} |
7173 |
- |
7174 |
-src_prepare() { |
7175 |
- eapply "${FILESDIR}"/${PN}-11-execinfo.patch |
7176 |
- eapply "${FILESDIR}"/${PN}-13-musl_endian.patch |
7177 |
- |
7178 |
- eautoreconf |
7179 |
- |
7180 |
- eapply_user |
7181 |
-} |
7182 |
- |
7183 |
-multilib_src_configure() { |
7184 |
- local myconf |
7185 |
- |
7186 |
- if use classic; then |
7187 |
- # Configurable DRI drivers |
7188 |
- driver_enable swrast |
7189 |
- |
7190 |
- # Intel code |
7191 |
- driver_enable video_cards_i915 i915 |
7192 |
- driver_enable video_cards_i965 i965 |
7193 |
- if ! use video_cards_i915 && \ |
7194 |
- ! use video_cards_i965; then |
7195 |
- driver_enable video_cards_intel i915 i965 |
7196 |
- fi |
7197 |
- |
7198 |
- # Nouveau code |
7199 |
- driver_enable video_cards_nouveau nouveau |
7200 |
- |
7201 |
- # ATI code |
7202 |
- driver_enable video_cards_r100 radeon |
7203 |
- driver_enable video_cards_r200 r200 |
7204 |
- if ! use video_cards_r100 && \ |
7205 |
- ! use video_cards_r200; then |
7206 |
- driver_enable video_cards_radeon radeon r200 |
7207 |
- fi |
7208 |
- fi |
7209 |
- |
7210 |
- if use egl; then |
7211 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
7212 |
- fi |
7213 |
- |
7214 |
- if use gallium; then |
7215 |
- myconf+=" |
7216 |
- $(use_enable d3d9 nine) |
7217 |
- $(use_enable llvm) |
7218 |
- $(use_enable openmax omx-bellagio) |
7219 |
- $(use_enable vaapi va) |
7220 |
- $(use_enable vdpau) |
7221 |
- $(use_enable xa) |
7222 |
- $(use_enable xvmc) |
7223 |
- " |
7224 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
7225 |
- |
7226 |
- gallium_enable swrast |
7227 |
- gallium_enable video_cards_vc4 vc4 |
7228 |
- gallium_enable video_cards_vivante etnaviv |
7229 |
- gallium_enable video_cards_vmware svga |
7230 |
- gallium_enable video_cards_nouveau nouveau |
7231 |
- gallium_enable video_cards_i915 i915 |
7232 |
- gallium_enable video_cards_imx imx |
7233 |
- if ! use video_cards_i915 && \ |
7234 |
- ! use video_cards_i965; then |
7235 |
- gallium_enable video_cards_intel i915 |
7236 |
- fi |
7237 |
- |
7238 |
- gallium_enable video_cards_r300 r300 |
7239 |
- gallium_enable video_cards_r600 r600 |
7240 |
- gallium_enable video_cards_radeonsi radeonsi |
7241 |
- if ! use video_cards_r300 && \ |
7242 |
- ! use video_cards_r600; then |
7243 |
- gallium_enable video_cards_radeon r300 r600 |
7244 |
- fi |
7245 |
- |
7246 |
- gallium_enable video_cards_freedreno freedreno |
7247 |
- # opencl stuff |
7248 |
- if use opencl; then |
7249 |
- myconf+=" |
7250 |
- $(use_enable opencl) |
7251 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
7252 |
- " |
7253 |
- fi |
7254 |
- |
7255 |
- gallium_enable video_cards_virgl virgl |
7256 |
- fi |
7257 |
- |
7258 |
- if use vulkan; then |
7259 |
- vulkan_enable video_cards_i965 intel |
7260 |
- vulkan_enable video_cards_radeonsi radeon |
7261 |
- fi |
7262 |
- |
7263 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
7264 |
- if [[ ${ABI} == x86 ]]; then |
7265 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
7266 |
- fi |
7267 |
- |
7268 |
- # on abi_x86_32 hardened we need to have asm disable |
7269 |
- if [[ ${ABI} == x86* ]] && use pic; then |
7270 |
- myconf+=" --disable-asm" |
7271 |
- fi |
7272 |
- |
7273 |
- if use gallium; then |
7274 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
7275 |
- else |
7276 |
- myconf+=" $(use_enable osmesa)" |
7277 |
- fi |
7278 |
- |
7279 |
- # build fails with BSD indent, bug #428112 |
7280 |
- use userland_GNU || export INDENT=cat |
7281 |
- |
7282 |
- ECONF_SOURCE="${S}" \ |
7283 |
- econf \ |
7284 |
- --enable-dri \ |
7285 |
- --enable-glx \ |
7286 |
- --enable-shared-glapi \ |
7287 |
- $(use_enable !bindist texture-float) \ |
7288 |
- $(use_enable d3d9 nine) \ |
7289 |
- $(use_enable debug) \ |
7290 |
- $(use_enable dri3) \ |
7291 |
- $(use_enable egl) \ |
7292 |
- $(use_enable gbm) \ |
7293 |
- $(use_enable gles1) \ |
7294 |
- $(use_enable gles2) \ |
7295 |
- $(use_enable nptl glx-tls) \ |
7296 |
- $(use_enable unwind libunwind) \ |
7297 |
- --enable-valgrind=$(usex valgrind auto no) \ |
7298 |
- --enable-llvm-shared-libs \ |
7299 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
7300 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
7301 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
7302 |
- PYTHON2="${PYTHON}" \ |
7303 |
- ${myconf} |
7304 |
-} |
7305 |
- |
7306 |
-multilib_src_install() { |
7307 |
- emake install DESTDIR="${D}" |
7308 |
- |
7309 |
- if use classic || use gallium; then |
7310 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
7311 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
7312 |
- keepdir /usr/$(get_libdir)/dri |
7313 |
- dodir /usr/$(get_libdir)/mesa |
7314 |
- for x in ${gallium_drivers[@]}; do |
7315 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
7316 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
7317 |
- || die "Failed to move ${x}" |
7318 |
- fi |
7319 |
- done |
7320 |
- if use classic; then |
7321 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
7322 |
- fi |
7323 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
7324 |
- if [ -f ${x} -o -L ${x} ]; then |
7325 |
- mv -f "${x}" "${x/dri/mesa}" \ |
7326 |
- || die "Failed to move ${x}" |
7327 |
- fi |
7328 |
- done |
7329 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
7330 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
7331 |
- # remove symlinks to drivers known to eselect |
7332 |
- for x in ${gallium_drivers[@]}; do |
7333 |
- if [ -f ${x} -o -L ${x} ]; then |
7334 |
- rm "${x}" || die "Failed to remove ${x}" |
7335 |
- fi |
7336 |
- done |
7337 |
- popd |
7338 |
- eend $? |
7339 |
- fi |
7340 |
- if use opencl; then |
7341 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
7342 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
7343 |
- dodir ${cl_dir}/{lib,include} |
7344 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
7345 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
7346 |
- "${ED}"${cl_dir} |
7347 |
- fi |
7348 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
7349 |
- mv -f "${ED}"/usr/include/CL \ |
7350 |
- "${ED}"${cl_dir}/include |
7351 |
- fi |
7352 |
- eend $? |
7353 |
- fi |
7354 |
- |
7355 |
- if use openmax; then |
7356 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
7357 |
- doenvd "${T}"/99mesaxdgomx |
7358 |
- keepdir /usr/share/mesa/xdg |
7359 |
- fi |
7360 |
-} |
7361 |
- |
7362 |
-multilib_src_install_all() { |
7363 |
- find "${ED}" -name '*.la' -delete |
7364 |
- einstalldocs |
7365 |
- |
7366 |
- if use !bindist; then |
7367 |
- dodoc docs/patents.txt |
7368 |
- fi |
7369 |
- |
7370 |
- # Install config file for eselect mesa |
7371 |
- insinto /usr/share/mesa |
7372 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
7373 |
-} |
7374 |
- |
7375 |
-multilib_src_test() { |
7376 |
- if use llvm; then |
7377 |
- 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' |
7378 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
7379 |
- emake ${llvm_tests} |
7380 |
- pax-mark m ${llvm_tests} |
7381 |
- popd >/dev/null || die |
7382 |
- fi |
7383 |
- emake check |
7384 |
-} |
7385 |
- |
7386 |
-pkg_postinst() { |
7387 |
- # Switch to the xorg implementation. |
7388 |
- echo |
7389 |
- eselect opengl set --use-old ${OPENGL_DIR} |
7390 |
- |
7391 |
- # Select classic/gallium drivers |
7392 |
- if use classic || use gallium; then |
7393 |
- eselect mesa set --auto |
7394 |
- fi |
7395 |
- |
7396 |
- # Switch to mesa opencl |
7397 |
- if use opencl; then |
7398 |
- eselect opencl set --use-old ${PN} |
7399 |
- fi |
7400 |
- |
7401 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
7402 |
- if use openmax; then |
7403 |
- ebegin "Registering OpenMAX drivers" |
7404 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
7405 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
7406 |
- omxregister-bellagio |
7407 |
- eend $? |
7408 |
- fi |
7409 |
- |
7410 |
- # warn about patent encumbered texture-float |
7411 |
- if use !bindist; then |
7412 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
7413 |
- elog "enabled. Please see patents.txt for an explanation." |
7414 |
- fi |
7415 |
- |
7416 |
- if ! has_version media-libs/libtxc_dxtn; then |
7417 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
7418 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
7419 |
- elog "textures in some apps, and some others even require this to run." |
7420 |
- fi |
7421 |
-} |
7422 |
- |
7423 |
-pkg_prerm() { |
7424 |
- if use openmax; then |
7425 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
7426 |
- fi |
7427 |
-} |
7428 |
- |
7429 |
-# $1 - VIDEO_CARDS flag |
7430 |
-# other args - names of DRI drivers to enable |
7431 |
-# TODO: avoid code duplication for a more elegant implementation |
7432 |
-driver_enable() { |
7433 |
- case $# in |
7434 |
- # for enabling unconditionally |
7435 |
- 1) |
7436 |
- DRI_DRIVERS+=",$1" |
7437 |
- ;; |
7438 |
- *) |
7439 |
- if use $1; then |
7440 |
- shift |
7441 |
- for i in $@; do |
7442 |
- DRI_DRIVERS+=",${i}" |
7443 |
- done |
7444 |
- fi |
7445 |
- ;; |
7446 |
- esac |
7447 |
-} |
7448 |
- |
7449 |
-gallium_enable() { |
7450 |
- case $# in |
7451 |
- # for enabling unconditionally |
7452 |
- 1) |
7453 |
- GALLIUM_DRIVERS+=",$1" |
7454 |
- ;; |
7455 |
- *) |
7456 |
- if use $1; then |
7457 |
- shift |
7458 |
- for i in $@; do |
7459 |
- GALLIUM_DRIVERS+=",${i}" |
7460 |
- done |
7461 |
- fi |
7462 |
- ;; |
7463 |
- esac |
7464 |
-} |
7465 |
- |
7466 |
-vulkan_enable() { |
7467 |
- case $# in |
7468 |
- # for enabling unconditionally |
7469 |
- 1) |
7470 |
- VULKAN_DRIVERS+=",$1" |
7471 |
- ;; |
7472 |
- *) |
7473 |
- if use $1; then |
7474 |
- shift |
7475 |
- for i in $@; do |
7476 |
- VULKAN_DRIVERS+=",${i}" |
7477 |
- done |
7478 |
- fi |
7479 |
- ;; |
7480 |
- esac |
7481 |
-} |
7482 |
|
7483 |
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml |
7484 |
index b7a97ca..8e1144c 100644 |
7485 |
--- a/media-libs/mesa/metadata.xml |
7486 |
+++ b/media-libs/mesa/metadata.xml |
7487 |
@@ -12,16 +12,12 @@ |
7488 |
<flag name="dri3">Enable DRI3 support.</flag> |
7489 |
<flag name="egl">Enable EGL support.</flag> |
7490 |
<flag name="gallium">Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag> |
7491 |
- <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> for low level sha1 utility functions.</flag> |
7492 |
<flag name="gbm">Enable the Graphics Buffer Manager for EGL on KMS.</flag> |
7493 |
<flag name="gles1">Enable GLESv1 support.</flag> |
7494 |
<flag name="gles2">Enable GLESv2 support.</flag> |
7495 |
- <flag name="libressl">Use <pkg>dev-libs/libressl</pkg> for low level sha1 utility functions.</flag> |
7496 |
<flag name="llvm">Enable LLVM backend for Gallium3D.</flag> |
7497 |
- <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> for low level sha1 utility functions.</flag> |
7498 |
<flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag> |
7499 |
<flag name="openmax">Enable OpenMAX video decode/encode acceleration for Gallium3D.</flag> |
7500 |
- <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for low level sha1 utility functions. May cause issues with games from Steam.</flag> |
7501 |
<flag name="osmesa">Build the Mesa library for off-screen rendering.</flag> |
7502 |
<flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag> |
7503 |
<flag name="pic">disable optimized assembly code that is not PIC friendly</flag> |