1 |
commit: ad7bcf7cd9fc0633c7cb4736f51a144a9fb30f69 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 29 20:56:00 2017 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 29 20:59:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad7bcf7c |
7 |
|
8 |
media-libs/mesa: Drop old |
9 |
|
10 |
media-libs/mesa/Manifest | 3 - |
11 |
media-libs/mesa/mesa-17.0.2.ebuild | 513 ------------------------------------- |
12 |
media-libs/mesa/mesa-17.0.3.ebuild | 513 ------------------------------------- |
13 |
media-libs/mesa/mesa-17.0.4.ebuild | 513 ------------------------------------- |
14 |
4 files changed, 1542 deletions(-) |
15 |
|
16 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
17 |
index 5488828e68e..8d32817b23d 100644 |
18 |
--- a/media-libs/mesa/Manifest |
19 |
+++ b/media-libs/mesa/Manifest |
20 |
@@ -1,6 +1,3 @@ |
21 |
DIST mesa-13.0.5.tar.xz 9171480 SHA256 bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87 SHA512 db5f6a97b40ee6e45ba81280ab4543354e9f274c7112c5a43b8970244f329902a22f68d5eeddad5b64502507f462ffbcc028efc5dff93822adf95d30ba5903c1 WHIRLPOOL 164116608908331d4e8d69c4d2b92dc22e8e6d98725a20e8c2da5cc24b4e9ae9e05ee9c7209d55371b419e0f4e6c1d4752a46d149a968a6b83612aa77f7e480e |
22 |
DIST mesa-13.0.6.tar.xz 9179236 SHA256 29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597 SHA512 2455e044647f674c2f1dd524143b61b8630713fa929bbf6fe1c981436a9c08dc933553d638a22b32d2799afb77be746355b48b1b20af172141c5b63891e94441 WHIRLPOOL 1fdaaf29de96225cf41a3bdeb559a35cf20fda524f80985b2bfdc52095dcb7f6b320704b7ccf754a6f80555925a6a80dfa2b1115a4bdd9bdc1ebb672f115208a |
23 |
-DIST mesa-17.0.2.tar.xz 9451056 SHA256 f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4 SHA512 df0cb47d01dee16d1d72e0a5fd9d49ab412294761ca647cbb6b411e16892b8be503d87911591339d4630d16b7c948897bfa4321b2c5a8a4219fa58b347015471 WHIRLPOOL 3cb03a48da994202e6a39f4adc97e8b40f2bcc713f5fb859fbbdc0a068f3842a59bc916fa0e36138cf560c4bf25c3b70425d6ed9ea8096acc8bbd9ddebfd1acc |
24 |
-DIST mesa-17.0.3.tar.xz 9485792 SHA256 ca646f5075a002d60ef9123c8a4331cede155c01712ef945a65c59a5e69fe7ed SHA512 0bcf1609b54fdabb30ec0a500b78e039bd50060c2c7f5a2e57fca29e1a311fb785dadc3cd311018ebe8020d1cc6320181ece2d2aa39d2f215b0ebf2cb0a55165 WHIRLPOOL fdb1d155e3c8aa22ccbe1403240d891381871e6b62cbd104bc83fd5cd6c3645ac58ac88ba3ff0878e7795404fde77481c3374beb60f295569fe020a1389fb853 |
25 |
-DIST mesa-17.0.4.tar.xz 9454976 SHA256 1269dc8545a193932a0779b2db5bce9be4a5f6813b98c38b93b372be8362a346 SHA512 0b465dc165b55e4b2ae61aca2d2c6694714522885a14fb61272f73e685aef734be4aac3d58b8d2ceb2643db0578c6187da35fe2cbe41b62a89564e60659b201d WHIRLPOOL 388b54eee22863cff945452b9fcf915348bd338b9f0e3c685236879300e44cff2ce2c9480b950f96c42bc4fddc268af076de01b78492dcd407fcaae3b67d5200 |
26 |
DIST mesa-17.0.5.tar.xz 9492760 SHA256 668efa445d2f57a26e5c096b1965a685733a3b57d9c736f9d6460263847f9bfe SHA512 942fa62c9098bcd030856cd622696eae418f292addb912e1d558cf27d396f25c3f2000dae97a12d1ff233f1ea157497259442082005035bb27b9bafb2cfc33c3 WHIRLPOOL 84ed3198a5f36541ebe966d8375b240be6ff815817b8cd8cf136941122b69df2ab2a5cdad93a255e03653e05c1db805693fa2e58082bf575341acbc9e887b862 |
27 |
|
28 |
diff --git a/media-libs/mesa/mesa-17.0.2.ebuild b/media-libs/mesa/mesa-17.0.2.ebuild |
29 |
deleted file mode 100644 |
30 |
index 9ba88cc64a9..00000000000 |
31 |
--- a/media-libs/mesa/mesa-17.0.2.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,513 +0,0 @@ |
34 |
-# Copyright 1999-2017 Gentoo Foundation |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=6 |
38 |
- |
39 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
40 |
- |
41 |
-if [[ ${PV} = 9999 ]]; then |
42 |
- GIT_ECLASS="git-r3" |
43 |
- EXPERIMENTAL="true" |
44 |
-fi |
45 |
- |
46 |
-PYTHON_COMPAT=( python2_7 ) |
47 |
- |
48 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
49 |
- |
50 |
-OPENGL_DIR="xorg-x11" |
51 |
- |
52 |
-MY_P="${P/_/-}" |
53 |
- |
54 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
55 |
-HOMEPAGE="https://www.mesa3d.org/" |
56 |
- |
57 |
-if [[ $PV == 9999 ]]; then |
58 |
- SRC_URI="" |
59 |
-else |
60 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
61 |
- 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" |
62 |
-fi |
63 |
- |
64 |
-LICENSE="MIT" |
65 |
-SLOT="0" |
66 |
-RESTRICT="!bindist? ( bindist )" |
67 |
- |
68 |
-INTEL_CARDS="i915 i965 intel" |
69 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
70 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
71 |
-for card in ${VIDEO_CARDS}; do |
72 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
73 |
-done |
74 |
- |
75 |
-IUSE="${IUSE_VIDEO_CARDS} |
76 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm |
77 |
- +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind vdpau |
78 |
- vulkan wayland xvmc xa" |
79 |
- |
80 |
-REQUIRED_USE=" |
81 |
- d3d9? ( dri3 gallium ) |
82 |
- llvm? ( gallium ) |
83 |
- opencl? ( gallium llvm ) |
84 |
- openmax? ( gallium ) |
85 |
- gles1? ( egl ) |
86 |
- gles2? ( egl ) |
87 |
- vaapi? ( gallium ) |
88 |
- vdpau? ( gallium ) |
89 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
90 |
- video_cards_radeonsi? ( llvm ) ) |
91 |
- wayland? ( egl gbm ) |
92 |
- xa? ( gallium ) |
93 |
- video_cards_freedreno? ( gallium ) |
94 |
- video_cards_intel? ( classic ) |
95 |
- video_cards_i915? ( || ( classic gallium ) ) |
96 |
- video_cards_i965? ( classic ) |
97 |
- video_cards_imx? ( gallium ) |
98 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
99 |
- video_cards_radeon? ( || ( classic gallium ) |
100 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
101 |
- video_cards_r100? ( classic ) |
102 |
- video_cards_r200? ( classic ) |
103 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
104 |
- video_cards_r600? ( gallium ) |
105 |
- video_cards_radeonsi? ( gallium llvm ) |
106 |
- video_cards_vivante? ( gallium gbm ) |
107 |
- video_cards_vmware? ( gallium ) |
108 |
-" |
109 |
- |
110 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.74" |
111 |
-# keep correct libdrm and dri2proto dep |
112 |
-# keep blocks in rdepend for binpkg |
113 |
-RDEPEND=" |
114 |
- !<x11-base/xorg-server-1.7 |
115 |
- !<=x11-proto/xf86driproto-2.0.3 |
116 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
117 |
- classic? ( app-eselect/eselect-mesa ) |
118 |
- gallium? ( app-eselect/eselect-mesa ) |
119 |
- >=app-eselect/eselect-opengl-1.3.0 |
120 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
121 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
122 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
123 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
124 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
125 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
126 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
127 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
128 |
- llvm? ( |
129 |
- video_cards_radeonsi? ( |
130 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
131 |
- vulkan? ( |
132 |
- || ( |
133 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
134 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] ) ) |
135 |
- ) |
136 |
- video_cards_r600? ( |
137 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
138 |
- ) |
139 |
- video_cards_radeon? ( |
140 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
141 |
- ) |
142 |
- || ( |
143 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
144 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
145 |
- ) |
146 |
- <sys-devel/llvm-5:=[${MULTILIB_USEDEP}] |
147 |
- ) |
148 |
- opencl? ( |
149 |
- app-eselect/eselect-opencl |
150 |
- dev-libs/libclc |
151 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
152 |
- ) |
153 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
154 |
- vaapi? ( |
155 |
- >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
156 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
157 |
- ) |
158 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
159 |
- wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] ) |
160 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
161 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
162 |
-" |
163 |
-for card in ${INTEL_CARDS}; do |
164 |
- RDEPEND="${RDEPEND} |
165 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
166 |
- " |
167 |
-done |
168 |
- |
169 |
-for card in ${RADEON_CARDS}; do |
170 |
- RDEPEND="${RDEPEND} |
171 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
172 |
- " |
173 |
-done |
174 |
-RDEPEND="${RDEPEND} |
175 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
176 |
-" |
177 |
- |
178 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
179 |
-# LLVM < 3.9 is out of the game |
180 |
-DEPEND="${RDEPEND} |
181 |
- ${PYTHON_DEPS} |
182 |
- llvm? ( |
183 |
- video_cards_radeonsi? ( || ( |
184 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
185 |
- sys-devel/llvm[video_cards_radeon] |
186 |
- ) ) |
187 |
- ) |
188 |
- opencl? ( |
189 |
- || ( |
190 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
191 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
192 |
- ) |
193 |
- || ( |
194 |
- sys-devel/clang:4[${MULTILIB_USEDEP}] |
195 |
- >=sys-devel/clang-3.6.0:0[${MULTILIB_USEDEP}] |
196 |
- ) |
197 |
- >=sys-devel/gcc-4.6 |
198 |
- ) |
199 |
- sys-devel/gettext |
200 |
- virtual/pkgconfig |
201 |
- valgrind? ( dev-util/valgrind ) |
202 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
203 |
- dri3? ( |
204 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
205 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
206 |
- ) |
207 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
208 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
209 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
210 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
211 |
-" |
212 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
213 |
- sys-devel/bison |
214 |
- sys-devel/flex |
215 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
216 |
-" |
217 |
- |
218 |
-S="${WORKDIR}/${MY_P}" |
219 |
-EGIT_CHECKOUT_DIR=${S} |
220 |
- |
221 |
-QA_WX_LOAD=" |
222 |
-x86? ( |
223 |
- !pic? ( |
224 |
- usr/lib*/libglapi.so.0.0.0 |
225 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
226 |
- usr/lib*/libGLESv2.so.2.0.0 |
227 |
- usr/lib*/libGL.so.1.2.0 |
228 |
- usr/lib*/libOSMesa.so.8.0.0 |
229 |
- ) |
230 |
-)" |
231 |
- |
232 |
-pkg_setup() { |
233 |
- # warning message for bug 459306 |
234 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
235 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
236 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
237 |
- fi |
238 |
- |
239 |
- if use llvm || use opencl; then |
240 |
- LLVM_MAX_SLOT=4 llvm_pkg_setup |
241 |
- fi |
242 |
- python-any-r1_pkg_setup |
243 |
-} |
244 |
- |
245 |
-src_prepare() { |
246 |
- [[ ${PV} == 9999 ]] && eautoreconf |
247 |
- |
248 |
- eapply_user |
249 |
-} |
250 |
- |
251 |
-multilib_src_configure() { |
252 |
- local myconf |
253 |
- |
254 |
- if use classic; then |
255 |
- # Configurable DRI drivers |
256 |
- driver_enable swrast |
257 |
- |
258 |
- # Intel code |
259 |
- driver_enable video_cards_i915 i915 |
260 |
- driver_enable video_cards_i965 i965 |
261 |
- if ! use video_cards_i915 && \ |
262 |
- ! use video_cards_i965; then |
263 |
- driver_enable video_cards_intel i915 i965 |
264 |
- fi |
265 |
- |
266 |
- # Nouveau code |
267 |
- driver_enable video_cards_nouveau nouveau |
268 |
- |
269 |
- # ATI code |
270 |
- driver_enable video_cards_r100 radeon |
271 |
- driver_enable video_cards_r200 r200 |
272 |
- if ! use video_cards_r100 && \ |
273 |
- ! use video_cards_r200; then |
274 |
- driver_enable video_cards_radeon radeon r200 |
275 |
- fi |
276 |
- fi |
277 |
- |
278 |
- if use egl; then |
279 |
- myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
280 |
- fi |
281 |
- |
282 |
- if use gallium; then |
283 |
- myconf+=" |
284 |
- $(use_enable d3d9 nine) |
285 |
- $(use_enable llvm gallium-llvm) |
286 |
- $(use_enable openmax omx) |
287 |
- $(use_enable vaapi va) |
288 |
- $(use_enable vdpau) |
289 |
- $(use_enable xa) |
290 |
- $(use_enable xvmc) |
291 |
- " |
292 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
293 |
- |
294 |
- gallium_enable swrast |
295 |
- gallium_enable video_cards_vc4 vc4 |
296 |
- gallium_enable video_cards_vivante etnaviv |
297 |
- gallium_enable video_cards_vmware svga |
298 |
- gallium_enable video_cards_nouveau nouveau |
299 |
- gallium_enable video_cards_i915 i915 |
300 |
- gallium_enable video_cards_imx imx |
301 |
- if ! use video_cards_i915 && \ |
302 |
- ! use video_cards_i965; then |
303 |
- gallium_enable video_cards_intel i915 |
304 |
- fi |
305 |
- |
306 |
- gallium_enable video_cards_r300 r300 |
307 |
- gallium_enable video_cards_r600 r600 |
308 |
- gallium_enable video_cards_radeonsi radeonsi |
309 |
- if ! use video_cards_r300 && \ |
310 |
- ! use video_cards_r600; then |
311 |
- gallium_enable video_cards_radeon r300 r600 |
312 |
- fi |
313 |
- |
314 |
- gallium_enable video_cards_freedreno freedreno |
315 |
- # opencl stuff |
316 |
- if use opencl; then |
317 |
- myconf+=" |
318 |
- $(use_enable opencl) |
319 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
320 |
- " |
321 |
- fi |
322 |
- fi |
323 |
- |
324 |
- if use vulkan; then |
325 |
- vulkan_enable video_cards_i965 intel |
326 |
- vulkan_enable video_cards_radeonsi radeon |
327 |
- fi |
328 |
- |
329 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
330 |
- if [[ ${ABI} == x86 ]]; then |
331 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
332 |
- fi |
333 |
- |
334 |
- # on abi_x86_32 hardened we need to have asm disable |
335 |
- if [[ ${ABI} == x86* ]] && use pic; then |
336 |
- myconf+=" --disable-asm" |
337 |
- fi |
338 |
- |
339 |
- if use gallium; then |
340 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
341 |
- else |
342 |
- myconf+=" $(use_enable osmesa)" |
343 |
- fi |
344 |
- |
345 |
- # build fails with BSD indent, bug #428112 |
346 |
- use userland_GNU || export INDENT=cat |
347 |
- |
348 |
- ECONF_SOURCE="${S}" \ |
349 |
- econf \ |
350 |
- --enable-dri \ |
351 |
- --enable-glx \ |
352 |
- --enable-shared-glapi \ |
353 |
- $(use_enable !bindist texture-float) \ |
354 |
- $(use_enable d3d9 nine) \ |
355 |
- $(use_enable debug) \ |
356 |
- $(use_enable dri3) \ |
357 |
- $(use_enable egl) \ |
358 |
- $(use_enable gbm) \ |
359 |
- $(use_enable gles1) \ |
360 |
- $(use_enable gles2) \ |
361 |
- $(use_enable nptl glx-tls) \ |
362 |
- --enable-valgrind=$(usex valgrind auto no) \ |
363 |
- --enable-llvm-shared-libs \ |
364 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
365 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
366 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
367 |
- PYTHON2="${PYTHON}" \ |
368 |
- ${myconf} |
369 |
-} |
370 |
- |
371 |
-multilib_src_install() { |
372 |
- emake install DESTDIR="${D}" |
373 |
- |
374 |
- if use classic || use gallium; then |
375 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
376 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
377 |
- keepdir /usr/$(get_libdir)/dri |
378 |
- dodir /usr/$(get_libdir)/mesa |
379 |
- for x in ${gallium_drivers[@]}; do |
380 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
381 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
382 |
- || die "Failed to move ${x}" |
383 |
- fi |
384 |
- done |
385 |
- if use classic; then |
386 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
387 |
- fi |
388 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
389 |
- if [ -f ${x} -o -L ${x} ]; then |
390 |
- mv -f "${x}" "${x/dri/mesa}" \ |
391 |
- || die "Failed to move ${x}" |
392 |
- fi |
393 |
- done |
394 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
395 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
396 |
- # remove symlinks to drivers known to eselect |
397 |
- for x in ${gallium_drivers[@]}; do |
398 |
- if [ -f ${x} -o -L ${x} ]; then |
399 |
- rm "${x}" || die "Failed to remove ${x}" |
400 |
- fi |
401 |
- done |
402 |
- popd |
403 |
- eend $? |
404 |
- fi |
405 |
- if use opencl; then |
406 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
407 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
408 |
- dodir ${cl_dir}/{lib,include} |
409 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
410 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
411 |
- "${ED}"${cl_dir} |
412 |
- fi |
413 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
414 |
- mv -f "${ED}"/usr/include/CL \ |
415 |
- "${ED}"${cl_dir}/include |
416 |
- fi |
417 |
- eend $? |
418 |
- fi |
419 |
- |
420 |
- if use openmax; then |
421 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
422 |
- doenvd "${T}"/99mesaxdgomx |
423 |
- keepdir /usr/share/mesa/xdg |
424 |
- fi |
425 |
-} |
426 |
- |
427 |
-multilib_src_install_all() { |
428 |
- find "${ED}" -name '*.la' -delete |
429 |
- einstalldocs |
430 |
- |
431 |
- if use !bindist; then |
432 |
- dodoc docs/patents.txt |
433 |
- fi |
434 |
- |
435 |
- # Install config file for eselect mesa |
436 |
- insinto /usr/share/mesa |
437 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
438 |
-} |
439 |
- |
440 |
-multilib_src_test() { |
441 |
- if use llvm; then |
442 |
- 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' |
443 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
444 |
- emake ${llvm_tests} |
445 |
- pax-mark m ${llvm_tests} |
446 |
- popd >/dev/null || die |
447 |
- fi |
448 |
- emake check |
449 |
-} |
450 |
- |
451 |
-pkg_postinst() { |
452 |
- # Switch to the xorg implementation. |
453 |
- echo |
454 |
- eselect opengl set --use-old ${OPENGL_DIR} |
455 |
- |
456 |
- # Select classic/gallium drivers |
457 |
- if use classic || use gallium; then |
458 |
- eselect mesa set --auto |
459 |
- fi |
460 |
- |
461 |
- # Switch to mesa opencl |
462 |
- if use opencl; then |
463 |
- eselect opencl set --use-old ${PN} |
464 |
- fi |
465 |
- |
466 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
467 |
- if use openmax; then |
468 |
- ebegin "Registering OpenMAX drivers" |
469 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
470 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
471 |
- omxregister-bellagio |
472 |
- eend $? |
473 |
- fi |
474 |
- |
475 |
- # warn about patent encumbered texture-float |
476 |
- if use !bindist; then |
477 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
478 |
- elog "enabled. Please see patents.txt for an explanation." |
479 |
- fi |
480 |
- |
481 |
- if ! has_version media-libs/libtxc_dxtn; then |
482 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
483 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
484 |
- elog "textures in some apps, and some others even require this to run." |
485 |
- fi |
486 |
-} |
487 |
- |
488 |
-pkg_prerm() { |
489 |
- if use openmax; then |
490 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
491 |
- fi |
492 |
-} |
493 |
- |
494 |
-# $1 - VIDEO_CARDS flag |
495 |
-# other args - names of DRI drivers to enable |
496 |
-# TODO: avoid code duplication for a more elegant implementation |
497 |
-driver_enable() { |
498 |
- case $# in |
499 |
- # for enabling unconditionally |
500 |
- 1) |
501 |
- DRI_DRIVERS+=",$1" |
502 |
- ;; |
503 |
- *) |
504 |
- if use $1; then |
505 |
- shift |
506 |
- for i in $@; do |
507 |
- DRI_DRIVERS+=",${i}" |
508 |
- done |
509 |
- fi |
510 |
- ;; |
511 |
- esac |
512 |
-} |
513 |
- |
514 |
-gallium_enable() { |
515 |
- case $# in |
516 |
- # for enabling unconditionally |
517 |
- 1) |
518 |
- GALLIUM_DRIVERS+=",$1" |
519 |
- ;; |
520 |
- *) |
521 |
- if use $1; then |
522 |
- shift |
523 |
- for i in $@; do |
524 |
- GALLIUM_DRIVERS+=",${i}" |
525 |
- done |
526 |
- fi |
527 |
- ;; |
528 |
- esac |
529 |
-} |
530 |
- |
531 |
-vulkan_enable() { |
532 |
- case $# in |
533 |
- # for enabling unconditionally |
534 |
- 1) |
535 |
- VULKAN_DRIVERS+=",$1" |
536 |
- ;; |
537 |
- *) |
538 |
- if use $1; then |
539 |
- shift |
540 |
- for i in $@; do |
541 |
- VULKAN_DRIVERS+=",${i}" |
542 |
- done |
543 |
- fi |
544 |
- ;; |
545 |
- esac |
546 |
-} |
547 |
|
548 |
diff --git a/media-libs/mesa/mesa-17.0.3.ebuild b/media-libs/mesa/mesa-17.0.3.ebuild |
549 |
deleted file mode 100644 |
550 |
index 9ba88cc64a9..00000000000 |
551 |
--- a/media-libs/mesa/mesa-17.0.3.ebuild |
552 |
+++ /dev/null |
553 |
@@ -1,513 +0,0 @@ |
554 |
-# Copyright 1999-2017 Gentoo Foundation |
555 |
-# Distributed under the terms of the GNU General Public License v2 |
556 |
- |
557 |
-EAPI=6 |
558 |
- |
559 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
560 |
- |
561 |
-if [[ ${PV} = 9999 ]]; then |
562 |
- GIT_ECLASS="git-r3" |
563 |
- EXPERIMENTAL="true" |
564 |
-fi |
565 |
- |
566 |
-PYTHON_COMPAT=( python2_7 ) |
567 |
- |
568 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
569 |
- |
570 |
-OPENGL_DIR="xorg-x11" |
571 |
- |
572 |
-MY_P="${P/_/-}" |
573 |
- |
574 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
575 |
-HOMEPAGE="https://www.mesa3d.org/" |
576 |
- |
577 |
-if [[ $PV == 9999 ]]; then |
578 |
- SRC_URI="" |
579 |
-else |
580 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
581 |
- 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" |
582 |
-fi |
583 |
- |
584 |
-LICENSE="MIT" |
585 |
-SLOT="0" |
586 |
-RESTRICT="!bindist? ( bindist )" |
587 |
- |
588 |
-INTEL_CARDS="i915 i965 intel" |
589 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
590 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
591 |
-for card in ${VIDEO_CARDS}; do |
592 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
593 |
-done |
594 |
- |
595 |
-IUSE="${IUSE_VIDEO_CARDS} |
596 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm |
597 |
- +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind vdpau |
598 |
- vulkan wayland xvmc xa" |
599 |
- |
600 |
-REQUIRED_USE=" |
601 |
- d3d9? ( dri3 gallium ) |
602 |
- llvm? ( gallium ) |
603 |
- opencl? ( gallium llvm ) |
604 |
- openmax? ( gallium ) |
605 |
- gles1? ( egl ) |
606 |
- gles2? ( egl ) |
607 |
- vaapi? ( gallium ) |
608 |
- vdpau? ( gallium ) |
609 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
610 |
- video_cards_radeonsi? ( llvm ) ) |
611 |
- wayland? ( egl gbm ) |
612 |
- xa? ( gallium ) |
613 |
- video_cards_freedreno? ( gallium ) |
614 |
- video_cards_intel? ( classic ) |
615 |
- video_cards_i915? ( || ( classic gallium ) ) |
616 |
- video_cards_i965? ( classic ) |
617 |
- video_cards_imx? ( gallium ) |
618 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
619 |
- video_cards_radeon? ( || ( classic gallium ) |
620 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
621 |
- video_cards_r100? ( classic ) |
622 |
- video_cards_r200? ( classic ) |
623 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
624 |
- video_cards_r600? ( gallium ) |
625 |
- video_cards_radeonsi? ( gallium llvm ) |
626 |
- video_cards_vivante? ( gallium gbm ) |
627 |
- video_cards_vmware? ( gallium ) |
628 |
-" |
629 |
- |
630 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.74" |
631 |
-# keep correct libdrm and dri2proto dep |
632 |
-# keep blocks in rdepend for binpkg |
633 |
-RDEPEND=" |
634 |
- !<x11-base/xorg-server-1.7 |
635 |
- !<=x11-proto/xf86driproto-2.0.3 |
636 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
637 |
- classic? ( app-eselect/eselect-mesa ) |
638 |
- gallium? ( app-eselect/eselect-mesa ) |
639 |
- >=app-eselect/eselect-opengl-1.3.0 |
640 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
641 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
642 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
643 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
644 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
645 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
646 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
647 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
648 |
- llvm? ( |
649 |
- video_cards_radeonsi? ( |
650 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
651 |
- vulkan? ( |
652 |
- || ( |
653 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
654 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] ) ) |
655 |
- ) |
656 |
- video_cards_r600? ( |
657 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
658 |
- ) |
659 |
- video_cards_radeon? ( |
660 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
661 |
- ) |
662 |
- || ( |
663 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
664 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
665 |
- ) |
666 |
- <sys-devel/llvm-5:=[${MULTILIB_USEDEP}] |
667 |
- ) |
668 |
- opencl? ( |
669 |
- app-eselect/eselect-opencl |
670 |
- dev-libs/libclc |
671 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
672 |
- ) |
673 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
674 |
- vaapi? ( |
675 |
- >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
676 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
677 |
- ) |
678 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
679 |
- wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] ) |
680 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
681 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
682 |
-" |
683 |
-for card in ${INTEL_CARDS}; do |
684 |
- RDEPEND="${RDEPEND} |
685 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
686 |
- " |
687 |
-done |
688 |
- |
689 |
-for card in ${RADEON_CARDS}; do |
690 |
- RDEPEND="${RDEPEND} |
691 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
692 |
- " |
693 |
-done |
694 |
-RDEPEND="${RDEPEND} |
695 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
696 |
-" |
697 |
- |
698 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
699 |
-# LLVM < 3.9 is out of the game |
700 |
-DEPEND="${RDEPEND} |
701 |
- ${PYTHON_DEPS} |
702 |
- llvm? ( |
703 |
- video_cards_radeonsi? ( || ( |
704 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
705 |
- sys-devel/llvm[video_cards_radeon] |
706 |
- ) ) |
707 |
- ) |
708 |
- opencl? ( |
709 |
- || ( |
710 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
711 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
712 |
- ) |
713 |
- || ( |
714 |
- sys-devel/clang:4[${MULTILIB_USEDEP}] |
715 |
- >=sys-devel/clang-3.6.0:0[${MULTILIB_USEDEP}] |
716 |
- ) |
717 |
- >=sys-devel/gcc-4.6 |
718 |
- ) |
719 |
- sys-devel/gettext |
720 |
- virtual/pkgconfig |
721 |
- valgrind? ( dev-util/valgrind ) |
722 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
723 |
- dri3? ( |
724 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
725 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
726 |
- ) |
727 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
728 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
729 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
730 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
731 |
-" |
732 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
733 |
- sys-devel/bison |
734 |
- sys-devel/flex |
735 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
736 |
-" |
737 |
- |
738 |
-S="${WORKDIR}/${MY_P}" |
739 |
-EGIT_CHECKOUT_DIR=${S} |
740 |
- |
741 |
-QA_WX_LOAD=" |
742 |
-x86? ( |
743 |
- !pic? ( |
744 |
- usr/lib*/libglapi.so.0.0.0 |
745 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
746 |
- usr/lib*/libGLESv2.so.2.0.0 |
747 |
- usr/lib*/libGL.so.1.2.0 |
748 |
- usr/lib*/libOSMesa.so.8.0.0 |
749 |
- ) |
750 |
-)" |
751 |
- |
752 |
-pkg_setup() { |
753 |
- # warning message for bug 459306 |
754 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
755 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
756 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
757 |
- fi |
758 |
- |
759 |
- if use llvm || use opencl; then |
760 |
- LLVM_MAX_SLOT=4 llvm_pkg_setup |
761 |
- fi |
762 |
- python-any-r1_pkg_setup |
763 |
-} |
764 |
- |
765 |
-src_prepare() { |
766 |
- [[ ${PV} == 9999 ]] && eautoreconf |
767 |
- |
768 |
- eapply_user |
769 |
-} |
770 |
- |
771 |
-multilib_src_configure() { |
772 |
- local myconf |
773 |
- |
774 |
- if use classic; then |
775 |
- # Configurable DRI drivers |
776 |
- driver_enable swrast |
777 |
- |
778 |
- # Intel code |
779 |
- driver_enable video_cards_i915 i915 |
780 |
- driver_enable video_cards_i965 i965 |
781 |
- if ! use video_cards_i915 && \ |
782 |
- ! use video_cards_i965; then |
783 |
- driver_enable video_cards_intel i915 i965 |
784 |
- fi |
785 |
- |
786 |
- # Nouveau code |
787 |
- driver_enable video_cards_nouveau nouveau |
788 |
- |
789 |
- # ATI code |
790 |
- driver_enable video_cards_r100 radeon |
791 |
- driver_enable video_cards_r200 r200 |
792 |
- if ! use video_cards_r100 && \ |
793 |
- ! use video_cards_r200; then |
794 |
- driver_enable video_cards_radeon radeon r200 |
795 |
- fi |
796 |
- fi |
797 |
- |
798 |
- if use egl; then |
799 |
- myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
800 |
- fi |
801 |
- |
802 |
- if use gallium; then |
803 |
- myconf+=" |
804 |
- $(use_enable d3d9 nine) |
805 |
- $(use_enable llvm gallium-llvm) |
806 |
- $(use_enable openmax omx) |
807 |
- $(use_enable vaapi va) |
808 |
- $(use_enable vdpau) |
809 |
- $(use_enable xa) |
810 |
- $(use_enable xvmc) |
811 |
- " |
812 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
813 |
- |
814 |
- gallium_enable swrast |
815 |
- gallium_enable video_cards_vc4 vc4 |
816 |
- gallium_enable video_cards_vivante etnaviv |
817 |
- gallium_enable video_cards_vmware svga |
818 |
- gallium_enable video_cards_nouveau nouveau |
819 |
- gallium_enable video_cards_i915 i915 |
820 |
- gallium_enable video_cards_imx imx |
821 |
- if ! use video_cards_i915 && \ |
822 |
- ! use video_cards_i965; then |
823 |
- gallium_enable video_cards_intel i915 |
824 |
- fi |
825 |
- |
826 |
- gallium_enable video_cards_r300 r300 |
827 |
- gallium_enable video_cards_r600 r600 |
828 |
- gallium_enable video_cards_radeonsi radeonsi |
829 |
- if ! use video_cards_r300 && \ |
830 |
- ! use video_cards_r600; then |
831 |
- gallium_enable video_cards_radeon r300 r600 |
832 |
- fi |
833 |
- |
834 |
- gallium_enable video_cards_freedreno freedreno |
835 |
- # opencl stuff |
836 |
- if use opencl; then |
837 |
- myconf+=" |
838 |
- $(use_enable opencl) |
839 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
840 |
- " |
841 |
- fi |
842 |
- fi |
843 |
- |
844 |
- if use vulkan; then |
845 |
- vulkan_enable video_cards_i965 intel |
846 |
- vulkan_enable video_cards_radeonsi radeon |
847 |
- fi |
848 |
- |
849 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
850 |
- if [[ ${ABI} == x86 ]]; then |
851 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
852 |
- fi |
853 |
- |
854 |
- # on abi_x86_32 hardened we need to have asm disable |
855 |
- if [[ ${ABI} == x86* ]] && use pic; then |
856 |
- myconf+=" --disable-asm" |
857 |
- fi |
858 |
- |
859 |
- if use gallium; then |
860 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
861 |
- else |
862 |
- myconf+=" $(use_enable osmesa)" |
863 |
- fi |
864 |
- |
865 |
- # build fails with BSD indent, bug #428112 |
866 |
- use userland_GNU || export INDENT=cat |
867 |
- |
868 |
- ECONF_SOURCE="${S}" \ |
869 |
- econf \ |
870 |
- --enable-dri \ |
871 |
- --enable-glx \ |
872 |
- --enable-shared-glapi \ |
873 |
- $(use_enable !bindist texture-float) \ |
874 |
- $(use_enable d3d9 nine) \ |
875 |
- $(use_enable debug) \ |
876 |
- $(use_enable dri3) \ |
877 |
- $(use_enable egl) \ |
878 |
- $(use_enable gbm) \ |
879 |
- $(use_enable gles1) \ |
880 |
- $(use_enable gles2) \ |
881 |
- $(use_enable nptl glx-tls) \ |
882 |
- --enable-valgrind=$(usex valgrind auto no) \ |
883 |
- --enable-llvm-shared-libs \ |
884 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
885 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
886 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
887 |
- PYTHON2="${PYTHON}" \ |
888 |
- ${myconf} |
889 |
-} |
890 |
- |
891 |
-multilib_src_install() { |
892 |
- emake install DESTDIR="${D}" |
893 |
- |
894 |
- if use classic || use gallium; then |
895 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
896 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
897 |
- keepdir /usr/$(get_libdir)/dri |
898 |
- dodir /usr/$(get_libdir)/mesa |
899 |
- for x in ${gallium_drivers[@]}; do |
900 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
901 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
902 |
- || die "Failed to move ${x}" |
903 |
- fi |
904 |
- done |
905 |
- if use classic; then |
906 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
907 |
- fi |
908 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
909 |
- if [ -f ${x} -o -L ${x} ]; then |
910 |
- mv -f "${x}" "${x/dri/mesa}" \ |
911 |
- || die "Failed to move ${x}" |
912 |
- fi |
913 |
- done |
914 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
915 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
916 |
- # remove symlinks to drivers known to eselect |
917 |
- for x in ${gallium_drivers[@]}; do |
918 |
- if [ -f ${x} -o -L ${x} ]; then |
919 |
- rm "${x}" || die "Failed to remove ${x}" |
920 |
- fi |
921 |
- done |
922 |
- popd |
923 |
- eend $? |
924 |
- fi |
925 |
- if use opencl; then |
926 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
927 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
928 |
- dodir ${cl_dir}/{lib,include} |
929 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
930 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
931 |
- "${ED}"${cl_dir} |
932 |
- fi |
933 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
934 |
- mv -f "${ED}"/usr/include/CL \ |
935 |
- "${ED}"${cl_dir}/include |
936 |
- fi |
937 |
- eend $? |
938 |
- fi |
939 |
- |
940 |
- if use openmax; then |
941 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
942 |
- doenvd "${T}"/99mesaxdgomx |
943 |
- keepdir /usr/share/mesa/xdg |
944 |
- fi |
945 |
-} |
946 |
- |
947 |
-multilib_src_install_all() { |
948 |
- find "${ED}" -name '*.la' -delete |
949 |
- einstalldocs |
950 |
- |
951 |
- if use !bindist; then |
952 |
- dodoc docs/patents.txt |
953 |
- fi |
954 |
- |
955 |
- # Install config file for eselect mesa |
956 |
- insinto /usr/share/mesa |
957 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
958 |
-} |
959 |
- |
960 |
-multilib_src_test() { |
961 |
- if use llvm; then |
962 |
- 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' |
963 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
964 |
- emake ${llvm_tests} |
965 |
- pax-mark m ${llvm_tests} |
966 |
- popd >/dev/null || die |
967 |
- fi |
968 |
- emake check |
969 |
-} |
970 |
- |
971 |
-pkg_postinst() { |
972 |
- # Switch to the xorg implementation. |
973 |
- echo |
974 |
- eselect opengl set --use-old ${OPENGL_DIR} |
975 |
- |
976 |
- # Select classic/gallium drivers |
977 |
- if use classic || use gallium; then |
978 |
- eselect mesa set --auto |
979 |
- fi |
980 |
- |
981 |
- # Switch to mesa opencl |
982 |
- if use opencl; then |
983 |
- eselect opencl set --use-old ${PN} |
984 |
- fi |
985 |
- |
986 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
987 |
- if use openmax; then |
988 |
- ebegin "Registering OpenMAX drivers" |
989 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
990 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
991 |
- omxregister-bellagio |
992 |
- eend $? |
993 |
- fi |
994 |
- |
995 |
- # warn about patent encumbered texture-float |
996 |
- if use !bindist; then |
997 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
998 |
- elog "enabled. Please see patents.txt for an explanation." |
999 |
- fi |
1000 |
- |
1001 |
- if ! has_version media-libs/libtxc_dxtn; then |
1002 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
1003 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
1004 |
- elog "textures in some apps, and some others even require this to run." |
1005 |
- fi |
1006 |
-} |
1007 |
- |
1008 |
-pkg_prerm() { |
1009 |
- if use openmax; then |
1010 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1011 |
- fi |
1012 |
-} |
1013 |
- |
1014 |
-# $1 - VIDEO_CARDS flag |
1015 |
-# other args - names of DRI drivers to enable |
1016 |
-# TODO: avoid code duplication for a more elegant implementation |
1017 |
-driver_enable() { |
1018 |
- case $# in |
1019 |
- # for enabling unconditionally |
1020 |
- 1) |
1021 |
- DRI_DRIVERS+=",$1" |
1022 |
- ;; |
1023 |
- *) |
1024 |
- if use $1; then |
1025 |
- shift |
1026 |
- for i in $@; do |
1027 |
- DRI_DRIVERS+=",${i}" |
1028 |
- done |
1029 |
- fi |
1030 |
- ;; |
1031 |
- esac |
1032 |
-} |
1033 |
- |
1034 |
-gallium_enable() { |
1035 |
- case $# in |
1036 |
- # for enabling unconditionally |
1037 |
- 1) |
1038 |
- GALLIUM_DRIVERS+=",$1" |
1039 |
- ;; |
1040 |
- *) |
1041 |
- if use $1; then |
1042 |
- shift |
1043 |
- for i in $@; do |
1044 |
- GALLIUM_DRIVERS+=",${i}" |
1045 |
- done |
1046 |
- fi |
1047 |
- ;; |
1048 |
- esac |
1049 |
-} |
1050 |
- |
1051 |
-vulkan_enable() { |
1052 |
- case $# in |
1053 |
- # for enabling unconditionally |
1054 |
- 1) |
1055 |
- VULKAN_DRIVERS+=",$1" |
1056 |
- ;; |
1057 |
- *) |
1058 |
- if use $1; then |
1059 |
- shift |
1060 |
- for i in $@; do |
1061 |
- VULKAN_DRIVERS+=",${i}" |
1062 |
- done |
1063 |
- fi |
1064 |
- ;; |
1065 |
- esac |
1066 |
-} |
1067 |
|
1068 |
diff --git a/media-libs/mesa/mesa-17.0.4.ebuild b/media-libs/mesa/mesa-17.0.4.ebuild |
1069 |
deleted file mode 100644 |
1070 |
index 9ba88cc64a9..00000000000 |
1071 |
--- a/media-libs/mesa/mesa-17.0.4.ebuild |
1072 |
+++ /dev/null |
1073 |
@@ -1,513 +0,0 @@ |
1074 |
-# Copyright 1999-2017 Gentoo Foundation |
1075 |
-# Distributed under the terms of the GNU General Public License v2 |
1076 |
- |
1077 |
-EAPI=6 |
1078 |
- |
1079 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
1080 |
- |
1081 |
-if [[ ${PV} = 9999 ]]; then |
1082 |
- GIT_ECLASS="git-r3" |
1083 |
- EXPERIMENTAL="true" |
1084 |
-fi |
1085 |
- |
1086 |
-PYTHON_COMPAT=( python2_7 ) |
1087 |
- |
1088 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
1089 |
- |
1090 |
-OPENGL_DIR="xorg-x11" |
1091 |
- |
1092 |
-MY_P="${P/_/-}" |
1093 |
- |
1094 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
1095 |
-HOMEPAGE="https://www.mesa3d.org/" |
1096 |
- |
1097 |
-if [[ $PV == 9999 ]]; then |
1098 |
- SRC_URI="" |
1099 |
-else |
1100 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
1101 |
- 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" |
1102 |
-fi |
1103 |
- |
1104 |
-LICENSE="MIT" |
1105 |
-SLOT="0" |
1106 |
-RESTRICT="!bindist? ( bindist )" |
1107 |
- |
1108 |
-INTEL_CARDS="i915 i965 intel" |
1109 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
1110 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
1111 |
-for card in ${VIDEO_CARDS}; do |
1112 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
1113 |
-done |
1114 |
- |
1115 |
-IUSE="${IUSE_VIDEO_CARDS} |
1116 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm |
1117 |
- +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind vdpau |
1118 |
- vulkan wayland xvmc xa" |
1119 |
- |
1120 |
-REQUIRED_USE=" |
1121 |
- d3d9? ( dri3 gallium ) |
1122 |
- llvm? ( gallium ) |
1123 |
- opencl? ( gallium llvm ) |
1124 |
- openmax? ( gallium ) |
1125 |
- gles1? ( egl ) |
1126 |
- gles2? ( egl ) |
1127 |
- vaapi? ( gallium ) |
1128 |
- vdpau? ( gallium ) |
1129 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
1130 |
- video_cards_radeonsi? ( llvm ) ) |
1131 |
- wayland? ( egl gbm ) |
1132 |
- xa? ( gallium ) |
1133 |
- video_cards_freedreno? ( gallium ) |
1134 |
- video_cards_intel? ( classic ) |
1135 |
- video_cards_i915? ( || ( classic gallium ) ) |
1136 |
- video_cards_i965? ( classic ) |
1137 |
- video_cards_imx? ( gallium ) |
1138 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
1139 |
- video_cards_radeon? ( || ( classic gallium ) |
1140 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
1141 |
- video_cards_r100? ( classic ) |
1142 |
- video_cards_r200? ( classic ) |
1143 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
1144 |
- video_cards_r600? ( gallium ) |
1145 |
- video_cards_radeonsi? ( gallium llvm ) |
1146 |
- video_cards_vivante? ( gallium gbm ) |
1147 |
- video_cards_vmware? ( gallium ) |
1148 |
-" |
1149 |
- |
1150 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.74" |
1151 |
-# keep correct libdrm and dri2proto dep |
1152 |
-# keep blocks in rdepend for binpkg |
1153 |
-RDEPEND=" |
1154 |
- !<x11-base/xorg-server-1.7 |
1155 |
- !<=x11-proto/xf86driproto-2.0.3 |
1156 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
1157 |
- classic? ( app-eselect/eselect-mesa ) |
1158 |
- gallium? ( app-eselect/eselect-mesa ) |
1159 |
- >=app-eselect/eselect-opengl-1.3.0 |
1160 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
1161 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
1162 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
1163 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
1164 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
1165 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
1166 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
1167 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
1168 |
- llvm? ( |
1169 |
- video_cards_radeonsi? ( |
1170 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1171 |
- vulkan? ( |
1172 |
- || ( |
1173 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1174 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] ) ) |
1175 |
- ) |
1176 |
- video_cards_r600? ( |
1177 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1178 |
- ) |
1179 |
- video_cards_radeon? ( |
1180 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1181 |
- ) |
1182 |
- || ( |
1183 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1184 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
1185 |
- ) |
1186 |
- <sys-devel/llvm-5:=[${MULTILIB_USEDEP}] |
1187 |
- ) |
1188 |
- opencl? ( |
1189 |
- app-eselect/eselect-opencl |
1190 |
- dev-libs/libclc |
1191 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1192 |
- ) |
1193 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
1194 |
- vaapi? ( |
1195 |
- >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
1196 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
1197 |
- ) |
1198 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
1199 |
- wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] ) |
1200 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
1201 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
1202 |
-" |
1203 |
-for card in ${INTEL_CARDS}; do |
1204 |
- RDEPEND="${RDEPEND} |
1205 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1206 |
- " |
1207 |
-done |
1208 |
- |
1209 |
-for card in ${RADEON_CARDS}; do |
1210 |
- RDEPEND="${RDEPEND} |
1211 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
1212 |
- " |
1213 |
-done |
1214 |
-RDEPEND="${RDEPEND} |
1215 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
1216 |
-" |
1217 |
- |
1218 |
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
1219 |
-# LLVM < 3.9 is out of the game |
1220 |
-DEPEND="${RDEPEND} |
1221 |
- ${PYTHON_DEPS} |
1222 |
- llvm? ( |
1223 |
- video_cards_radeonsi? ( || ( |
1224 |
- sys-devel/llvm[llvm_targets_AMDGPU] |
1225 |
- sys-devel/llvm[video_cards_radeon] |
1226 |
- ) ) |
1227 |
- ) |
1228 |
- opencl? ( |
1229 |
- || ( |
1230 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1231 |
- >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
1232 |
- ) |
1233 |
- || ( |
1234 |
- sys-devel/clang:4[${MULTILIB_USEDEP}] |
1235 |
- >=sys-devel/clang-3.6.0:0[${MULTILIB_USEDEP}] |
1236 |
- ) |
1237 |
- >=sys-devel/gcc-4.6 |
1238 |
- ) |
1239 |
- sys-devel/gettext |
1240 |
- virtual/pkgconfig |
1241 |
- valgrind? ( dev-util/valgrind ) |
1242 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
1243 |
- dri3? ( |
1244 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
1245 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
1246 |
- ) |
1247 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
1248 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
1249 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
1250 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
1251 |
-" |
1252 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
1253 |
- sys-devel/bison |
1254 |
- sys-devel/flex |
1255 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1256 |
-" |
1257 |
- |
1258 |
-S="${WORKDIR}/${MY_P}" |
1259 |
-EGIT_CHECKOUT_DIR=${S} |
1260 |
- |
1261 |
-QA_WX_LOAD=" |
1262 |
-x86? ( |
1263 |
- !pic? ( |
1264 |
- usr/lib*/libglapi.so.0.0.0 |
1265 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
1266 |
- usr/lib*/libGLESv2.so.2.0.0 |
1267 |
- usr/lib*/libGL.so.1.2.0 |
1268 |
- usr/lib*/libOSMesa.so.8.0.0 |
1269 |
- ) |
1270 |
-)" |
1271 |
- |
1272 |
-pkg_setup() { |
1273 |
- # warning message for bug 459306 |
1274 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
1275 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
1276 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
1277 |
- fi |
1278 |
- |
1279 |
- if use llvm || use opencl; then |
1280 |
- LLVM_MAX_SLOT=4 llvm_pkg_setup |
1281 |
- fi |
1282 |
- python-any-r1_pkg_setup |
1283 |
-} |
1284 |
- |
1285 |
-src_prepare() { |
1286 |
- [[ ${PV} == 9999 ]] && eautoreconf |
1287 |
- |
1288 |
- eapply_user |
1289 |
-} |
1290 |
- |
1291 |
-multilib_src_configure() { |
1292 |
- local myconf |
1293 |
- |
1294 |
- if use classic; then |
1295 |
- # Configurable DRI drivers |
1296 |
- driver_enable swrast |
1297 |
- |
1298 |
- # Intel code |
1299 |
- driver_enable video_cards_i915 i915 |
1300 |
- driver_enable video_cards_i965 i965 |
1301 |
- if ! use video_cards_i915 && \ |
1302 |
- ! use video_cards_i965; then |
1303 |
- driver_enable video_cards_intel i915 i965 |
1304 |
- fi |
1305 |
- |
1306 |
- # Nouveau code |
1307 |
- driver_enable video_cards_nouveau nouveau |
1308 |
- |
1309 |
- # ATI code |
1310 |
- driver_enable video_cards_r100 radeon |
1311 |
- driver_enable video_cards_r200 r200 |
1312 |
- if ! use video_cards_r100 && \ |
1313 |
- ! use video_cards_r200; then |
1314 |
- driver_enable video_cards_radeon radeon r200 |
1315 |
- fi |
1316 |
- fi |
1317 |
- |
1318 |
- if use egl; then |
1319 |
- myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
1320 |
- fi |
1321 |
- |
1322 |
- if use gallium; then |
1323 |
- myconf+=" |
1324 |
- $(use_enable d3d9 nine) |
1325 |
- $(use_enable llvm gallium-llvm) |
1326 |
- $(use_enable openmax omx) |
1327 |
- $(use_enable vaapi va) |
1328 |
- $(use_enable vdpau) |
1329 |
- $(use_enable xa) |
1330 |
- $(use_enable xvmc) |
1331 |
- " |
1332 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
1333 |
- |
1334 |
- gallium_enable swrast |
1335 |
- gallium_enable video_cards_vc4 vc4 |
1336 |
- gallium_enable video_cards_vivante etnaviv |
1337 |
- gallium_enable video_cards_vmware svga |
1338 |
- gallium_enable video_cards_nouveau nouveau |
1339 |
- gallium_enable video_cards_i915 i915 |
1340 |
- gallium_enable video_cards_imx imx |
1341 |
- if ! use video_cards_i915 && \ |
1342 |
- ! use video_cards_i965; then |
1343 |
- gallium_enable video_cards_intel i915 |
1344 |
- fi |
1345 |
- |
1346 |
- gallium_enable video_cards_r300 r300 |
1347 |
- gallium_enable video_cards_r600 r600 |
1348 |
- gallium_enable video_cards_radeonsi radeonsi |
1349 |
- if ! use video_cards_r300 && \ |
1350 |
- ! use video_cards_r600; then |
1351 |
- gallium_enable video_cards_radeon r300 r600 |
1352 |
- fi |
1353 |
- |
1354 |
- gallium_enable video_cards_freedreno freedreno |
1355 |
- # opencl stuff |
1356 |
- if use opencl; then |
1357 |
- myconf+=" |
1358 |
- $(use_enable opencl) |
1359 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
1360 |
- " |
1361 |
- fi |
1362 |
- fi |
1363 |
- |
1364 |
- if use vulkan; then |
1365 |
- vulkan_enable video_cards_i965 intel |
1366 |
- vulkan_enable video_cards_radeonsi radeon |
1367 |
- fi |
1368 |
- |
1369 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
1370 |
- if [[ ${ABI} == x86 ]]; then |
1371 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
1372 |
- fi |
1373 |
- |
1374 |
- # on abi_x86_32 hardened we need to have asm disable |
1375 |
- if [[ ${ABI} == x86* ]] && use pic; then |
1376 |
- myconf+=" --disable-asm" |
1377 |
- fi |
1378 |
- |
1379 |
- if use gallium; then |
1380 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
1381 |
- else |
1382 |
- myconf+=" $(use_enable osmesa)" |
1383 |
- fi |
1384 |
- |
1385 |
- # build fails with BSD indent, bug #428112 |
1386 |
- use userland_GNU || export INDENT=cat |
1387 |
- |
1388 |
- ECONF_SOURCE="${S}" \ |
1389 |
- econf \ |
1390 |
- --enable-dri \ |
1391 |
- --enable-glx \ |
1392 |
- --enable-shared-glapi \ |
1393 |
- $(use_enable !bindist texture-float) \ |
1394 |
- $(use_enable d3d9 nine) \ |
1395 |
- $(use_enable debug) \ |
1396 |
- $(use_enable dri3) \ |
1397 |
- $(use_enable egl) \ |
1398 |
- $(use_enable gbm) \ |
1399 |
- $(use_enable gles1) \ |
1400 |
- $(use_enable gles2) \ |
1401 |
- $(use_enable nptl glx-tls) \ |
1402 |
- --enable-valgrind=$(usex valgrind auto no) \ |
1403 |
- --enable-llvm-shared-libs \ |
1404 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
1405 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
1406 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
1407 |
- PYTHON2="${PYTHON}" \ |
1408 |
- ${myconf} |
1409 |
-} |
1410 |
- |
1411 |
-multilib_src_install() { |
1412 |
- emake install DESTDIR="${D}" |
1413 |
- |
1414 |
- if use classic || use gallium; then |
1415 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
1416 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
1417 |
- keepdir /usr/$(get_libdir)/dri |
1418 |
- dodir /usr/$(get_libdir)/mesa |
1419 |
- for x in ${gallium_drivers[@]}; do |
1420 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
1421 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
1422 |
- || die "Failed to move ${x}" |
1423 |
- fi |
1424 |
- done |
1425 |
- if use classic; then |
1426 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
1427 |
- fi |
1428 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
1429 |
- if [ -f ${x} -o -L ${x} ]; then |
1430 |
- mv -f "${x}" "${x/dri/mesa}" \ |
1431 |
- || die "Failed to move ${x}" |
1432 |
- fi |
1433 |
- done |
1434 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
1435 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
1436 |
- # remove symlinks to drivers known to eselect |
1437 |
- for x in ${gallium_drivers[@]}; do |
1438 |
- if [ -f ${x} -o -L ${x} ]; then |
1439 |
- rm "${x}" || die "Failed to remove ${x}" |
1440 |
- fi |
1441 |
- done |
1442 |
- popd |
1443 |
- eend $? |
1444 |
- fi |
1445 |
- if use opencl; then |
1446 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
1447 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
1448 |
- dodir ${cl_dir}/{lib,include} |
1449 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
1450 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
1451 |
- "${ED}"${cl_dir} |
1452 |
- fi |
1453 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
1454 |
- mv -f "${ED}"/usr/include/CL \ |
1455 |
- "${ED}"${cl_dir}/include |
1456 |
- fi |
1457 |
- eend $? |
1458 |
- fi |
1459 |
- |
1460 |
- if use openmax; then |
1461 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
1462 |
- doenvd "${T}"/99mesaxdgomx |
1463 |
- keepdir /usr/share/mesa/xdg |
1464 |
- fi |
1465 |
-} |
1466 |
- |
1467 |
-multilib_src_install_all() { |
1468 |
- find "${ED}" -name '*.la' -delete |
1469 |
- einstalldocs |
1470 |
- |
1471 |
- if use !bindist; then |
1472 |
- dodoc docs/patents.txt |
1473 |
- fi |
1474 |
- |
1475 |
- # Install config file for eselect mesa |
1476 |
- insinto /usr/share/mesa |
1477 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
1478 |
-} |
1479 |
- |
1480 |
-multilib_src_test() { |
1481 |
- if use llvm; then |
1482 |
- 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' |
1483 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
1484 |
- emake ${llvm_tests} |
1485 |
- pax-mark m ${llvm_tests} |
1486 |
- popd >/dev/null || die |
1487 |
- fi |
1488 |
- emake check |
1489 |
-} |
1490 |
- |
1491 |
-pkg_postinst() { |
1492 |
- # Switch to the xorg implementation. |
1493 |
- echo |
1494 |
- eselect opengl set --use-old ${OPENGL_DIR} |
1495 |
- |
1496 |
- # Select classic/gallium drivers |
1497 |
- if use classic || use gallium; then |
1498 |
- eselect mesa set --auto |
1499 |
- fi |
1500 |
- |
1501 |
- # Switch to mesa opencl |
1502 |
- if use opencl; then |
1503 |
- eselect opencl set --use-old ${PN} |
1504 |
- fi |
1505 |
- |
1506 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
1507 |
- if use openmax; then |
1508 |
- ebegin "Registering OpenMAX drivers" |
1509 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
1510 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
1511 |
- omxregister-bellagio |
1512 |
- eend $? |
1513 |
- fi |
1514 |
- |
1515 |
- # warn about patent encumbered texture-float |
1516 |
- if use !bindist; then |
1517 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
1518 |
- elog "enabled. Please see patents.txt for an explanation." |
1519 |
- fi |
1520 |
- |
1521 |
- if ! has_version media-libs/libtxc_dxtn; then |
1522 |
- elog "Note that in order to have full S3TC support, it is necessary to install" |
1523 |
- elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
1524 |
- elog "textures in some apps, and some others even require this to run." |
1525 |
- fi |
1526 |
-} |
1527 |
- |
1528 |
-pkg_prerm() { |
1529 |
- if use openmax; then |
1530 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1531 |
- fi |
1532 |
-} |
1533 |
- |
1534 |
-# $1 - VIDEO_CARDS flag |
1535 |
-# other args - names of DRI drivers to enable |
1536 |
-# TODO: avoid code duplication for a more elegant implementation |
1537 |
-driver_enable() { |
1538 |
- case $# in |
1539 |
- # for enabling unconditionally |
1540 |
- 1) |
1541 |
- DRI_DRIVERS+=",$1" |
1542 |
- ;; |
1543 |
- *) |
1544 |
- if use $1; then |
1545 |
- shift |
1546 |
- for i in $@; do |
1547 |
- DRI_DRIVERS+=",${i}" |
1548 |
- done |
1549 |
- fi |
1550 |
- ;; |
1551 |
- esac |
1552 |
-} |
1553 |
- |
1554 |
-gallium_enable() { |
1555 |
- case $# in |
1556 |
- # for enabling unconditionally |
1557 |
- 1) |
1558 |
- GALLIUM_DRIVERS+=",$1" |
1559 |
- ;; |
1560 |
- *) |
1561 |
- if use $1; then |
1562 |
- shift |
1563 |
- for i in $@; do |
1564 |
- GALLIUM_DRIVERS+=",${i}" |
1565 |
- done |
1566 |
- fi |
1567 |
- ;; |
1568 |
- esac |
1569 |
-} |
1570 |
- |
1571 |
-vulkan_enable() { |
1572 |
- case $# in |
1573 |
- # for enabling unconditionally |
1574 |
- 1) |
1575 |
- VULKAN_DRIVERS+=",$1" |
1576 |
- ;; |
1577 |
- *) |
1578 |
- if use $1; then |
1579 |
- shift |
1580 |
- for i in $@; do |
1581 |
- VULKAN_DRIVERS+=",${i}" |
1582 |
- done |
1583 |
- fi |
1584 |
- ;; |
1585 |
- esac |
1586 |
-} |