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