1 |
mattst88 15/02/03 21:43:26 |
2 |
|
3 |
Modified: mesa-10.3.7.ebuild ChangeLog |
4 |
Added: mesa-10.4.3.ebuild |
5 |
Log: |
6 |
Version bump to 10.4.3. Fix bugs 536916 and 538086. |
7 |
|
8 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 974CA72A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.2 media-libs/mesa/mesa-10.3.7.ebuild |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.3.7.ebuild?rev=1.2&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.3.7.ebuild?rev=1.2&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.3.7.ebuild?r1=1.1&r2=1.2 |
16 |
|
17 |
Index: mesa-10.3.7.ebuild |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.3.7.ebuild,v |
20 |
retrieving revision 1.1 |
21 |
retrieving revision 1.2 |
22 |
diff -u -r1.1 -r1.2 |
23 |
--- mesa-10.3.7.ebuild 12 Jan 2015 18:30:27 -0000 1.1 |
24 |
+++ mesa-10.3.7.ebuild 3 Feb 2015 21:43:26 -0000 1.2 |
25 |
@@ -1,6 +1,6 @@ |
26 |
# Copyright 1999-2015 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.3.7.ebuild,v 1.1 2015/01/12 18:30:27 mattst88 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.3.7.ebuild,v 1.2 2015/02/03 21:43:26 mattst88 Exp $ |
30 |
|
31 |
EAPI=5 |
32 |
|
33 |
@@ -206,6 +206,8 @@ |
34 |
epatch |
35 |
fi |
36 |
|
37 |
+ epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch |
38 |
+ |
39 |
# relax the requirement that r300 must have llvm, bug 380303 |
40 |
epatch "${FILESDIR}"/${PN}-10.2-dont-require-llvm-for-r300.patch |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.598 media-libs/mesa/ChangeLog |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.598&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.598&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.597&r2=1.598 |
50 |
|
51 |
Index: ChangeLog |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v |
54 |
retrieving revision 1.597 |
55 |
retrieving revision 1.598 |
56 |
diff -u -r1.597 -r1.598 |
57 |
--- ChangeLog 13 Jan 2015 22:49:58 -0000 1.597 |
58 |
+++ ChangeLog 3 Feb 2015 21:43:26 -0000 1.598 |
59 |
@@ -1,6 +1,13 @@ |
60 |
# ChangeLog for media-libs/mesa |
61 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
62 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.597 2015/01/13 22:49:58 mattst88 Exp $ |
63 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.598 2015/02/03 21:43:26 mattst88 Exp $ |
64 |
+ |
65 |
+*mesa-10.4.3 (03 Feb 2015) |
66 |
+ |
67 |
+ 03 Feb 2015; Matt Turner <mattst88@g.o> |
68 |
+ +files/mesa-10.3.7-dont-use-clrsb.patch, +mesa-10.4.3.ebuild, |
69 |
+ mesa-10.3.7.ebuild: |
70 |
+ Version bump to 10.4.3. Fix bugs 536916 and 538086. |
71 |
|
72 |
13 Jan 2015; Matt Turner <mattst88@g.o> mesa-10.4.2.ebuild: |
73 |
Drop usage of --with-opencl-libdir, bug 536458. |
74 |
|
75 |
|
76 |
|
77 |
1.1 media-libs/mesa/mesa-10.4.3.ebuild |
78 |
|
79 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.4.3.ebuild?rev=1.1&view=markup |
80 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.4.3.ebuild?rev=1.1&content-type=text/plain |
81 |
|
82 |
Index: mesa-10.4.3.ebuild |
83 |
=================================================================== |
84 |
# Copyright 1999-2015 Gentoo Foundation |
85 |
# Distributed under the terms of the GNU General Public License v2 |
86 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.4.3.ebuild,v 1.1 2015/02/03 21:43:26 mattst88 Exp $ |
87 |
|
88 |
EAPI=5 |
89 |
|
90 |
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
91 |
|
92 |
if [[ ${PV} = 9999* ]]; then |
93 |
GIT_ECLASS="git-r3" |
94 |
EXPERIMENTAL="true" |
95 |
fi |
96 |
|
97 |
PYTHON_COMPAT=( python{2_6,2_7} ) |
98 |
|
99 |
inherit base autotools multilib multilib-minimal flag-o-matic \ |
100 |
python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS} |
101 |
|
102 |
OPENGL_DIR="xorg-x11" |
103 |
|
104 |
MY_PN="${PN/m/M}" |
105 |
MY_P="${MY_PN}-${PV/_/-}" |
106 |
MY_SRC_P="${MY_PN}Lib-${PV/_/-}" |
107 |
|
108 |
FOLDER="${PV/_rc*/}" |
109 |
|
110 |
DESCRIPTION="OpenGL-like graphic library for Linux" |
111 |
HOMEPAGE="http://mesa3d.sourceforge.net/" |
112 |
|
113 |
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
114 |
if [[ $PV = 9999* ]]; then |
115 |
SRC_URI="${SRC_PATCHES}" |
116 |
else |
117 |
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
118 |
${SRC_PATCHES}" |
119 |
fi |
120 |
|
121 |
# The code is MIT/X11. |
122 |
# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0 |
123 |
LICENSE="MIT SGI-B-2.0" |
124 |
SLOT="0" |
125 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
126 |
|
127 |
INTEL_CARDS="i915 i965 ilo intel" |
128 |
RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
129 |
VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware" |
130 |
for card in ${VIDEO_CARDS}; do |
131 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
132 |
done |
133 |
|
134 |
IUSE="${IUSE_VIDEO_CARDS} |
135 |
bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl |
136 |
opencl osmesa pax_kernel openmax pic r600-llvm-compiler selinux |
137 |
+udev vaapi vdpau wayland xvmc xa kernel_FreeBSD" |
138 |
|
139 |
REQUIRED_USE=" |
140 |
llvm? ( gallium ) |
141 |
opencl? ( |
142 |
gallium |
143 |
llvm |
144 |
video_cards_r600? ( r600-llvm-compiler ) |
145 |
video_cards_radeon? ( r600-llvm-compiler ) |
146 |
video_cards_radeonsi? ( r600-llvm-compiler ) |
147 |
) |
148 |
openmax? ( gallium ) |
149 |
gles1? ( egl ) |
150 |
gles2? ( egl ) |
151 |
r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi video_cards_radeon ) ) |
152 |
vaapi? ( gallium ) |
153 |
vdpau? ( gallium ) |
154 |
wayland? ( egl gbm ) |
155 |
xa? ( gallium ) |
156 |
video_cards_freedreno? ( gallium ) |
157 |
video_cards_intel? ( || ( classic gallium ) ) |
158 |
video_cards_i915? ( || ( classic gallium ) ) |
159 |
video_cards_i965? ( classic ) |
160 |
video_cards_ilo? ( gallium ) |
161 |
video_cards_nouveau? ( || ( classic gallium ) ) |
162 |
video_cards_radeon? ( || ( classic gallium ) ) |
163 |
video_cards_r100? ( classic ) |
164 |
video_cards_r200? ( classic ) |
165 |
video_cards_r300? ( gallium llvm ) |
166 |
video_cards_r600? ( gallium ) |
167 |
video_cards_radeonsi? ( gallium llvm ) |
168 |
video_cards_vmware? ( gallium ) |
169 |
${PYTHON_REQUIRED_USE} |
170 |
" |
171 |
|
172 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56" |
173 |
# keep correct libdrm and dri2proto dep |
174 |
# keep blocks in rdepend for binpkg |
175 |
RDEPEND=" |
176 |
!<x11-base/xorg-server-1.7 |
177 |
!<=x11-proto/xf86driproto-2.0.3 |
178 |
abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
179 |
classic? ( app-admin/eselect-mesa ) |
180 |
gallium? ( app-admin/eselect-mesa ) |
181 |
>=app-admin/eselect-opengl-1.3.0 |
182 |
udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) ) |
183 |
>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
184 |
gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) |
185 |
dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) |
186 |
>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
187 |
>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
188 |
>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
189 |
>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
190 |
>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
191 |
>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
192 |
llvm? ( |
193 |
video_cards_radeonsi? ( || ( |
194 |
>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
195 |
>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
196 |
) ) |
197 |
video_cards_r600? ( || ( |
198 |
>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
199 |
>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
200 |
) ) |
201 |
!video_cards_r600? ( |
202 |
video_cards_radeon? ( || ( |
203 |
>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
204 |
>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
205 |
) ) |
206 |
) |
207 |
>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] |
208 |
) |
209 |
opencl? ( |
210 |
app-admin/eselect-opencl |
211 |
dev-libs/libclc |
212 |
|| ( |
213 |
>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] |
214 |
>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] |
215 |
) |
216 |
) |
217 |
openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
218 |
vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] ) |
219 |
vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] ) |
220 |
wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] ) |
221 |
xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
222 |
${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}] |
223 |
" |
224 |
for card in ${INTEL_CARDS}; do |
225 |
RDEPEND="${RDEPEND} |
226 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
227 |
" |
228 |
done |
229 |
|
230 |
for card in ${RADEON_CARDS}; do |
231 |
RDEPEND="${RDEPEND} |
232 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
233 |
" |
234 |
done |
235 |
|
236 |
DEPEND="${RDEPEND} |
237 |
${PYTHON_DEPS} |
238 |
llvm? ( |
239 |
r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] ) |
240 |
video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] ) |
241 |
) |
242 |
opencl? ( |
243 |
>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] |
244 |
>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}] |
245 |
>=sys-devel/gcc-4.6 |
246 |
) |
247 |
sys-devel/bison |
248 |
sys-devel/flex |
249 |
sys-devel/gettext |
250 |
virtual/pkgconfig |
251 |
>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
252 |
dri3? ( |
253 |
>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
254 |
>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
255 |
) |
256 |
>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
257 |
>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
258 |
>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
259 |
>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
260 |
" |
261 |
|
262 |
S="${WORKDIR}/${MY_P}" |
263 |
EGIT_CHECKOUT_DIR=${S} |
264 |
|
265 |
# It is slow without texrels, if someone wants slow |
266 |
# mesa without texrels +pic use is worth the shot |
267 |
QA_EXECSTACK="usr/lib*/libGL.so*" |
268 |
QA_WX_LOAD="usr/lib*/libGL.so*" |
269 |
|
270 |
# Think about: ggi, fbcon, no-X configs |
271 |
|
272 |
pkg_setup() { |
273 |
# workaround toc-issue wrt #386545 |
274 |
use ppc64 && append-flags -mminimal-toc |
275 |
|
276 |
# warning message for bug 459306 |
277 |
if use llvm && has_version sys-devel/llvm[!debug=]; then |
278 |
ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
279 |
ewarn "detected! This can cause problems. For details, see bug 459306." |
280 |
fi |
281 |
|
282 |
python-any-r1_pkg_setup |
283 |
} |
284 |
|
285 |
src_unpack() { |
286 |
default |
287 |
[[ $PV = 9999* ]] && git-r3_src_unpack |
288 |
} |
289 |
|
290 |
src_prepare() { |
291 |
# apply patches |
292 |
if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
293 |
EPATCH_FORCE="yes" \ |
294 |
EPATCH_SOURCE="${WORKDIR}/patches" \ |
295 |
EPATCH_SUFFIX="patch" \ |
296 |
epatch |
297 |
fi |
298 |
|
299 |
epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch |
300 |
|
301 |
# fix for hardened pax_kernel, bug 240956 |
302 |
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
303 |
|
304 |
# Solaris needs some recent POSIX stuff in our case |
305 |
if [[ ${CHOST} == *-solaris* ]] ; then |
306 |
sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die |
307 |
fi |
308 |
|
309 |
base_src_prepare |
310 |
|
311 |
eautoreconf |
312 |
multilib_copy_sources |
313 |
} |
314 |
|
315 |
multilib_src_configure() { |
316 |
local myconf |
317 |
|
318 |
if use classic; then |
319 |
# Configurable DRI drivers |
320 |
driver_enable swrast |
321 |
|
322 |
# Intel code |
323 |
driver_enable video_cards_i915 i915 |
324 |
driver_enable video_cards_i965 i965 |
325 |
if ! use video_cards_i915 && \ |
326 |
! use video_cards_i965; then |
327 |
driver_enable video_cards_intel i915 i965 |
328 |
fi |
329 |
|
330 |
# Nouveau code |
331 |
driver_enable video_cards_nouveau nouveau |
332 |
|
333 |
# ATI code |
334 |
driver_enable video_cards_r100 radeon |
335 |
driver_enable video_cards_r200 r200 |
336 |
if ! use video_cards_r100 && \ |
337 |
! use video_cards_r200; then |
338 |
driver_enable video_cards_radeon radeon r200 |
339 |
fi |
340 |
fi |
341 |
|
342 |
if use egl; then |
343 |
myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") " |
344 |
fi |
345 |
|
346 |
if use gallium; then |
347 |
myconf+=" |
348 |
$(use_enable llvm gallium-llvm) |
349 |
$(use_enable openmax omx) |
350 |
$(use_enable r600-llvm-compiler) |
351 |
$(use_enable vaapi va) |
352 |
$(use_enable vdpau) |
353 |
$(use_enable xa) |
354 |
$(use_enable xvmc) |
355 |
" |
356 |
gallium_enable swrast |
357 |
gallium_enable video_cards_vmware svga |
358 |
gallium_enable video_cards_nouveau nouveau |
359 |
gallium_enable video_cards_i915 i915 |
360 |
gallium_enable video_cards_ilo ilo |
361 |
if ! use video_cards_i915 && \ |
362 |
! use video_cards_i965; then |
363 |
gallium_enable video_cards_intel i915 |
364 |
fi |
365 |
|
366 |
gallium_enable video_cards_r300 r300 |
367 |
gallium_enable video_cards_r600 r600 |
368 |
gallium_enable video_cards_radeonsi radeonsi |
369 |
if ! use video_cards_r300 && \ |
370 |
! use video_cards_r600; then |
371 |
gallium_enable video_cards_radeon r300 r600 |
372 |
fi |
373 |
|
374 |
gallium_enable video_cards_freedreno freedreno |
375 |
# opencl stuff |
376 |
if use opencl; then |
377 |
myconf+=" |
378 |
$(use_enable opencl) |
379 |
--with-clang-libdir="${EPREFIX}/usr/lib" |
380 |
" |
381 |
fi |
382 |
fi |
383 |
|
384 |
# x86 hardened pax_kernel needs glx-rts, bug 240956 |
385 |
if use pax_kernel; then |
386 |
myconf+=" |
387 |
$(use_enable x86 glx-rts) |
388 |
" |
389 |
fi |
390 |
|
391 |
# on abi_x86_32 hardened we need to have asm disable |
392 |
if [[ ${ABI} == x86* ]] && use pic; then |
393 |
myconf+=" --disable-asm" |
394 |
fi |
395 |
|
396 |
# build fails with BSD indent, bug #428112 |
397 |
use userland_GNU || export INDENT=cat |
398 |
|
399 |
econf \ |
400 |
--enable-dri \ |
401 |
--enable-glx \ |
402 |
--enable-shared-glapi \ |
403 |
$(use_enable !bindist texture-float) \ |
404 |
$(use_enable debug) \ |
405 |
$(use_enable dri3) \ |
406 |
$(use_enable egl) \ |
407 |
$(use_enable gbm) \ |
408 |
$(use_enable gles1) \ |
409 |
$(use_enable gles2) \ |
410 |
$(use_enable nptl glx-tls) \ |
411 |
$(use_enable osmesa) \ |
412 |
$(use_enable !udev sysfs) \ |
413 |
--enable-llvm-shared-libs \ |
414 |
--with-dri-drivers=${DRI_DRIVERS} \ |
415 |
--with-gallium-drivers=${GALLIUM_DRIVERS} \ |
416 |
PYTHON2="${PYTHON}" \ |
417 |
${myconf} |
418 |
} |
419 |
|
420 |
multilib_src_install() { |
421 |
emake install DESTDIR="${D}" |
422 |
|
423 |
if use classic || use gallium; then |
424 |
ebegin "Moving DRI/Gallium drivers for dynamic switching" |
425 |
local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
426 |
keepdir /usr/$(get_libdir)/dri |
427 |
dodir /usr/$(get_libdir)/mesa |
428 |
for x in ${gallium_drivers[@]}; do |
429 |
if [ -f "$(get_libdir)/gallium/${x}" ]; then |
430 |
mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
431 |
|| die "Failed to move ${x}" |
432 |
fi |
433 |
done |
434 |
if use classic; then |
435 |
emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
436 |
fi |
437 |
for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
438 |
if [ -f ${x} -o -L ${x} ]; then |
439 |
mv -f "${x}" "${x/dri/mesa}" \ |
440 |
|| die "Failed to move ${x}" |
441 |
fi |
442 |
done |
443 |
pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
444 |
ln -s ../mesa/*.so . || die "Creating symlink failed" |
445 |
# remove symlinks to drivers known to eselect |
446 |
for x in ${gallium_drivers[@]}; do |
447 |
if [ -f ${x} -o -L ${x} ]; then |
448 |
rm "${x}" || die "Failed to remove ${x}" |
449 |
fi |
450 |
done |
451 |
popd |
452 |
eend $? |
453 |
fi |
454 |
if use opencl; then |
455 |
ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
456 |
local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
457 |
dodir ${cl_dir}/{lib,include} |
458 |
if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
459 |
mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
460 |
"${ED}"${cl_dir} |
461 |
fi |
462 |
if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
463 |
mv -f "${ED}"/usr/include/CL \ |
464 |
"${ED}"${cl_dir}/include |
465 |
fi |
466 |
eend $? |
467 |
fi |
468 |
|
469 |
if use openmax; then |
470 |
echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
471 |
doenvd "${T}"/99mesaxdgomx |
472 |
keepdir /usr/share/mesa/xdg |
473 |
fi |
474 |
} |
475 |
|
476 |
multilib_src_install_all() { |
477 |
prune_libtool_files --all |
478 |
einstalldocs |
479 |
|
480 |
if use !bindist; then |
481 |
dodoc docs/patents.txt |
482 |
fi |
483 |
|
484 |
# Install config file for eselect mesa |
485 |
insinto /usr/share/mesa |
486 |
newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
487 |
} |
488 |
|
489 |
multilib_src_test() { |
490 |
if use llvm; then |
491 |
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' |
492 |
pushd src/gallium/drivers/llvmpipe >/dev/null || die |
493 |
emake ${llvm_tests} |
494 |
pax-mark m ${llvm_tests} |
495 |
popd >/dev/null || die |
496 |
fi |
497 |
emake check |
498 |
} |
499 |
|
500 |
pkg_postinst() { |
501 |
# Switch to the xorg implementation. |
502 |
echo |
503 |
eselect opengl set --use-old ${OPENGL_DIR} |
504 |
|
505 |
# Select classic/gallium drivers |
506 |
if use classic || use gallium; then |
507 |
eselect mesa set --auto |
508 |
fi |
509 |
|
510 |
# Switch to mesa opencl |
511 |
if use opencl; then |
512 |
eselect opencl set --use-old ${PN} |
513 |
fi |
514 |
|
515 |
# run omxregister-bellagio to make the OpenMAX drivers known system-wide |
516 |
if use openmax; then |
517 |
ebegin "Registering OpenMAX drivers" |
518 |
BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
519 |
OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
520 |
omxregister-bellagio |
521 |
eend $? |
522 |
fi |
523 |
|
524 |
# warn about patent encumbered texture-float |
525 |
if use !bindist; then |
526 |
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
527 |
elog "enabled. Please see patents.txt for an explanation." |
528 |
fi |
529 |
|
530 |
local using_radeon r_flag |
531 |
for r_flag in ${RADEON_CARDS}; do |
532 |
if use video_cards_${r_flag}; then |
533 |
using_radeon=1 |
534 |
break |
535 |
fi |
536 |
done |
537 |
|
538 |
if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then |
539 |
elog "Note that in order to have full S3TC support, it is necessary to install" |
540 |
elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
541 |
elog "textures in some apps, and some others even require this to run." |
542 |
fi |
543 |
} |
544 |
|
545 |
pkg_prerm() { |
546 |
if use openmax; then |
547 |
rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
548 |
fi |
549 |
} |
550 |
|
551 |
# $1 - VIDEO_CARDS flag |
552 |
# other args - names of DRI drivers to enable |
553 |
# TODO: avoid code duplication for a more elegant implementation |
554 |
driver_enable() { |
555 |
case $# in |
556 |
# for enabling unconditionally |
557 |
1) |
558 |
DRI_DRIVERS+=",$1" |
559 |
;; |
560 |
*) |
561 |
if use $1; then |
562 |
shift |
563 |
for i in $@; do |
564 |
DRI_DRIVERS+=",${i}" |
565 |
done |
566 |
fi |
567 |
;; |
568 |
esac |
569 |
} |
570 |
|
571 |
gallium_enable() { |
572 |
case $# in |
573 |
# for enabling unconditionally |
574 |
1) |
575 |
GALLIUM_DRIVERS+=",$1" |
576 |
;; |
577 |
*) |
578 |
if use $1; then |
579 |
shift |
580 |
for i in $@; do |
581 |
GALLIUM_DRIVERS+=",${i}" |
582 |
done |
583 |
fi |
584 |
;; |
585 |
esac |
586 |
} |