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