1 |
commit: 0729904c2d185e137b893f189b358a92b43effdd |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 31 18:13:23 2015 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 31 18:13:23 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0729904c |
7 |
|
8 |
media-libs/mesa: Version bump |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
media-libs/mesa/Manifest | 4 +- |
13 |
media-libs/mesa/mesa-11.0.0_rc2.ebuild | 463 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 464 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
17 |
index c8dc8b5..e268a17 100644 |
18 |
--- a/media-libs/mesa/Manifest |
19 |
+++ b/media-libs/mesa/Manifest |
20 |
@@ -3,9 +3,7 @@ DIST MesaLib-10.3.7.tar.bz2 7287153 SHA256 43c6ced15e237cbb21b3082d7c0b42777c50c |
21 |
DIST MesaLib-10.4.6.tar.bz2 7520024 SHA256 d8baedd20e79ccd98a5a7b05e23d59a30892e68de1fcc057ca6873dafca02735 SHA512 1a379de8471f9154aa1348c15d24a56788e42b666094d63aa5dc8bffd1ed87c1ab50fb95adac010a92d832be4ec1be60b712179ad1ec99869ee653ccb576f50e WHIRLPOOL 45ff4f46a9c165c2cd3f49696f9d972216fdbc27051287d4eea4210f25631fb1faca517a714cc50229c463be1628dfbf71ba689d02ed3b3d52bfc71683fe667e |
22 |
DIST MesaLib-7.10.3.tar.bz2 6056837 SHA256 1e701fc839b872677ddca9ed8784d754c9da1fbeda98173980e06aa7df0e85c0 SHA512 aa1f5f068b305fae5519e11cad2db9c6dc647d3122252bbcb210f13ac6ef1b667ae750344898bca7c5bfae94934db05eff915cb7417a59590e6d3ba230817aa8 WHIRLPOOL 5c2adda647936ed4163a4e4d5afad8344eb576712f9432f697aa0fc22ca17d7aaf0aeb6ad2d4e7e0825dc27cae570660332450778f8091e9b27aad2865c9b5fc |
23 |
DIST mesa-10.5.8.tar.xz 6993084 SHA256 2866b855c5299a4aed066338c77ff6467c389b2c30ada7647be8758663da2b54 SHA512 d7fc441b4cdad8a2905f03091af26ca7b01573bf4d0d928e950270981e4c6e7d20dba6aa97a60500b9a335a3c5cabc7f388a5338d43d391eed3f09dea60b77b2 WHIRLPOOL 68cc3d8490da9759b9d790053c70429be4c529c63b114f65f411112f76cd4daccc3490120a85a84d01cdcb989c0a0e58016b4d80f2238f2320b1caff797f3390 |
24 |
-DIST mesa-10.6.1.tar.xz 7035216 SHA256 6c80a2b647e57c85dc36e609d9aed17f878f0d8e0cf9ace86d14cf604101e1eb SHA512 7ba5f4a7e421e6f198c4e80c1f0259071e1115aecdbe2846a7986bcfe1503a6f4a1806126295e3d9f4b6aee63dd107e82c3972ccb8079b9b5baf1f65246d21ab WHIRLPOOL 1e72a397e30e0f02afc18d864aea004f13cc95a925b66538ac1e368dea9f4737168dcf6b6af715ae04331b0626b3bda7aa2affae95575c56edbeaf0177bc3117 |
25 |
-DIST mesa-10.6.2.tar.xz 7033344 SHA256 05753d3db4212900927b9894221a1669a10f56786e86a7e818b6e18a0817dca9 SHA512 feaca60b7cc8310a613bd89d0008fb7807de403ce6782e0e62e47ecba040d3728602778f47c704751cb49f8e2d950de03153b84b66d28203e29a70987b96340b WHIRLPOOL 8b148e7bb36fdcc7c25bb02561489b796f01f82bc74ce1d927987eeeaed5f602647d435c046142f5384aa4fb0369bb4a288281b51a03be712b4af8ed7111bf23 |
26 |
-DIST mesa-10.6.3.tar.xz 7036480 SHA256 58592e07c350cd2e8969b73fa83048c657a39fe2f13f3b88f5e5818fe2e4676d SHA512 4474e089c0b618d0b0469e31c213d84530f9dd22d4280612f34370578a7e7dfdfd1ac499feae470f032e462f5d7532aafa4416a7dd97d0cd6d9332aec5b44446 WHIRLPOOL 13f44d38e34b6b03919393918a65d2f47ef20de2b31a27ffb3b74c969414d40b01840652829a749924aa3ae548f2cf0abce8c830bcad6a4365ceedd4908e06cb |
27 |
DIST mesa-10.6.5.tar.xz 7037400 SHA256 fb6fac3c85bcfa9d06b8dd439169f23f0c0924a88e44362e738b99b1feff762f SHA512 46be6bd683d286bdf9ab8b4c1b1b32f89c95701b8c48cee49b060f5beaacea4540a69b99b4fde0f80acdd8e725552bef17dbd4251b9e977caeb5fd9d0ba56595 WHIRLPOOL dee48a0c680aae01cc39dc9157ea7c4c353b7ffdf543ab1cde8e76612a462ff3e3cb33433abff6d88f6800b71a02cd8cfcc23be98218d3cc4f85f424f3d12474 |
28 |
DIST mesa-11.0.0-rc1.tar.xz 7250800 SHA256 4a61c15c5ba9bb2ed6c6d5d622363ac4149bd903966fa3c346ba6f06b05e0767 SHA512 203af66bf71a7a59d8bbcec9e6a8b3d75666361ffd8e74bc236e8378d628c1dcfeccde3830d56b344274e30ca920243a5fe6cc55d398856632644cac9add0af3 WHIRLPOOL c244003c071601dd997e18993b5ba27c6896c8332b18b0711c343de34e080643d53bfec54a09e62dbd409f0faadf70ba4ce3026e36017736f9a119d768b40baf |
29 |
+DIST mesa-11.0.0-rc2.tar.xz 7251904 SHA256 e45008b21cc9919c5d4f7c83d69dd15a2f247f8a299be45a0370ed0d26304341 SHA512 781ff9db9be53713793c8e74cc8aed6bfa85db20d3f3684ed0c418c5f31e12379f0818d7b47ad6bdf46267de7ea0202b6df6030a22822cdd0563ae3b18475c4c WHIRLPOOL ea9611eee073dd6e4eab497a37d7ab3ff0f9137f2200f6c7b7bc654baf599af3c3d7af708e5227edb1f47f10dc063024c4db1d27b78e28ed75fd73f61a8ac876 |
30 |
DIST mesa-7.10.1-gentoo-patches-01.tar.bz2 5488 SHA256 31cd4f6d1a0a70249c40452919074856d120cd473a01a8457e3dc147a1b622d8 SHA512 c62b45b32e396e67f629003fc5242b7b4df054b8e20b5237489212bc4f0171534915a02fc9efa68965068121d10660b5cd92a419efabe33fd4596a97a39249c2 WHIRLPOOL 5f171959e3a31f5c38438b4806ce371bb8fdf1c7a87501865e4ed5d5ab284cda9568b7773005997d7a1cff151f95e64c027b36c0be48a4dd288a7ab8b5f69b97 |
31 |
|
32 |
diff --git a/media-libs/mesa/mesa-11.0.0_rc2.ebuild b/media-libs/mesa/mesa-11.0.0_rc2.ebuild |
33 |
new file mode 100644 |
34 |
index 0000000..73f53c5 |
35 |
--- /dev/null |
36 |
+++ b/media-libs/mesa/mesa-11.0.0_rc2.ebuild |
37 |
@@ -0,0 +1,463 @@ |
38 |
+# Copyright 1999-2015 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+# $Id$ |
41 |
+ |
42 |
+EAPI=5 |
43 |
+ |
44 |
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
45 |
+ |
46 |
+if [[ ${PV} = 9999* ]]; then |
47 |
+ GIT_ECLASS="git-r3" |
48 |
+ EXPERIMENTAL="true" |
49 |
+fi |
50 |
+ |
51 |
+PYTHON_COMPAT=( python2_7 ) |
52 |
+ |
53 |
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
54 |
+ |
55 |
+OPENGL_DIR="xorg-x11" |
56 |
+ |
57 |
+MY_P="${P/_/-}" |
58 |
+FOLDER="${PV/_rc*/}" |
59 |
+ |
60 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
61 |
+HOMEPAGE="http://mesa3d.sourceforge.net/" |
62 |
+ |
63 |
+if [[ $PV == 9999* ]]; then |
64 |
+ SRC_URI="" |
65 |
+else |
66 |
+ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz" |
67 |
+fi |
68 |
+ |
69 |
+LICENSE="MIT" |
70 |
+SLOT="0" |
71 |
+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" |
72 |
+RESTRICT="!bindist? ( bindist )" |
73 |
+ |
74 |
+INTEL_CARDS="i915 i965 ilo intel" |
75 |
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
76 |
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware" |
77 |
+for card in ${VIDEO_CARDS}; do |
78 |
+ IUSE_VIDEO_CARDS+=" video_cards_${card}" |
79 |
+done |
80 |
+ |
81 |
+IUSE="${IUSE_VIDEO_CARDS} |
82 |
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm |
83 |
+ +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau |
84 |
+ wayland xvmc xa kernel_FreeBSD" |
85 |
+ |
86 |
+REQUIRED_USE=" |
87 |
+ d3d9? ( dri3 gallium ) |
88 |
+ llvm? ( gallium ) |
89 |
+ opencl? ( gallium llvm ) |
90 |
+ openmax? ( gallium ) |
91 |
+ gles1? ( egl ) |
92 |
+ gles2? ( egl ) |
93 |
+ vaapi? ( gallium ) |
94 |
+ vdpau? ( gallium ) |
95 |
+ wayland? ( egl gbm ) |
96 |
+ xa? ( gallium ) |
97 |
+ video_cards_freedreno? ( gallium ) |
98 |
+ video_cards_intel? ( classic ) |
99 |
+ video_cards_i915? ( || ( classic gallium ) ) |
100 |
+ video_cards_i965? ( classic ) |
101 |
+ video_cards_ilo? ( gallium ) |
102 |
+ video_cards_nouveau? ( || ( classic gallium ) ) |
103 |
+ video_cards_radeon? ( || ( classic gallium ) ) |
104 |
+ video_cards_r100? ( classic ) |
105 |
+ video_cards_r200? ( classic ) |
106 |
+ video_cards_r300? ( gallium llvm ) |
107 |
+ video_cards_r600? ( gallium ) |
108 |
+ video_cards_radeonsi? ( gallium llvm ) |
109 |
+ video_cards_vmware? ( gallium ) |
110 |
+ ${PYTHON_REQUIRED_USE} |
111 |
+" |
112 |
+ |
113 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.64" |
114 |
+# keep correct libdrm and dri2proto dep |
115 |
+# keep blocks in rdepend for binpkg |
116 |
+RDEPEND=" |
117 |
+ !<x11-base/xorg-server-1.7 |
118 |
+ !<=x11-proto/xf86driproto-2.0.3 |
119 |
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
120 |
+ classic? ( app-eselect/eselect-mesa ) |
121 |
+ gallium? ( app-eselect/eselect-mesa ) |
122 |
+ >=app-eselect/eselect-opengl-1.3.0 |
123 |
+ udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) ) |
124 |
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
125 |
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) |
126 |
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) |
127 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
128 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
129 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
130 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
131 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
132 |
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
133 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
134 |
+ llvm? ( |
135 |
+ video_cards_radeonsi? ( || ( |
136 |
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
137 |
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
138 |
+ ) ) |
139 |
+ !video_cards_r600? ( |
140 |
+ video_cards_radeon? ( || ( |
141 |
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
142 |
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
143 |
+ ) ) |
144 |
+ ) |
145 |
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] |
146 |
+ ) |
147 |
+ opencl? ( |
148 |
+ app-eselect/eselect-opencl |
149 |
+ dev-libs/libclc |
150 |
+ || ( |
151 |
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
152 |
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
153 |
+ ) |
154 |
+ ) |
155 |
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
156 |
+ vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] ) |
157 |
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
158 |
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] ) |
159 |
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
160 |
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}] |
161 |
+" |
162 |
+for card in ${INTEL_CARDS}; do |
163 |
+ RDEPEND="${RDEPEND} |
164 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
165 |
+ " |
166 |
+done |
167 |
+ |
168 |
+for card in ${RADEON_CARDS}; do |
169 |
+ RDEPEND="${RDEPEND} |
170 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
171 |
+ " |
172 |
+done |
173 |
+ |
174 |
+DEPEND="${RDEPEND} |
175 |
+ llvm? ( |
176 |
+ video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] ) |
177 |
+ ) |
178 |
+ opencl? ( |
179 |
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] |
180 |
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}] |
181 |
+ >=sys-devel/gcc-4.6 |
182 |
+ ) |
183 |
+ sys-devel/gettext |
184 |
+ virtual/pkgconfig |
185 |
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
186 |
+ dri3? ( |
187 |
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
188 |
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
189 |
+ ) |
190 |
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
191 |
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
192 |
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
193 |
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
194 |
+" |
195 |
+[[ ${PV} == "9999" ]] && DEPEND+=" |
196 |
+ sys-devel/bison |
197 |
+ sys-devel/flex |
198 |
+ ${PYTHON_DEPS} |
199 |
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
200 |
+" |
201 |
+ |
202 |
+S="${WORKDIR}/${MY_P}" |
203 |
+EGIT_CHECKOUT_DIR=${S} |
204 |
+ |
205 |
+QA_WX_LOAD=" |
206 |
+x86? ( |
207 |
+ !pic? ( |
208 |
+ usr/lib*/libglapi.so.0.0.0 |
209 |
+ usr/lib*/libGLESv1_CM.so.1.1.0 |
210 |
+ usr/lib*/libGLESv2.so.2.0.0 |
211 |
+ usr/lib*/libGL.so.1.2.0 |
212 |
+ usr/lib*/libOSMesa.so.8.0.0 |
213 |
+ ) |
214 |
+)" |
215 |
+ |
216 |
+pkg_setup() { |
217 |
+ # warning message for bug 459306 |
218 |
+ if use llvm && has_version sys-devel/llvm[!debug=]; then |
219 |
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
220 |
+ ewarn "detected! This can cause problems. For details, see bug 459306." |
221 |
+ fi |
222 |
+ |
223 |
+ python-any-r1_pkg_setup |
224 |
+} |
225 |
+ |
226 |
+src_prepare() { |
227 |
+ # fix for hardened pax_kernel, bug 240956 |
228 |
+ [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
229 |
+ |
230 |
+ eautoreconf |
231 |
+} |
232 |
+ |
233 |
+multilib_src_configure() { |
234 |
+ local myconf |
235 |
+ |
236 |
+ if use classic; then |
237 |
+ # Configurable DRI drivers |
238 |
+ driver_enable swrast |
239 |
+ |
240 |
+ # Intel code |
241 |
+ driver_enable video_cards_i915 i915 |
242 |
+ driver_enable video_cards_i965 i965 |
243 |
+ if ! use video_cards_i915 && \ |
244 |
+ ! use video_cards_i965; then |
245 |
+ driver_enable video_cards_intel i915 i965 |
246 |
+ fi |
247 |
+ |
248 |
+ # Nouveau code |
249 |
+ driver_enable video_cards_nouveau nouveau |
250 |
+ |
251 |
+ # ATI code |
252 |
+ driver_enable video_cards_r100 radeon |
253 |
+ driver_enable video_cards_r200 r200 |
254 |
+ if ! use video_cards_r100 && \ |
255 |
+ ! use video_cards_r200; then |
256 |
+ driver_enable video_cards_radeon radeon r200 |
257 |
+ fi |
258 |
+ fi |
259 |
+ |
260 |
+ if use egl; then |
261 |
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") " |
262 |
+ fi |
263 |
+ |
264 |
+ if use gallium; then |
265 |
+ myconf+=" |
266 |
+ $(use_enable d3d9 nine) |
267 |
+ $(use_enable llvm gallium-llvm) |
268 |
+ $(use_enable openmax omx) |
269 |
+ $(use_enable vaapi va) |
270 |
+ $(use_enable vdpau) |
271 |
+ $(use_enable xa) |
272 |
+ $(use_enable xvmc) |
273 |
+ " |
274 |
+ use vaapi && myconf+="--with-va-libdir=/usr/$(get_libdir)/va/drivers" |
275 |
+ |
276 |
+ gallium_enable swrast |
277 |
+ gallium_enable video_cards_vmware svga |
278 |
+ gallium_enable video_cards_nouveau nouveau |
279 |
+ gallium_enable video_cards_i915 i915 |
280 |
+ gallium_enable video_cards_ilo ilo |
281 |
+ if ! use video_cards_i915 && \ |
282 |
+ ! use video_cards_i965; then |
283 |
+ gallium_enable video_cards_intel i915 |
284 |
+ fi |
285 |
+ |
286 |
+ gallium_enable video_cards_r300 r300 |
287 |
+ gallium_enable video_cards_r600 r600 |
288 |
+ gallium_enable video_cards_radeonsi radeonsi |
289 |
+ if ! use video_cards_r300 && \ |
290 |
+ ! use video_cards_r600; then |
291 |
+ gallium_enable video_cards_radeon r300 r600 |
292 |
+ fi |
293 |
+ |
294 |
+ gallium_enable video_cards_freedreno freedreno |
295 |
+ # opencl stuff |
296 |
+ if use opencl; then |
297 |
+ myconf+=" |
298 |
+ $(use_enable opencl) |
299 |
+ --with-clang-libdir="${EPREFIX}/usr/lib" |
300 |
+ " |
301 |
+ fi |
302 |
+ fi |
303 |
+ |
304 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
305 |
+ if use pax_kernel; then |
306 |
+ myconf+=" |
307 |
+ $(use_enable x86 glx-rts) |
308 |
+ " |
309 |
+ fi |
310 |
+ |
311 |
+ # on abi_x86_32 hardened we need to have asm disable |
312 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
313 |
+ myconf+=" --disable-asm" |
314 |
+ fi |
315 |
+ |
316 |
+ # build fails with BSD indent, bug #428112 |
317 |
+ use userland_GNU || export INDENT=cat |
318 |
+ |
319 |
+ ECONF_SOURCE="${S}" \ |
320 |
+ econf \ |
321 |
+ --enable-dri \ |
322 |
+ --enable-glx \ |
323 |
+ --enable-shared-glapi \ |
324 |
+ $(use_enable !bindist texture-float) \ |
325 |
+ $(use_enable d3d9 nine) \ |
326 |
+ $(use_enable debug) \ |
327 |
+ $(use_enable dri3) \ |
328 |
+ $(use_enable egl) \ |
329 |
+ $(use_enable gbm) \ |
330 |
+ $(use_enable gles1) \ |
331 |
+ $(use_enable gles2) \ |
332 |
+ $(use_enable nptl glx-tls) \ |
333 |
+ $(use_enable osmesa) \ |
334 |
+ $(use_enable !udev sysfs) \ |
335 |
+ --enable-llvm-shared-libs \ |
336 |
+ --with-dri-drivers=${DRI_DRIVERS} \ |
337 |
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
338 |
+ PYTHON2="${PYTHON}" \ |
339 |
+ ${myconf} |
340 |
+} |
341 |
+ |
342 |
+multilib_src_install() { |
343 |
+ emake install DESTDIR="${D}" |
344 |
+ |
345 |
+ if use classic || use gallium; then |
346 |
+ ebegin "Moving DRI/Gallium drivers for dynamic switching" |
347 |
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
348 |
+ keepdir /usr/$(get_libdir)/dri |
349 |
+ dodir /usr/$(get_libdir)/mesa |
350 |
+ for x in ${gallium_drivers[@]}; do |
351 |
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then |
352 |
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
353 |
+ || die "Failed to move ${x}" |
354 |
+ fi |
355 |
+ done |
356 |
+ if use classic; then |
357 |
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
358 |
+ fi |
359 |
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
360 |
+ if [ -f ${x} -o -L ${x} ]; then |
361 |
+ mv -f "${x}" "${x/dri/mesa}" \ |
362 |
+ || die "Failed to move ${x}" |
363 |
+ fi |
364 |
+ done |
365 |
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
366 |
+ ln -s ../mesa/*.so . || die "Creating symlink failed" |
367 |
+ # remove symlinks to drivers known to eselect |
368 |
+ for x in ${gallium_drivers[@]}; do |
369 |
+ if [ -f ${x} -o -L ${x} ]; then |
370 |
+ rm "${x}" || die "Failed to remove ${x}" |
371 |
+ fi |
372 |
+ done |
373 |
+ popd |
374 |
+ eend $? |
375 |
+ fi |
376 |
+ if use opencl; then |
377 |
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
378 |
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
379 |
+ dodir ${cl_dir}/{lib,include} |
380 |
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
381 |
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
382 |
+ "${ED}"${cl_dir} |
383 |
+ fi |
384 |
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
385 |
+ mv -f "${ED}"/usr/include/CL \ |
386 |
+ "${ED}"${cl_dir}/include |
387 |
+ fi |
388 |
+ eend $? |
389 |
+ fi |
390 |
+ |
391 |
+ if use openmax; then |
392 |
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
393 |
+ doenvd "${T}"/99mesaxdgomx |
394 |
+ keepdir /usr/share/mesa/xdg |
395 |
+ fi |
396 |
+} |
397 |
+ |
398 |
+multilib_src_install_all() { |
399 |
+ prune_libtool_files --all |
400 |
+ einstalldocs |
401 |
+ |
402 |
+ if use !bindist; then |
403 |
+ dodoc docs/patents.txt |
404 |
+ fi |
405 |
+ |
406 |
+ # Install config file for eselect mesa |
407 |
+ insinto /usr/share/mesa |
408 |
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
409 |
+} |
410 |
+ |
411 |
+multilib_src_test() { |
412 |
+ if use llvm; then |
413 |
+ 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' |
414 |
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die |
415 |
+ emake ${llvm_tests} |
416 |
+ pax-mark m ${llvm_tests} |
417 |
+ popd >/dev/null || die |
418 |
+ fi |
419 |
+ emake check |
420 |
+} |
421 |
+ |
422 |
+pkg_postinst() { |
423 |
+ # Switch to the xorg implementation. |
424 |
+ echo |
425 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
426 |
+ |
427 |
+ # Select classic/gallium drivers |
428 |
+ if use classic || use gallium; then |
429 |
+ eselect mesa set --auto |
430 |
+ fi |
431 |
+ |
432 |
+ # Switch to mesa opencl |
433 |
+ if use opencl; then |
434 |
+ eselect opencl set --use-old ${PN} |
435 |
+ fi |
436 |
+ |
437 |
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
438 |
+ if use openmax; then |
439 |
+ ebegin "Registering OpenMAX drivers" |
440 |
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
441 |
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
442 |
+ omxregister-bellagio |
443 |
+ eend $? |
444 |
+ fi |
445 |
+ |
446 |
+ # warn about patent encumbered texture-float |
447 |
+ if use !bindist; then |
448 |
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
449 |
+ elog "enabled. Please see patents.txt for an explanation." |
450 |
+ fi |
451 |
+ |
452 |
+ if ! has_version media-libs/libtxc_dxtn; then |
453 |
+ elog "Note that in order to have full S3TC support, it is necessary to install" |
454 |
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
455 |
+ elog "textures in some apps, and some others even require this to run." |
456 |
+ fi |
457 |
+} |
458 |
+ |
459 |
+pkg_prerm() { |
460 |
+ if use openmax; then |
461 |
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
462 |
+ fi |
463 |
+} |
464 |
+ |
465 |
+# $1 - VIDEO_CARDS flag |
466 |
+# other args - names of DRI drivers to enable |
467 |
+# TODO: avoid code duplication for a more elegant implementation |
468 |
+driver_enable() { |
469 |
+ case $# in |
470 |
+ # for enabling unconditionally |
471 |
+ 1) |
472 |
+ DRI_DRIVERS+=",$1" |
473 |
+ ;; |
474 |
+ *) |
475 |
+ if use $1; then |
476 |
+ shift |
477 |
+ for i in $@; do |
478 |
+ DRI_DRIVERS+=",${i}" |
479 |
+ done |
480 |
+ fi |
481 |
+ ;; |
482 |
+ esac |
483 |
+} |
484 |
+ |
485 |
+gallium_enable() { |
486 |
+ case $# in |
487 |
+ # for enabling unconditionally |
488 |
+ 1) |
489 |
+ GALLIUM_DRIVERS+=",$1" |
490 |
+ ;; |
491 |
+ *) |
492 |
+ if use $1; then |
493 |
+ shift |
494 |
+ for i in $@; do |
495 |
+ GALLIUM_DRIVERS+=",${i}" |
496 |
+ done |
497 |
+ fi |
498 |
+ ;; |
499 |
+ esac |
500 |
+} |