1 |
lu_zero 12/03/02 17:24:28 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: mesa-8.0.1-r1.ebuild |
5 |
Log: |
6 |
Support switching GLES implementations as well, fix bug #406501 |
7 |
|
8 |
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.385 media-libs/mesa/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.385&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.385&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.384&r2=1.385 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v |
20 |
retrieving revision 1.384 |
21 |
retrieving revision 1.385 |
22 |
diff -u -r1.384 -r1.385 |
23 |
--- ChangeLog 24 Feb 2012 17:56:07 -0000 1.384 |
24 |
+++ ChangeLog 2 Mar 2012 17:24:28 -0000 1.385 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for media-libs/mesa |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.384 2012/02/24 17:56:07 chithanh Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.385 2012/03/02 17:24:28 lu_zero Exp $ |
30 |
+ |
31 |
+*mesa-8.0.1-r1 (02 Mar 2012) |
32 |
+ |
33 |
+ 02 Mar 2012; Luca Barbato <lu_zero@g.o> +mesa-8.0.1-r1.ebuild: |
34 |
+ Support switching GLES implementations as well, fix bug #406501 |
35 |
|
36 |
24 Feb 2012; Chí-Thanh Christopher Nguyễn <chithanh@g.o> |
37 |
mesa-8.0.1.ebuild: |
38 |
@@ -1298,7 +1303,7 @@ |
39 |
+files/6.5-re-order-context-destruction.patch, +mesa-6.5-r1.ebuild: |
40 |
Add some upstream fixes that re-order GL context destruction in the ati |
41 |
drivers to avoid a possible NULL dereference. |
42 |
- |
43 |
+ |
44 |
I've also restored the entire ChangeLog, as it appears to have been truncated |
45 |
during Diego's last commit. |
46 |
|
47 |
@@ -1653,7 +1658,7 @@ |
48 |
Add ~alpha |
49 |
|
50 |
06 Dec 2002; Rodney Rees <manson@g.o> : changed sparc ~sparc keywords |
51 |
- |
52 |
+ |
53 |
*mesa-3.5 (22 Jul 2002) |
54 |
|
55 |
22 Jul 2002; Seemant Kulleen <seemant@g.o> mesa-3.5.ebuild |
56 |
@@ -1665,7 +1670,7 @@ |
57 |
*mesa-3.4.2 (1 Feb 2002) |
58 |
|
59 |
1 Feb 2002; G.Bevin <gbevin@g.o> ChangeLog : |
60 |
- |
61 |
+ |
62 |
Added initial ChangeLog which should be updated whenever the package is |
63 |
updated in any way. This changelog is targetted to users. This means that the |
64 |
comments should well explained and written in clean English. The details about |
65 |
|
66 |
|
67 |
|
68 |
1.1 media-libs/mesa/mesa-8.0.1-r1.ebuild |
69 |
|
70 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-8.0.1-r1.ebuild?rev=1.1&view=markup |
71 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-8.0.1-r1.ebuild?rev=1.1&content-type=text/plain |
72 |
|
73 |
Index: mesa-8.0.1-r1.ebuild |
74 |
=================================================================== |
75 |
# Copyright 1999-2012 Gentoo Foundation |
76 |
# Distributed under the terms of the GNU General Public License v2 |
77 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-8.0.1-r1.ebuild,v 1.1 2012/03/02 17:24:28 lu_zero Exp $ |
78 |
|
79 |
EAPI=4 |
80 |
|
81 |
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
82 |
|
83 |
if [[ ${PV} = 9999* ]]; then |
84 |
GIT_ECLASS="git-2" |
85 |
EXPERIMENTAL="true" |
86 |
fi |
87 |
|
88 |
inherit base autotools multilib flag-o-matic toolchain-funcs ${GIT_ECLASS} |
89 |
|
90 |
OPENGL_DIR="xorg-x11" |
91 |
|
92 |
MY_PN="${PN/m/M}" |
93 |
MY_P="${MY_PN}-${PV/_/-}" |
94 |
MY_SRC_P="${MY_PN}Lib-${PV/_/-}" |
95 |
|
96 |
FOLDER="${PV/_rc*/}" |
97 |
|
98 |
DESCRIPTION="OpenGL-like graphic library for Linux" |
99 |
HOMEPAGE="http://mesa3d.sourceforge.net/" |
100 |
|
101 |
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
102 |
if [[ $PV = 9999* ]]; then |
103 |
SRC_URI="${SRC_PATCHES}" |
104 |
else |
105 |
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
106 |
${SRC_PATCHES}" |
107 |
fi |
108 |
|
109 |
# Most of the code is MIT/X11. |
110 |
# ralloc is LGPL-3 |
111 |
# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0 |
112 |
LICENSE="MIT LGPL-3 SGI-B-2.0" |
113 |
SLOT="0" |
114 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
115 |
|
116 |
INTEL_CARDS="i915 i965 intel" |
117 |
RADEON_CARDS="r100 r200 r300 r600 radeon" |
118 |
VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} nouveau vmware" |
119 |
for card in ${VIDEO_CARDS}; do |
120 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
121 |
done |
122 |
|
123 |
IUSE="${IUSE_VIDEO_CARDS} |
124 |
bindist +classic d3d debug +egl g3dvl +gallium gbm gles1 gles2 +llvm +nptl openvg osmesa pax_kernel pic selinux shared-dricore +shared-glapi vdpau wayland xvmc kernel_FreeBSD" |
125 |
|
126 |
REQUIRED_USE=" |
127 |
d3d? ( gallium ) |
128 |
g3dvl? ( gallium ) |
129 |
llvm? ( gallium ) |
130 |
openvg? ( egl gallium ) |
131 |
gbm? ( shared-glapi ) |
132 |
g3dvl? ( || ( vdpau xvmc ) ) |
133 |
vdpau? ( g3dvl ) |
134 |
xvmc? ( g3dvl ) |
135 |
video_cards_intel? ( || ( classic gallium ) ) |
136 |
video_cards_i915? ( || ( classic gallium ) ) |
137 |
video_cards_i965? ( classic ) |
138 |
video_cards_nouveau? ( || ( classic gallium ) ) |
139 |
video_cards_radeon? ( || ( classic gallium ) ) |
140 |
video_cards_r100? ( classic ) |
141 |
video_cards_r200? ( classic ) |
142 |
video_cards_r300? ( gallium ) |
143 |
video_cards_r600? ( gallium ) |
144 |
video_cards_vmware? ( gallium ) |
145 |
" |
146 |
|
147 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.31" |
148 |
# not a runtime dependency of this package, but dependency of packages which |
149 |
# depend on this package, bug #342393 |
150 |
EXTERNAL_DEPEND=" |
151 |
>=x11-proto/dri2proto-2.6 |
152 |
>=x11-proto/glproto-1.4.15 |
153 |
" |
154 |
# keep correct libdrm and dri2proto dep |
155 |
# keep blocks in rdepend for binpkg |
156 |
RDEPEND="${EXTERNAL_DEPEND} |
157 |
!<x11-base/xorg-server-1.7 |
158 |
!<=x11-proto/xf86driproto-2.0.3 |
159 |
classic? ( app-admin/eselect-mesa ) |
160 |
gallium? ( app-admin/eselect-mesa ) |
161 |
>=app-admin/eselect-opengl-1.2.5 |
162 |
dev-libs/expat |
163 |
gbm? ( sys-fs/udev ) |
164 |
>=x11-libs/libX11-1.3.99.901 |
165 |
x11-libs/libXdamage |
166 |
x11-libs/libXext |
167 |
x11-libs/libXxf86vm |
168 |
>=x11-libs/libxcb-1.8 |
169 |
d3d? ( app-emulation/wine ) |
170 |
vdpau? ( >=x11-libs/libvdpau-0.4.1 ) |
171 |
wayland? ( dev-libs/wayland ) |
172 |
xvmc? ( x11-libs/libXvMC ) |
173 |
${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] |
174 |
" |
175 |
for card in ${INTEL_CARDS}; do |
176 |
RDEPEND="${RDEPEND} |
177 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
178 |
" |
179 |
done |
180 |
|
181 |
for card in ${RADEON_CARDS}; do |
182 |
RDEPEND="${RDEPEND} |
183 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
184 |
" |
185 |
done |
186 |
|
187 |
DEPEND="${RDEPEND} |
188 |
llvm? ( >=sys-devel/llvm-2.9 ) |
189 |
=dev-lang/python-2* |
190 |
dev-libs/libxml2[python] |
191 |
dev-util/pkgconfig |
192 |
sys-devel/bison |
193 |
sys-devel/flex |
194 |
x11-misc/makedepend |
195 |
>=x11-proto/xextproto-7.0.99.1 |
196 |
x11-proto/xf86driproto |
197 |
x11-proto/xf86vidmodeproto |
198 |
" |
199 |
|
200 |
S="${WORKDIR}/${MY_P}" |
201 |
|
202 |
# It is slow without texrels, if someone wants slow |
203 |
# mesa without texrels +pic use is worth the shot |
204 |
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
205 |
QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
206 |
|
207 |
# Think about: ggi, fbcon, no-X configs |
208 |
|
209 |
pkg_setup() { |
210 |
# workaround toc-issue wrt #386545 |
211 |
use ppc64 && append-flags -mminimal-toc |
212 |
} |
213 |
|
214 |
src_unpack() { |
215 |
default |
216 |
[[ $PV = 9999* ]] && git-2_src_unpack |
217 |
} |
218 |
|
219 |
src_prepare() { |
220 |
# apply patches |
221 |
if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
222 |
EPATCH_FORCE="yes" \ |
223 |
EPATCH_SOURCE="${WORKDIR}/patches" \ |
224 |
EPATCH_SUFFIX="patch" \ |
225 |
epatch |
226 |
fi |
227 |
|
228 |
# relax the requirement that r300 must have llvm, bug 380303 |
229 |
epatch "${FILESDIR}"/${PN}-8.0-dont-require-llvm-for-r300.patch |
230 |
|
231 |
# fix for hardened pax_kernel, bug 240956 |
232 |
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
233 |
|
234 |
# Solaris needs some recent POSIX stuff in our case |
235 |
if [[ ${CHOST} == *-solaris* ]] ; then |
236 |
sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die |
237 |
fi |
238 |
|
239 |
base_src_prepare |
240 |
|
241 |
eautoreconf |
242 |
} |
243 |
|
244 |
src_configure() { |
245 |
local myconf |
246 |
|
247 |
if use classic; then |
248 |
# Configurable DRI drivers |
249 |
driver_enable swrast |
250 |
|
251 |
# Intel code |
252 |
driver_enable video_cards_i915 i915 |
253 |
driver_enable video_cards_i965 i965 |
254 |
if ! use video_cards_i915 && \ |
255 |
! use video_cards_i965; then |
256 |
driver_enable video_cards_intel i915 i965 |
257 |
fi |
258 |
|
259 |
# Nouveau code |
260 |
driver_enable video_cards_nouveau nouveau |
261 |
|
262 |
# ATI code |
263 |
driver_enable video_cards_r100 radeon |
264 |
driver_enable video_cards_r200 r200 |
265 |
if ! use video_cards_r100 && \ |
266 |
! use video_cards_r200; then |
267 |
driver_enable video_cards_radeon radeon r200 |
268 |
fi |
269 |
fi |
270 |
|
271 |
if use egl; then |
272 |
myconf+=" |
273 |
--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") |
274 |
$(use_enable gallium gallium-egl) |
275 |
" |
276 |
fi |
277 |
|
278 |
if use gallium; then |
279 |
myconf+=" |
280 |
$(use_enable d3d d3d1x) |
281 |
$(use_enable g3dvl gallium-g3dvl) |
282 |
$(use_enable llvm gallium-llvm) |
283 |
$(use_enable openvg) |
284 |
$(use_enable vdpau) |
285 |
$(use_enable xvmc) |
286 |
" |
287 |
gallium_enable swrast |
288 |
gallium_enable video_cards_vmware svga |
289 |
gallium_enable video_cards_nouveau nouveau |
290 |
gallium_enable video_cards_i915 i915 |
291 |
if ! use video_cards_i915; then |
292 |
gallium_enable video_cards_intel i915 |
293 |
fi |
294 |
|
295 |
gallium_enable video_cards_r300 r300 |
296 |
gallium_enable video_cards_r600 r600 |
297 |
if ! use video_cards_r300 && \ |
298 |
! use video_cards_r600; then |
299 |
gallium_enable video_cards_radeon r300 r600 |
300 |
fi |
301 |
fi |
302 |
|
303 |
# x86 hardened pax_kernel needs glx-rts, bug 240956 |
304 |
if use pax_kernel; then |
305 |
myconf+=" |
306 |
$(use_enable x86 glx-rts) |
307 |
" |
308 |
fi |
309 |
|
310 |
econf \ |
311 |
--enable-dri \ |
312 |
--enable-glx \ |
313 |
$(use_enable !bindist texture-float) \ |
314 |
$(use_enable debug) \ |
315 |
$(use_enable egl) \ |
316 |
$(use_enable gbm) \ |
317 |
$(use_enable gles1) \ |
318 |
$(use_enable gles2) \ |
319 |
$(use_enable nptl glx-tls) \ |
320 |
$(use_enable osmesa) \ |
321 |
$(use_enable !pic asm) \ |
322 |
$(use_enable shared-dricore) \ |
323 |
$(use_enable shared-glapi) \ |
324 |
--with-dri-drivers=${DRI_DRIVERS} \ |
325 |
--with-gallium-drivers=${GALLIUM_DRIVERS} \ |
326 |
${myconf} |
327 |
} |
328 |
|
329 |
src_install() { |
330 |
base_src_install |
331 |
|
332 |
if use !bindist; then |
333 |
dodoc docs/patents.txt |
334 |
fi |
335 |
|
336 |
# Save the glsl-compiler for later use |
337 |
if ! tc-is-cross-compiler; then |
338 |
dobin "${S}"/src/glsl/glsl_compiler |
339 |
fi |
340 |
|
341 |
# Install config file for eselect mesa |
342 |
insinto /usr/share/mesa |
343 |
newins "${FILESDIR}/eselect-mesa.conf.8.0.1" eselect-mesa.conf |
344 |
|
345 |
# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib |
346 |
# because user can eselect desired GL provider. |
347 |
ebegin "Moving libGL and friends for dynamic switching" |
348 |
dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} |
349 |
local x |
350 |
for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do |
351 |
if [ -f ${x} -o -L ${x} ]; then |
352 |
mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \ |
353 |
|| die "Failed to move ${x}" |
354 |
fi |
355 |
done |
356 |
for x in "${ED}"/usr/include/*/*.h; do |
357 |
if [ -f ${x} -o -L ${x} ]; then |
358 |
mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \ |
359 |
|| die "Failed to move ${x}" |
360 |
fi |
361 |
done |
362 |
eend $? |
363 |
|
364 |
if use classic || use gallium; then |
365 |
ebegin "Moving DRI/Gallium drivers for dynamic switching" |
366 |
local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
367 |
keepdir /usr/$(get_libdir)/dri |
368 |
dodir /usr/$(get_libdir)/mesa |
369 |
for x in ${gallium_drivers[@]}; do |
370 |
if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then |
371 |
mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
372 |
|| die "Failed to move ${x}" |
373 |
insinto "/usr/$(get_libdir)/dri/" |
374 |
if [ -f "${S}/$(get_libdir)/${x}" ]; then |
375 |
insopts -m0755 |
376 |
doins "${S}/$(get_libdir)/${x}" |
377 |
fi |
378 |
fi |
379 |
done |
380 |
for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
381 |
if [ -f ${x} -o -L ${x} ]; then |
382 |
mv -f "${x}" "${x/dri/mesa}" \ |
383 |
|| die "Failed to move ${x}" |
384 |
fi |
385 |
done |
386 |
pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
387 |
ln -s ../mesa/*.so . || die "Creating symlink failed" |
388 |
# remove symlinks to drivers known to eselect |
389 |
for x in ${gallium_drivers[@]}; do |
390 |
if [ -f ${x} -o -L ${x} ]; then |
391 |
rm "${x}" || die "Failed to remove ${x}" |
392 |
fi |
393 |
done |
394 |
popd |
395 |
eend $? |
396 |
fi |
397 |
} |
398 |
|
399 |
pkg_postinst() { |
400 |
# Switch to the xorg implementation. |
401 |
echo |
402 |
eselect opengl set --use-old ${OPENGL_DIR} |
403 |
|
404 |
# switch to xorg-x11 and back if necessary, bug #374647 comment 11 |
405 |
OLD_IMPLEM="$(eselect opengl show)" |
406 |
if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then |
407 |
eselect opengl set ${OPENGL_DIR} |
408 |
eselect opengl set ${OLD_IMPLEM} |
409 |
fi |
410 |
|
411 |
# Select classic/gallium drivers |
412 |
if use classic || use gallium; then |
413 |
eselect mesa set --auto |
414 |
fi |
415 |
|
416 |
# warn about patent encumbered texture-float |
417 |
if use !bindist; then |
418 |
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
419 |
elog "enabled. Please see patents.txt for an explanation." |
420 |
fi |
421 |
|
422 |
local using_radeon r_flag |
423 |
for r_flag in ${RADEON_CARDS}; do |
424 |
if use video_cards_${r_flag}; then |
425 |
using_radeon=1 |
426 |
break |
427 |
fi |
428 |
done |
429 |
|
430 |
if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then |
431 |
elog "Note that in order to have full S3TC support, it is necessary to install" |
432 |
elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
433 |
elog "textures in some apps, and some others even require this to run." |
434 |
fi |
435 |
} |
436 |
|
437 |
# $1 - VIDEO_CARDS flag |
438 |
# other args - names of DRI drivers to enable |
439 |
# TODO: avoid code duplication for a more elegant implementation |
440 |
driver_enable() { |
441 |
case $# in |
442 |
# for enabling unconditionally |
443 |
1) |
444 |
DRI_DRIVERS+=",$1" |
445 |
;; |
446 |
*) |
447 |
if use $1; then |
448 |
shift |
449 |
for i in $@; do |
450 |
DRI_DRIVERS+=",${i}" |
451 |
done |
452 |
fi |
453 |
;; |
454 |
esac |
455 |
} |
456 |
|
457 |
gallium_enable() { |
458 |
case $# in |
459 |
# for enabling unconditionally |
460 |
1) |
461 |
GALLIUM_DRIVERS+=",$1" |
462 |
;; |
463 |
*) |
464 |
if use $1; then |
465 |
shift |
466 |
for i in $@; do |
467 |
GALLIUM_DRIVERS+=",${i}" |
468 |
done |
469 |
fi |
470 |
;; |
471 |
esac |
472 |
} |