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