1 |
chithanh 10/11/28 21:36:51 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: mesa-7.9.ebuild |
5 |
Log: |
6 |
Version bump, bug #341097 |
7 |
|
8 |
(Portage version: 2.2.0_alpha5/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.4 media-libs/mesa/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?rev=1.4&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?rev=1.4&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?r1=1.3&r2=1.4 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/metadata.xml,v |
20 |
retrieving revision 1.3 |
21 |
retrieving revision 1.4 |
22 |
diff -u -r1.3 -r1.4 |
23 |
--- metadata.xml 13 Dec 2009 21:07:25 -0000 1.3 |
24 |
+++ metadata.xml 28 Nov 2010 21:36:51 -0000 1.4 |
25 |
@@ -3,7 +3,10 @@ |
26 |
<pkgmetadata> |
27 |
<herd>x11</herd> |
28 |
<use> |
29 |
+ <flag name='classic'>Build drivers based on the classic architecture.</flag> |
30 |
+ <flag name='gallium'>Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag> |
31 |
+ <flag name='gles'>Enable GLES support for Gallium3D.</flag> |
32 |
+ <flag name='llvm'>Enable LLVM backend for Gallium3D.</flag> |
33 |
<flag name='pic'>disable optimized assembly code that is not PIC friendly</flag> |
34 |
- <flag name='gallium'>Gallium3D is new architecture for building 3D graphics drivers.</flag> |
35 |
</use> |
36 |
</pkgmetadata> |
37 |
|
38 |
|
39 |
|
40 |
1.295 media-libs/mesa/ChangeLog |
41 |
|
42 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.295&view=markup |
43 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.295&content-type=text/plain |
44 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.294&r2=1.295 |
45 |
|
46 |
Index: ChangeLog |
47 |
=================================================================== |
48 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v |
49 |
retrieving revision 1.294 |
50 |
retrieving revision 1.295 |
51 |
diff -u -r1.294 -r1.295 |
52 |
--- ChangeLog 21 Oct 2010 01:06:53 -0000 1.294 |
53 |
+++ ChangeLog 28 Nov 2010 21:36:51 -0000 1.295 |
54 |
@@ -1,6 +1,12 @@ |
55 |
# ChangeLog for media-libs/mesa |
56 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
57 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.294 2010/10/21 01:06:53 ranger Exp $ |
58 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.295 2010/11/28 21:36:51 chithanh Exp $ |
59 |
+ |
60 |
+*mesa-7.9 (28 Nov 2010) |
61 |
+ |
62 |
+ 28 Nov 2010; Chí-Thanh Christopher Nguyễn <chithanh@g.o> |
63 |
+ +mesa-7.9.ebuild, +files/eselect-mesa.conf.7.9: |
64 |
+ Version bump, bug #341097 |
65 |
|
66 |
21 Oct 2010; Brent Baude <ranger@g.o> ChangeLog: |
67 |
Marking mesa-7.8.2 ppc stable for bug 239063 |
68 |
|
69 |
|
70 |
|
71 |
1.1 media-libs/mesa/mesa-7.9.ebuild |
72 |
|
73 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-7.9.ebuild?rev=1.1&view=markup |
74 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-7.9.ebuild?rev=1.1&content-type=text/plain |
75 |
|
76 |
Index: mesa-7.9.ebuild |
77 |
=================================================================== |
78 |
# Copyright 1999-2010 Gentoo Foundation |
79 |
# Distributed under the terms of the GNU General Public License v2 |
80 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-7.9.ebuild,v 1.1 2010/11/28 21:36:51 chithanh Exp $ |
81 |
|
82 |
EAPI=3 |
83 |
|
84 |
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
85 |
|
86 |
if [[ ${PV} = 9999* ]]; then |
87 |
GIT_ECLASS="git" |
88 |
EXPERIMENTAL="true" |
89 |
fi |
90 |
|
91 |
inherit base autotools multilib flag-o-matic toolchain-funcs ${GIT_ECLASS} |
92 |
|
93 |
OPENGL_DIR="xorg-x11" |
94 |
|
95 |
MY_PN="${PN/m/M}" |
96 |
MY_P="${MY_PN}-${PV/_/-}" |
97 |
MY_SRC_P="${MY_PN}Lib-${PV/_/-}" |
98 |
|
99 |
FOLDER="${PV/_rc*/}" |
100 |
[[ ${PV/_rc*/} == ${PV} ]] || FOLDER+="/RC" |
101 |
|
102 |
DESCRIPTION="OpenGL-like graphic library for Linux" |
103 |
HOMEPAGE="http://mesa3d.sourceforge.net/" |
104 |
|
105 |
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
106 |
if [[ $PV = 9999* ]]; then |
107 |
SRC_URI="${SRC_PATCHES}" |
108 |
else |
109 |
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
110 |
${SRC_PATCHES}" |
111 |
fi |
112 |
|
113 |
LICENSE="LGPL-2 kilgard" |
114 |
SLOT="0" |
115 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
116 |
|
117 |
INTEL_CARDS="intel" |
118 |
RADEON_CARDS="radeon" |
119 |
VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis vmware tdfx via" |
120 |
for card in ${VIDEO_CARDS}; do |
121 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
122 |
done |
123 |
|
124 |
IUSE="${IUSE_VIDEO_CARDS} |
125 |
+classic debug +gallium gles llvm motif +nptl pic selinux kernel_FreeBSD" |
126 |
|
127 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.21" |
128 |
# keep correct libdrm and dri2proto dep |
129 |
# keep blocks in rdepend for binpkg |
130 |
RDEPEND=" |
131 |
!<x11-base/xorg-server-1.7 |
132 |
!<=x11-proto/xf86driproto-2.0.3 |
133 |
>=app-admin/eselect-mesa-0.0.3 |
134 |
>=app-admin/eselect-opengl-1.1.1-r2 |
135 |
dev-libs/expat |
136 |
dev-libs/libxml2[python] |
137 |
sys-libs/talloc |
138 |
x11-libs/libICE |
139 |
>=x11-libs/libX11-1.3.99.901 |
140 |
x11-libs/libXdamage |
141 |
x11-libs/libXext |
142 |
x11-libs/libXi |
143 |
x11-libs/libXmu |
144 |
x11-libs/libXxf86vm |
145 |
motif? ( x11-libs/openmotif ) |
146 |
gallium? ( |
147 |
llvm? ( |
148 |
amd64? ( dev-libs/udis86 ) |
149 |
x86? ( dev-libs/udis86 ) |
150 |
x86-fbsd? ( dev-libs/udis86 ) |
151 |
sys-devel/llvm |
152 |
) |
153 |
) |
154 |
${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] |
155 |
" |
156 |
for card in ${INTEL_CARDS}; do |
157 |
RDEPEND="${RDEPEND} |
158 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
159 |
" |
160 |
done |
161 |
|
162 |
for card in ${RADEON_CARDS}; do |
163 |
RDEPEND="${RDEPEND} |
164 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
165 |
" |
166 |
done |
167 |
|
168 |
DEPEND="${RDEPEND} |
169 |
dev-util/pkgconfig |
170 |
x11-misc/makedepend |
171 |
>=x11-proto/dri2proto-2.2 |
172 |
>=x11-proto/glproto-1.4.11 |
173 |
x11-proto/inputproto |
174 |
>=x11-proto/xextproto-7.0.99.1 |
175 |
x11-proto/xf86driproto |
176 |
x11-proto/xf86vidmodeproto |
177 |
" |
178 |
|
179 |
S="${WORKDIR}/${MY_P}" |
180 |
|
181 |
# It is slow without texrels, if someone wants slow |
182 |
# mesa without texrels +pic use is worth the shot |
183 |
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
184 |
QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
185 |
|
186 |
# Think about: ggi, fbcon, no-X configs |
187 |
|
188 |
pkg_setup() { |
189 |
# gcc 4.2 has buggy ivopts |
190 |
if [[ $(gcc-version) = "4.2" ]]; then |
191 |
append-flags -fno-ivopts |
192 |
fi |
193 |
|
194 |
# recommended by upstream |
195 |
append-flags -ffast-math |
196 |
} |
197 |
|
198 |
src_unpack() { |
199 |
[[ $PV = 9999* ]] && git_src_unpack || base_src_unpack |
200 |
} |
201 |
|
202 |
src_prepare() { |
203 |
# apply patches |
204 |
if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
205 |
EPATCH_FORCE="yes" \ |
206 |
EPATCH_SOURCE="${WORKDIR}/patches" \ |
207 |
EPATCH_SUFFIX="patch" \ |
208 |
epatch |
209 |
fi |
210 |
# FreeBSD 6.* doesn't have posix_memalign(). |
211 |
if [[ ${CHOST} == *-freebsd6.* ]]; then |
212 |
sed -i \ |
213 |
-e "s/-DHAVE_POSIX_MEMALIGN//" \ |
214 |
configure.ac || die |
215 |
fi |
216 |
|
217 |
# In order for mesa to complete it's build process we need to use a tool |
218 |
# that it compiles. When we cross compile this clearly does not work |
219 |
# so we require mesa to be built on the host system first. -solar |
220 |
if tc-is-cross-compiler; then |
221 |
sed -i -e "s#^GLSL_CL = .*\$#GLSL_CL = glsl_compiler#g" \ |
222 |
"${S}"/src/mesa/shader/slang/library/Makefile || die |
223 |
fi |
224 |
|
225 |
[[ $PV = 9999* ]] && git_src_prepare |
226 |
base_src_prepare |
227 |
|
228 |
eautoreconf |
229 |
} |
230 |
|
231 |
src_configure() { |
232 |
local myconf |
233 |
|
234 |
if use classic; then |
235 |
# Configurable DRI drivers |
236 |
driver_enable swrast |
237 |
|
238 |
# Intel code |
239 |
driver_enable video_cards_intel i810 i915 i965 |
240 |
|
241 |
# Nouveau code |
242 |
driver_enable video_cards_nouveau nouveau |
243 |
|
244 |
# ATI code |
245 |
driver_enable video_cards_radeon radeon r200 r300 r600 |
246 |
|
247 |
driver_enable video_cards_savage savage |
248 |
driver_enable video_cards_sis sis |
249 |
driver_enable video_cards_tdfx tdfx |
250 |
driver_enable video_cards_via unichrome |
251 |
fi |
252 |
|
253 |
myconf="${myconf} $(use_enable gallium)" |
254 |
if use gallium; then |
255 |
elog "You have enabled gallium infrastructure." |
256 |
elog "This infrastructure currently support these drivers:" |
257 |
elog " Intel: works only i915 and i965 somehow." |
258 |
elog " LLVMpipe: Software renderer." |
259 |
elog " Nouveau: Support for nVidia NV30 and later cards." |
260 |
elog " Radeon: Newest implementation of r300-r700 driver." |
261 |
elog " Svga: VMWare Virtual GPU driver." |
262 |
echo |
263 |
myconf="${myconf} |
264 |
--with-state-trackers=glx,dri,egl,vega |
265 |
$(use_enable llvm gallium-llvm) |
266 |
$(use_enable gles gles1) |
267 |
$(use_enable gles gles2) |
268 |
$(use_enable gles gles-overlay) |
269 |
$(use_enable video_cards_vmware gallium-svga) |
270 |
$(use_enable video_cards_nouveau gallium-nouveau) |
271 |
$(use_enable video_cards_intel gallium-i915) |
272 |
$(use_enable video_cards_intel gallium-i965) |
273 |
$(use_enable video_cards_radeon gallium-radeon) |
274 |
$(use_enable video_cards_radeon gallium-r600)" |
275 |
else |
276 |
if use video_cards_nouveau || use video_cards_vmware; then |
277 |
elog "SVGA and nouveau drivers are available only via gallium interface." |
278 |
elog "Enable gallium useflag if you want to use them." |
279 |
fi |
280 |
fi |
281 |
|
282 |
# --with-driver=dri|xlib|osmesa || do we need osmesa? |
283 |
econf \ |
284 |
--disable-option-checking \ |
285 |
--with-driver=dri \ |
286 |
--disable-glut \ |
287 |
--without-demos \ |
288 |
--enable-xcb \ |
289 |
$(use_enable debug) \ |
290 |
$(use_enable motif glw) \ |
291 |
$(use_enable motif) \ |
292 |
$(use_enable nptl glx-tls) \ |
293 |
$(use_enable !pic asm) \ |
294 |
--with-dri-drivers=${DRI_DRIVERS} \ |
295 |
${myconf} |
296 |
} |
297 |
|
298 |
src_install() { |
299 |
base_src_install |
300 |
|
301 |
# Save the glsl-compiler for later use |
302 |
if ! tc-is-cross-compiler; then |
303 |
dobin "${S}"/src/glsl/glsl_compiler || die |
304 |
fi |
305 |
# Remove redundant headers |
306 |
# GLUT thing |
307 |
rm -f "${D}"/usr/include/GL/glut*.h || die "Removing glut include failed." |
308 |
# Glew includes |
309 |
rm -f "${D}"/usr/include/GL/{glew,glxew,wglew}.h \ |
310 |
|| die "Removing glew includes failed." |
311 |
|
312 |
# Install config file for eselect mesa |
313 |
insinto /usr/share/mesa |
314 |
newins "${FILESDIR}/eselect-mesa.conf.7.9" eselect-mesa.conf || die |
315 |
|
316 |
# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib |
317 |
# because user can eselect desired GL provider. |
318 |
ebegin "Moving libGL and friends for dynamic switching" |
319 |
dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} |
320 |
local x |
321 |
for x in "${D}"/usr/$(get_libdir)/libGL.{la,a,so*}; do |
322 |
if [ -f ${x} -o -L ${x} ]; then |
323 |
mv -f "${x}" "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \ |
324 |
|| die "Failed to move ${x}" |
325 |
fi |
326 |
done |
327 |
for x in "${D}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do |
328 |
if [ -f ${x} -o -L ${x} ]; then |
329 |
mv -f "${x}" "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \ |
330 |
|| die "Failed to move ${x}" |
331 |
fi |
332 |
done |
333 |
eend $? |
334 |
|
335 |
ebegin "Moving DRI/Gallium drivers for dynamic switching" |
336 |
local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
337 |
dodir /usr/$(get_libdir)/mesa |
338 |
for x in ${gallium_drivers[@]}; do |
339 |
if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then |
340 |
mv -f "${D}/usr/$(get_libdir)/dri/${x}" "${D}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
341 |
|| die "Failed to move ${x}" |
342 |
insinto "/usr/$(get_libdir)/dri/" |
343 |
if [ -f "${S}/$(get_libdir)/${x}" ]; then |
344 |
insopts -m0755 |
345 |
doins "${S}/$(get_libdir)/${x}" || die "failed to install ${x}" |
346 |
fi |
347 |
fi |
348 |
done |
349 |
for x in "${D}"/usr/$(get_libdir)/dri/*.so; do |
350 |
if [ -f ${x} -o -L ${x} ]; then |
351 |
mv -f "${x}" "${x/dri/mesa}" \ |
352 |
|| die "Failed to move ${x}" |
353 |
fi |
354 |
done |
355 |
pushd "${D}"/usr/$(get_libdir)/dri || die "pushd failed" |
356 |
ln -s ../mesa/*.so . || die "Creating symlink failed" |
357 |
# remove symlinks to drivers known to eselect |
358 |
for x in ${gallium_drivers[@]}; do |
359 |
if [ -f ${x} -o -L ${x} ]; then |
360 |
rm "${x}" || die "Failed to remove ${x}" |
361 |
fi |
362 |
done |
363 |
popd |
364 |
eend $? |
365 |
} |
366 |
|
367 |
pkg_postinst() { |
368 |
# Switch to the xorg implementation. |
369 |
echo |
370 |
eselect opengl set --use-old ${OPENGL_DIR} |
371 |
# Select classic/gallium drivers |
372 |
eselect mesa set --auto |
373 |
} |
374 |
|
375 |
# $1 - VIDEO_CARDS flag |
376 |
# other args - names of DRI drivers to enable |
377 |
driver_enable() { |
378 |
case $# in |
379 |
# for enabling unconditionally |
380 |
1) |
381 |
DRI_DRIVERS+=",$1" |
382 |
;; |
383 |
*) |
384 |
if use $1; then |
385 |
shift |
386 |
for i in $@; do |
387 |
DRI_DRIVERS+=",${i}" |
388 |
done |
389 |
fi |
390 |
;; |
391 |
esac |
392 |
} |