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