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