1 |
chithanh 11/11/30 01:11:02 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: mesa-7.11.2.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.0_alpha77/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.372 media-libs/mesa/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.372&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.372&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.371&r2=1.372 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v |
20 |
retrieving revision 1.371 |
21 |
retrieving revision 1.372 |
22 |
diff -u -r1.371 -r1.372 |
23 |
--- ChangeLog 18 Nov 2011 16:16:49 -0000 1.371 |
24 |
+++ ChangeLog 30 Nov 2011 01:11:02 -0000 1.372 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for media-libs/mesa |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.371 2011/11/18 16:16:49 chithanh Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.372 2011/11/30 01:11:02 chithanh Exp $ |
30 |
+ |
31 |
+*mesa-7.11.2 (30 Nov 2011) |
32 |
+ |
33 |
+ 30 Nov 2011; Chí-Thanh Christopher Nguyễn <chithanh@g.o> |
34 |
+ +mesa-7.11.2.ebuild: |
35 |
+ Version bump. |
36 |
|
37 |
*mesa-7.11.1 (18 Nov 2011) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 media-libs/mesa/mesa-7.11.2.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-7.11.2.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-7.11.2.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: mesa-7.11.2.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2011 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-7.11.2.ebuild,v 1.1 2011/11/30 01:11:02 chithanh Exp $ |
52 |
|
53 |
EAPI=3 |
54 |
|
55 |
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
56 |
|
57 |
if [[ ${PV} = 9999* ]]; then |
58 |
GIT_ECLASS="git-2" |
59 |
EXPERIMENTAL="true" |
60 |
fi |
61 |
|
62 |
inherit base autotools multilib flag-o-matic python toolchain-funcs ${GIT_ECLASS} |
63 |
|
64 |
OPENGL_DIR="xorg-x11" |
65 |
|
66 |
MY_PN="${PN/m/M}" |
67 |
MY_P="${MY_PN}-${PV/_/-}" |
68 |
MY_SRC_P="${MY_PN}Lib-${PV/_/-}" |
69 |
|
70 |
FOLDER="${PV/_rc*/}" |
71 |
|
72 |
DESCRIPTION="OpenGL-like graphic library for Linux" |
73 |
HOMEPAGE="http://mesa3d.sourceforge.net/" |
74 |
|
75 |
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
76 |
if [[ $PV = 9999* ]]; then |
77 |
SRC_URI="${SRC_PATCHES}" |
78 |
else |
79 |
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
80 |
${SRC_PATCHES}" |
81 |
fi |
82 |
|
83 |
LICENSE="MIT LGPL-3 SGI-B-2.0" |
84 |
SLOT="0" |
85 |
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" |
86 |
|
87 |
INTEL_CARDS="intel" |
88 |
RADEON_CARDS="radeon" |
89 |
VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis vmware tdfx via" |
90 |
for card in ${VIDEO_CARDS}; do |
91 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
92 |
done |
93 |
|
94 |
IUSE="${IUSE_VIDEO_CARDS} |
95 |
bindist +classic debug +egl +gallium gbm gles +llvm motif +nptl openvg osmesa pic pax_kernel selinux shared-dricore +shared-glapi kernel_FreeBSD" |
96 |
|
97 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.24" |
98 |
# not a runtime dependency of this package, but dependency of packages which |
99 |
# depend on this package, bug #342393 |
100 |
EXTERNAL_DEPEND=" |
101 |
>=x11-proto/dri2proto-2.2 |
102 |
>=x11-proto/glproto-1.4.11 |
103 |
" |
104 |
# keep correct libdrm and dri2proto dep |
105 |
# keep blocks in rdepend for binpkg |
106 |
RDEPEND="${EXTERNAL_DEPEND} |
107 |
!<x11-base/xorg-server-1.7 |
108 |
!<=x11-proto/xf86driproto-2.0.3 |
109 |
classic? ( app-admin/eselect-mesa ) |
110 |
gallium? ( app-admin/eselect-mesa ) |
111 |
app-admin/eselect-opengl |
112 |
dev-libs/expat |
113 |
gbm? ( sys-fs/udev ) |
114 |
x11-libs/libICE |
115 |
>=x11-libs/libX11-1.3.99.901 |
116 |
x11-libs/libXdamage |
117 |
x11-libs/libXext |
118 |
x11-libs/libXi |
119 |
x11-libs/libXmu |
120 |
x11-libs/libXxf86vm |
121 |
motif? ( x11-libs/openmotif ) |
122 |
gallium? ( |
123 |
llvm? ( >=sys-devel/llvm-2.8 ) |
124 |
) |
125 |
${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] |
126 |
" |
127 |
for card in ${INTEL_CARDS}; do |
128 |
RDEPEND="${RDEPEND} |
129 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
130 |
" |
131 |
done |
132 |
|
133 |
for card in ${RADEON_CARDS}; do |
134 |
RDEPEND="${RDEPEND} |
135 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
136 |
" |
137 |
done |
138 |
|
139 |
DEPEND="${RDEPEND} |
140 |
=dev-lang/python-2* |
141 |
dev-libs/libxml2[python] |
142 |
dev-util/pkgconfig |
143 |
sys-devel/bison |
144 |
sys-devel/flex |
145 |
x11-misc/makedepend |
146 |
x11-proto/inputproto |
147 |
>=x11-proto/xextproto-7.0.99.1 |
148 |
x11-proto/xf86driproto |
149 |
x11-proto/xf86vidmodeproto |
150 |
" |
151 |
|
152 |
S="${WORKDIR}/${MY_P}" |
153 |
|
154 |
# It is slow without texrels, if someone wants slow |
155 |
# mesa without texrels +pic use is worth the shot |
156 |
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
157 |
QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
158 |
|
159 |
# Think about: ggi, fbcon, no-X configs |
160 |
|
161 |
pkg_setup() { |
162 |
# gcc 4.2 has buggy ivopts |
163 |
if [[ $(gcc-version) = "4.2" ]]; then |
164 |
append-flags -fno-ivopts |
165 |
fi |
166 |
|
167 |
# recommended by upstream |
168 |
append-flags -ffast-math |
169 |
# workaround toc-issue wrt #386545 |
170 |
use ppc64 && append-flags -mminimal-toc |
171 |
|
172 |
python_set_active_version 2 |
173 |
python_pkg_setup |
174 |
} |
175 |
|
176 |
src_unpack() { |
177 |
default |
178 |
[[ $PV = 9999* ]] && git-2_src_unpack |
179 |
} |
180 |
|
181 |
src_prepare() { |
182 |
# apply patches |
183 |
if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
184 |
EPATCH_FORCE="yes" \ |
185 |
EPATCH_SOURCE="${WORKDIR}/patches" \ |
186 |
EPATCH_SUFFIX="patch" \ |
187 |
epatch |
188 |
fi |
189 |
# fix for hardened pax_kernel, bug 240956 |
190 |
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
191 |
|
192 |
# FreeBSD 6.* doesn't have posix_memalign(). |
193 |
if [[ ${CHOST} == *-freebsd6.* ]]; then |
194 |
sed -i \ |
195 |
-e "s/-DHAVE_POSIX_MEMALIGN//" \ |
196 |
configure.ac || die |
197 |
fi |
198 |
# Solaris needs some recent POSIX stuff in our case |
199 |
if [[ ${CHOST} == *-solaris* ]] ; then |
200 |
sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die |
201 |
sed -i -e 's/uint/unsigned int/g' src/egl/drivers/glx/egl_glx.c || die |
202 |
fi |
203 |
|
204 |
# In order for mesa to complete it's build process we need to use a tool |
205 |
# that it compiles. When we cross compile this clearly does not work |
206 |
# so we require mesa to be built on the host system first. -solar |
207 |
if tc-is-cross-compiler; then |
208 |
sed -i -e "s#^GLSL_CL = .*\$#GLSL_CL = glsl_compiler#g" \ |
209 |
"${S}"/src/mesa/shader/slang/library/Makefile || die |
210 |
fi |
211 |
|
212 |
base_src_prepare |
213 |
|
214 |
eautoreconf |
215 |
} |
216 |
|
217 |
src_configure() { |
218 |
local myconf |
219 |
|
220 |
if use classic; then |
221 |
# Configurable DRI drivers |
222 |
driver_enable swrast |
223 |
driver_enable video_cards_intel i810 i915 i965 |
224 |
driver_enable video_cards_nouveau nouveau |
225 |
driver_enable video_cards_mach64 mach64 |
226 |
driver_enable video_cards_mga mga |
227 |
driver_enable video_cards_r128 r128 |
228 |
driver_enable video_cards_radeon radeon r200 r300 r600 |
229 |
driver_enable video_cards_savage savage |
230 |
driver_enable video_cards_sis sis |
231 |
driver_enable video_cards_tdfx tdfx |
232 |
driver_enable video_cards_via unichrome |
233 |
fi |
234 |
|
235 |
myconf+=" |
236 |
$(use_enable !bindist texture-float) |
237 |
$(use_enable gles gles1) |
238 |
$(use_enable gles gles2) |
239 |
$(use_enable egl) |
240 |
" |
241 |
if use egl; then |
242 |
use shared-glapi || die "egl needs shared-glapi. Please either enable shared-glapi or disable the egl use flag ." |
243 |
myconf+=" |
244 |
--with-egl-platforms=x11$(use gbm && echo ",drm") |
245 |
$(use_enable gallium gallium-egl) |
246 |
" |
247 |
fi |
248 |
|
249 |
if use !gallium && use !classic; then |
250 |
ewarn "You enabled neither classic nor gallium USE flags. No hardware" |
251 |
ewarn "drivers will be built." |
252 |
fi |
253 |
if use gallium; then |
254 |
myconf+=" |
255 |
--with-state-trackers=glx,dri$(use egl && echo ",egl")$(use openvg && echo ",vega") |
256 |
$(use_enable llvm gallium-llvm) |
257 |
$(use_enable openvg) |
258 |
" |
259 |
gallium_enable swrast |
260 |
gallium_enable video_cards_vmware svga |
261 |
gallium_enable video_cards_nouveau nouveau |
262 |
gallium_enable video_cards_intel i915 i965 |
263 |
gallium_enable video_cards_radeon r300 r600 |
264 |
fi |
265 |
|
266 |
# x86 hardened pax_kernel needs glx-rts, bug 240956 |
267 |
if use pax_kernel; then |
268 |
myconf+=" |
269 |
$(use_enable x86 glx-rts) |
270 |
" |
271 |
fi |
272 |
|
273 |
# --with-driver=dri|xlib|osmesa || do we need osmesa? |
274 |
econf \ |
275 |
--disable-option-checking \ |
276 |
--with-driver=dri \ |
277 |
--disable-glut \ |
278 |
--without-demos \ |
279 |
--enable-xcb \ |
280 |
$(use_enable debug) \ |
281 |
$(use_enable gbm) \ |
282 |
$(use_enable motif glw) \ |
283 |
$(use_enable motif) \ |
284 |
$(use_enable nptl glx-tls) \ |
285 |
$(use_enable osmesa) \ |
286 |
$(use_enable !pic asm) \ |
287 |
$(use_enable shared-dricore) \ |
288 |
$(use_enable shared-glapi) \ |
289 |
--with-dri-drivers=${DRI_DRIVERS} \ |
290 |
--with-gallium-drivers=${GALLIUM_DRIVERS} \ |
291 |
${myconf} |
292 |
} |
293 |
|
294 |
src_install() { |
295 |
base_src_install |
296 |
|
297 |
# Save the glsl-compiler for later use |
298 |
if ! tc-is-cross-compiler; then |
299 |
dobin "${S}"/src/glsl/glsl_compiler || die |
300 |
fi |
301 |
# Remove redundant headers |
302 |
# GLUT thing |
303 |
rm -f "${ED}"/usr/include/GL/glut*.h || die "Removing glut include failed." |
304 |
# Glew includes |
305 |
rm -f "${ED}"/usr/include/GL/{glew,glxew,wglew}.h \ |
306 |
|| die "Removing glew includes failed." |
307 |
|
308 |
# Install config file for eselect mesa |
309 |
insinto /usr/share/mesa |
310 |
newins "${FILESDIR}/eselect-mesa.conf.7.11" eselect-mesa.conf || die |
311 |
|
312 |
# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib |
313 |
# because user can eselect desired GL provider. |
314 |
ebegin "Moving libGL and friends for dynamic switching" |
315 |
dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} |
316 |
local x |
317 |
for x in "${ED}"/usr/$(get_libdir)/libGL.{la,a,so*}; do |
318 |
if [ -f ${x} -o -L ${x} ]; then |
319 |
mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \ |
320 |
|| die "Failed to move ${x}" |
321 |
fi |
322 |
done |
323 |
for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do |
324 |
if [ -f ${x} -o -L ${x} ]; then |
325 |
mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \ |
326 |
|| die "Failed to move ${x}" |
327 |
fi |
328 |
done |
329 |
eend $? |
330 |
|
331 |
if use classic || use gallium; then |
332 |
ebegin "Moving DRI/Gallium drivers for dynamic switching" |
333 |
local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
334 |
keepdir /usr/$(get_libdir)/dri |
335 |
dodir /usr/$(get_libdir)/mesa |
336 |
for x in ${gallium_drivers[@]}; do |
337 |
if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then |
338 |
mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
339 |
|| die "Failed to move ${x}" |
340 |
insinto "/usr/$(get_libdir)/dri/" |
341 |
if [ -f "${S}/$(get_libdir)/${x}" ]; then |
342 |
insopts -m0755 |
343 |
doins "${S}/$(get_libdir)/${x}" || die "failed to install ${x}" |
344 |
fi |
345 |
fi |
346 |
done |
347 |
for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
348 |
if [ -f ${x} -o -L ${x} ]; then |
349 |
mv -f "${x}" "${x/dri/mesa}" \ |
350 |
|| die "Failed to move ${x}" |
351 |
fi |
352 |
done |
353 |
pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
354 |
ln -s ../mesa/*.so . || die "Creating symlink failed" |
355 |
# remove symlinks to drivers known to eselect |
356 |
for x in ${gallium_drivers[@]}; do |
357 |
if [ -f ${x} -o -L ${x} ]; then |
358 |
rm "${x}" || die "Failed to remove ${x}" |
359 |
fi |
360 |
done |
361 |
popd |
362 |
eend $? |
363 |
fi |
364 |
} |
365 |
|
366 |
pkg_postinst() { |
367 |
# Switch to the xorg implementation. |
368 |
echo |
369 |
eselect opengl set --use-old ${OPENGL_DIR} |
370 |
# Select classic/gallium drivers |
371 |
if use classic || use gallium; then |
372 |
eselect mesa set --auto |
373 |
fi |
374 |
|
375 |
# warn about patent encumbered texture-float |
376 |
if use !bindist; then |
377 |
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
378 |
elog "enabled." |
379 |
fi |
380 |
} |
381 |
|
382 |
# $1 - VIDEO_CARDS flag |
383 |
# other args - names of DRI drivers to enable |
384 |
# TODO: avoid code duplication for a more elegant implementation |
385 |
driver_enable() { |
386 |
case $# in |
387 |
# for enabling unconditionally |
388 |
1) |
389 |
DRI_DRIVERS+=",$1" |
390 |
;; |
391 |
*) |
392 |
if use $1; then |
393 |
shift |
394 |
for i in $@; do |
395 |
DRI_DRIVERS+=",${i}" |
396 |
done |
397 |
fi |
398 |
;; |
399 |
esac |
400 |
} |
401 |
|
402 |
gallium_enable() { |
403 |
case $# in |
404 |
# for enabling unconditionally |
405 |
1) |
406 |
GALLIUM_DRIVERS+=",$1" |
407 |
;; |
408 |
*) |
409 |
if use $1; then |
410 |
shift |
411 |
for i in $@; do |
412 |
GALLIUM_DRIVERS+=",${i}" |
413 |
done |
414 |
fi |
415 |
;; |
416 |
esac |
417 |
} |