Gentoo Archives: gentoo-commits

From: "Remi Cardona (remi)" <remi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/mesa: ChangeLog mesa-7.5.1.ebuild
Date: Fri, 04 Sep 2009 10:18:05
Message-Id: E1MjagN-0002jr-4W@stork.gentoo.org
1 remi 09/09/04 15:26:35
2
3 Modified: ChangeLog
4 Added: mesa-7.5.1.ebuild
5 Log:
6 media-libs/mesa: bump to 7.5.1
7 (Portage version: 2.2_rc40/cvs/Linux i686)
8
9 Revision Changes Path
10 1.230 media-libs/mesa/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.230&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.230&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.229&r2=1.230
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
19 retrieving revision 1.229
20 retrieving revision 1.230
21 diff -u -r1.229 -r1.230
22 --- ChangeLog 26 Aug 2009 17:33:33 -0000 1.229
23 +++ ChangeLog 4 Sep 2009 15:26:34 -0000 1.230
24 @@ -1,6 +1,11 @@
25 # ChangeLog for media-libs/mesa
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.229 2009/08/26 17:33:33 scarabeus Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.230 2009/09/04 15:26:34 remi Exp $
29 +
30 +*mesa-7.5.1 (04 Sep 2009)
31 +
32 + 04 Sep 2009; Rémi Cardona <remi@g.o> +mesa-7.5.1.ebuild:
33 + bump to 7.5.1
34
35 26 Aug 2009; Tomáš Chvátal <scarabeus@g.o> mesa-7.3-r1.ebuild:
36 Stabilise 7.3-r1 on alpha which should be the target (not the 7.4.2). They
37
38
39
40 1.1 media-libs/mesa/mesa-7.5.1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/mesa-7.5.1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/mesa-7.5.1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: mesa-7.5.1.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-7.5.1.ebuild,v 1.1 2009/09/04 15:26:34 remi Exp $
50
51 EAPI="2"
52
53 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
54
55 if [[ ${PV} = 9999* ]]; then
56 GIT_ECLASS="git"
57 EXPERIMENTAL="true"
58 IUSE_VIDEO_CARDS_UNSTABLE="video_cards_nouveau"
59 IUSE_UNSTABLE="gallium"
60 # User can also specify branch by simply adding MESA_LIVE_BRANCH="blesmrt"
61 # to the make.conf, where blesmrt is desired branch.
62 [[ -z ${MESA_LIVE_BRANCH} ]] || EGIT_BRANCH="${MESA_LIVE_BRANCH}"
63 fi
64
65 inherit autotools multilib flag-o-matic ${GIT_ECLASS} portability
66
67 OPENGL_DIR="xorg-x11"
68
69 MY_PN="${PN/m/M}"
70 MY_P="${MY_PN}-${PV/_/-}"
71 MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
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 = *_rc* ]]; then
77 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/beta/${MY_SRC_P}.tar.gz
78 ${SRC_PATCHES}"
79 elif [[ $PV = 9999* ]]; then
80 SRC_URI="${SRC_PATCHES}"
81 else
82 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${PV}/${MY_SRC_P}.tar.bz2
83 ${SRC_PATCHES}"
84 fi
85
86 LICENSE="LGPL-2"
87 SLOT="0"
88 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
89
90 IUSE_VIDEO_CARDS="${IUSE_VIDEO_CARDS_UNSTABLE}
91 video_cards_intel
92 video_cards_mach64
93 video_cards_mga
94 video_cards_none
95 video_cards_r128
96 video_cards_radeon
97 video_cards_radeonhd
98 video_cards_s3virge
99 video_cards_savage
100 video_cards_sis
101 video_cards_sunffb
102 video_cards_tdfx
103 video_cards_trident
104 video_cards_via"
105 IUSE="${IUSE_VIDEO_CARDS} ${IUSE_UNSTABLE}
106 debug doc motif nptl pic xcb kernel_FreeBSD"
107
108 # keep correct libdrm and dri2proto dep
109 # keep blocks in rdepend for binpkg
110 RDEPEND="!<=x11-base/xorg-x11-6.9
111 !<=x11-proto/xf86driproto-2.0.3
112 app-admin/eselect-opengl
113 dev-libs/expat
114 >=x11-libs/libdrm-2.4.9
115 x11-libs/libICE
116 x11-libs/libX11[xcb?]
117 x11-libs/libXdamage
118 x11-libs/libXext
119 x11-libs/libXi
120 x11-libs/libXmu
121 x11-libs/libXxf86vm
122 motif? ( x11-libs/openmotif )
123 doc? ( app-doc/opengl-manpages )
124 "
125 DEPEND="${RDEPEND}
126 dev-util/pkgconfig
127 x11-misc/makedepend
128 >=x11-proto/dri2proto-1.99.3
129 >=x11-proto/glproto-1.4.8
130 x11-proto/inputproto
131 x11-proto/xextproto
132 x11-proto/xf86driproto
133 x11-proto/xf86vidmodeproto
134 "
135 # glew depend on mesa and it is needed in runtime
136 PDEPEND=">=media-libs/glew-1.5.1"
137
138 S="${WORKDIR}/${MY_P}"
139
140 # Think about: ggi, svga, fbcon, no-X configs
141
142 pkg_setup() {
143 # gcc 4.2 has buggy ivopts
144 if [[ $(gcc-version) = "4.2" ]]; then
145 append-flags -fno-ivopts
146 fi
147
148 # recommended by upstream
149 append-flags -ffast-math
150 }
151
152 src_unpack() {
153 [[ $PV = 9999* ]] && git_src_unpack || unpack ${A}
154 }
155
156 src_prepare() {
157 # apply patches
158 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
159 EPATCH_FORCE="yes" \
160 EPATCH_SOURCE="${WORKDIR}/patches" \
161 EPATCH_SUFFIX="patch" \
162 epatch
163 fi
164 # FreeBSD 6.* doesn't have posix_memalign().
165 [[ ${CHOST} == *-freebsd6.* ]] && \
166 sed -i -e "s/-DHAVE_POSIX_MEMALIGN//" configure.ac
167
168 eautoreconf
169 }
170
171 src_configure() {
172 local myconf
173
174 # Configurable DRI drivers
175 driver_enable swrast
176 driver_enable video_cards_intel i810 i915 i965
177 driver_enable video_cards_mach64 mach64
178 driver_enable video_cards_mga mga
179 driver_enable video_cards_r128 r128
180 # ATI has two implementations as video_cards
181 driver_enable video_cards_radeon radeon r200 r300
182 driver_enable video_cards_radeonhd r300
183 driver_enable video_cards_s3virge s3v
184 driver_enable video_cards_savage savage
185 driver_enable video_cards_sis sis
186 driver_enable video_cards_sunffb ffb
187 driver_enable video_cards_tdfx tdfx
188 driver_enable video_cards_trident trident
189 driver_enable video_cards_via unichrome
190
191 # all live (experimental) stuff is wrapped around with experimental variable
192 # so the users cant get to this parts even with enabled useflags (downgrade
193 # from live to stable for example)
194 if [[ -n ${EXPERIMENTAL} ]]; then
195 # nouveau works only with gallium and intel, radeon, radeonhd can use
196 # gallium as alternative implementation (NOTE: THIS IS EXPERIMENTAL)
197 if use video_cards_nouveau && ! use gallium ; then
198 elog "Nouveau driver is available only via gallium interface."
199 elog "Enable gallium useflag if you want to use nouveau."
200 echo
201 fi
202 # state trackers, for now enable the one i want
203 # think about this bit more...
204 myconf="${myconf} $(use_enable gallium)"
205 if use gallium; then
206 elog "Warning gallium interface is highly experimental so use"
207 elog "it only if you feel really really brave."
208 elog
209 elog "Intel: works only i915."
210 elog "Nouveau: only available implementation, so no other choice"
211 elog "Radeon: not working, disabled."
212 echo
213 myconf="${myconf}
214 --with-state-trackers=glx,dri,egl
215 $(use_enable video_cards_nouveau gallium-nouveau)
216 $(use_enable video_cards_intel gallium-intel)"
217 #$(use_enable video_cards_radeon gallium-radeon)
218 #$(use_enable video_cards_radeonhd gallium-radeon)"
219 fi
220 else
221 # we need to disable the gallium since they enable by default...
222 myconf="${myconf} --disable-gallium"
223 fi
224
225 # Deactivate assembly code for pic build
226 myconf="${myconf} $(use_enable !pic asm)"
227
228 # --with-driver=dri|xlib|osmesa ; might get changed later to something
229 # else than dri
230 econf \
231 --with-driver=dri \
232 --disable-glut \
233 --without-demos \
234 $(use_enable debug) \
235 $(use_enable motif glw) \
236 $(use_enable motif) \
237 $(use_enable nptl glx-tls) \
238 $(use_enable xcb) \
239 --with-dri-drivers=${DRI_DRIVERS} \
240 ${myconf}
241 }
242
243 src_install() {
244 dodir /usr
245 emake DESTDIR="${D}" install || die "Installation failed"
246
247 # Remove redundant headers
248 # GLUT thing
249 rm -f "${D}"/usr/include/GL/glut*.h || die "Removing glut include failed."
250 # Glew includes
251 rm -f "${D}"/usr/include/GL/{glew,glxew,wglew}.h \
252 || die "Removing glew includes failed."
253
254 # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
255 # because user can eselect desired GL provider.
256 ebegin "Moving libGL and friends for dynamic switching"
257 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include}
258 local x
259 for x in "${D}"/usr/$(get_libdir)/libGL.{la,a,so*}; do
260 if [ -f ${x} -o -L ${x} ]; then
261 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \
262 || die "Failed to move ${x}"
263 fi
264 done
265 for x in "${D}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
266 if [ -f ${x} -o -L ${x} ]; then
267 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \
268 || die "Failed to move ${x}"
269 fi
270 done
271 eend $?
272
273 # Install libtool archives
274 insinto /usr/$(get_libdir)
275 # Should this use the -L/usr/lib instead of -L/usr/$(get_libdir)?
276 # Please confirm and update this comment or the file.
277 doins "${FILESDIR}"/lib/libGLU.la || die "doins libGLU.la failed"
278 sed \
279 -e "s:\${libdir}:$(get_libdir):g" \
280 "${FILESDIR}"/lib/libGL.la \
281 > "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
282
283 # On *BSD libcs dlopen() and similar functions are present directly in
284 # libc.so and does not require linking to libdl. portability eclass takes
285 # care of finding the needed library (if needed) witht the dlopen_lib
286 # function.
287 sed -i \
288 -e 's:-ldl:'$(dlopen_lib)':g' \
289 "${D}"/usr/$(get_libdir)/{libGLU.la,opengl/xorg-x11/lib/libGL.la} \
290 || die "sed dlopen failed"
291 }
292
293 pkg_postinst() {
294 # Switch to the xorg implementation.
295 echo
296 eselect opengl set --use-old ${OPENGL_DIR}
297 }
298
299 # $1 - VIDEO_CARDS flag
300 # other args - names of DRI drivers to enable
301 driver_enable() {
302 case $# in
303 # for enabling unconditionally
304 1)
305 DRI_DRIVERS="${DRI_DRIVERS},$1"
306 ;;
307 *)
308 if use $1; then
309 shift
310 for i in $@; do
311 DRI_DRIVERS="${DRI_DRIVERS},${i}"
312 done
313 fi
314 ;;
315 esac
316 }