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