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