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.4.ebuild
Date: Sun, 29 Mar 2009 17:56:56
Message-Id: E1LnzFe-0000mA-FW@stork.gentoo.org
1 remi 09/03/29 17:56:54
2
3 Modified: ChangeLog
4 Added: mesa-7.4.ebuild
5 Log:
6 media-libs/mesa: bump to 7.4 with parallel make patch
7 (Portage version: 2.2_rc28/cvs/Linux i686)
8
9 Revision Changes Path
10 1.198 media-libs/mesa/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.198&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.198&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.197&r2=1.198
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
19 retrieving revision 1.197
20 retrieving revision 1.198
21 diff -u -r1.197 -r1.198
22 --- ChangeLog 26 Mar 2009 18:58:36 -0000 1.197
23 +++ ChangeLog 29 Mar 2009 17:56:54 -0000 1.198
24 @@ -1,6 +1,12 @@
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.197 2009/03/26 18:58:36 scarabeus Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.198 2009/03/29 17:56:54 remi Exp $
29 +
30 +*mesa-7.4 (29 Mar 2009)
31 +
32 + 29 Mar 2009; RĂ©mi Cardona <remi@g.o>
33 + +files/7.4-fix-parallel-make.patch, +mesa-7.4.ebuild:
34 + bump to 7.4 with parallel make patch
35
36 26 Mar 2009; Tomas Chvatal <scarabeus@g.o> mesa-7.4_rc1.ebuild:
37 We should depend on xcb? not on xcb= as usedep for libX11. Already fixed
38
39
40
41 1.1 media-libs/mesa/mesa-7.4.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/mesa-7.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/mesa-7.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mesa-7.4.ebuild
47 ===================================================================
48 # Copyright 1999-2009 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.4.ebuild,v 1.1 2009/03/29 17:56:54 remi Exp $
51
52 EAPI="2"
53
54 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
55
56 if [[ ${PV} = 9999* ]]; then
57 git_eclass="git"
58 drm_depend=">=x11-libs/libdrm-9999"
59 else
60 drm_depend=">=x11-libs/libdrm-2.4.3"
61 fi
62
63 inherit autotools multilib flag-o-matic ${git_eclass} portability
64
65 OPENGL_DIR="xorg-x11"
66
67 MY_PN="${PN/m/M}"
68 MY_P="${MY_PN}-${PV/_/-}"
69 MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
70 DESCRIPTION="OpenGL-like graphic library for Linux"
71 HOMEPAGE="http://mesa3d.sourceforge.net/"
72
73 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
74 if [[ $PV = *_rc* ]]; then
75 SRC_URI="http://www.mesa3d.org/beta/${MY_SRC_P}.tar.gz
76 ${SRC_PATCHES}"
77 elif [[ $PV = 9999* ]]; then
78 SRC_URI=""
79 else
80 SRC_URI="mirror://sourceforge/mesa3d/${MY_SRC_P}.tar.bz2
81 ${SRC_PATCHES}"
82 fi
83
84 LICENSE="LGPL-2"
85 SLOT="0"
86 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
87 IUSE_VIDEO_CARDS="
88 video_cards_intel
89 video_cards_mach64
90 video_cards_mga
91 video_cards_none
92 video_cards_r128
93 video_cards_radeon
94 video_cards_s3virge
95 video_cards_savage
96 video_cards_sis
97 video_cards_sunffb
98 video_cards_tdfx
99 video_cards_trident
100 video_cards_via"
101 IUSE="${IUSE_VIDEO_CARDS}
102 debug
103 doc
104 pic
105 motif
106 nptl
107 xcb
108 kernel_FreeBSD"
109
110 RDEPEND="${drm_depend}
111 app-admin/eselect-opengl
112 dev-libs/expat
113 x11-libs/libX11[xcb?]
114 x11-libs/libXext
115 x11-libs/libXxf86vm
116 x11-libs/libXi
117 x11-libs/libXmu
118 x11-libs/libXdamage
119 x11-libs/libICE
120 motif? ( x11-libs/openmotif )
121 doc? ( app-doc/opengl-manpages )
122 !<=x11-base/xorg-x11-6.9"
123 DEPEND="${RDEPEND}
124 !<=x11-proto/xf86driproto-2.0.3
125 dev-util/pkgconfig
126 x11-misc/makedepend
127 x11-proto/inputproto
128 x11-proto/xextproto
129 !hppa? ( x11-proto/xf86driproto )
130 >=x11-proto/dri2proto-1.99.3
131 x11-proto/xf86vidmodeproto
132 >=x11-proto/glproto-1.4.8
133 motif? ( x11-proto/printproto )"
134
135 S="${WORKDIR}/${MY_P}"
136
137 # Think about: ggi, svga, fbcon, no-X configs
138
139 pkg_setup() {
140 if use debug; then
141 append-flags -g
142 fi
143
144 # gcc 4.2 has buggy ivopts
145 if [[ $(gcc-version) = "4.2" ]]; then
146 append-flags -fno-ivopts
147 fi
148
149 # recommended by upstream
150 append-flags -ffast-math
151 }
152
153 src_unpack() {
154 [[ $PV = 9999* ]] && git_src_unpack || unpack ${A}
155 }
156
157 src_prepare() {
158 # apply patch ball if any
159 [[ -d "${WORKDIR}/patches" ]] && \
160 EPATCH_FORCE="yes" EPATCH_SOURCE="${WORKDIR}/patches" \
161 EPATCH_SUFFIX="patch" epatch
162
163 # see bug #263914
164 epatch "${FILESDIR}/7.4-fix-parallel-make.patch"
165
166 # FreeBSD 6.* doesn't have posix_memalign().
167 [[ ${CHOST} == *-freebsd6.* ]] && sed -i -e "s/-DHAVE_POSIX_MEMALIGN//" configure.ac
168
169 # Don't compile debug code with USE=-debug - bug #125004
170 if ! use debug; then
171 einfo "Removing DO_DEBUG defs in dri drivers..."
172 find src/mesa/drivers/dri -name *.[hc] -exec egrep -l "\#define\W+DO_DEBUG\W+1" {} \; | xargs sed -i -re "s/\#define\W+DO_DEBUG\W+1/\#define DO_DEBUG 0/" ;
173 fi
174
175 eautoreconf
176 }
177
178 src_configure() {
179 local myconf
180
181 # This is where we might later change to build xlib/osmesa
182 myconf="${myconf} --with-driver=dri"
183
184 # Do we want thread-local storage (TLS)?
185 myconf="${myconf} $(use_enable nptl glx-tls)"
186
187 # Configurable DRI drivers
188 driver_enable swrast
189 driver_enable video_cards_intel i810 i915 i965
190 driver_enable video_cards_mach64 mach64
191 driver_enable video_cards_mga mga
192 driver_enable video_cards_r128 r128
193 driver_enable video_cards_radeon radeon r200 r300
194 driver_enable video_cards_s3virge s3v
195 driver_enable video_cards_savage savage
196 driver_enable video_cards_sis sis
197 driver_enable video_cards_sunffb ffb
198 driver_enable video_cards_tdfx tdfx
199 driver_enable video_cards_trident trident
200 driver_enable video_cards_via unichrome
201
202 # Set drivers to everything on which we ran driver_enable()
203 myconf="${myconf} --with-dri-drivers=${DRI_DRIVERS}"
204
205 # Deactivate assembly code for pic build
206 myconf="${myconf} $(use_enable !pic asm)"
207
208 # Sparc assembly code is not working
209 myconf="${myconf} $(use_enable !sparc asm)"
210
211 myconf="${myconf} --disable-glut"
212
213 myconf="${myconf} --without-demos"
214
215 myconf="${myconf} $(use_enable xcb)"
216
217 myconf="${myconf} $(use_enable motif glw)"
218 myconf="${myconf} $(use_enable motif)"
219
220 # Get rid of glut includes
221 rm -f "${S}"/include/GL/glut*h
222
223 # Get rid of glew includes
224 rm -f "${S}"/usr/include/GL/{glew,glxew,wglew}.h
225
226 econf ${myconf}
227 }
228
229 src_install() {
230 dodir /usr
231 emake DESTDIR="${D}" install || die "Installation failed"
232
233 if ! use motif; then
234 rm "${D}"/usr/include/GL/GLwMDrawA.h
235 fi
236
237 # Don't install private headers
238 rm -f "${D}"/usr/include/GL/GLw*P.h
239
240 fix_opengl_symlinks
241 dynamic_libgl_install
242
243 # Install libtool archives
244 insinto /usr/$(get_libdir)
245 # (#67729) Needs to be lib, not $(get_libdir)
246 doins "${FILESDIR}"/lib/libGLU.la
247 sed -e "s:\${libdir}:$(get_libdir):g" "${FILESDIR}"/lib/libGL.la \
248 > "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
249
250 # On *BSD libcs dlopen() and similar functions are present directly in
251 # libc.so and does not require linking to libdl. portability eclass takes
252 # care of finding the needed library (if needed) witht the dlopen_lib
253 # function.
254 sed -i -e 's:-ldl:'$(dlopen_lib)':g' \
255 "${D}"/usr/$(get_libdir)/libGLU.la \
256 "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
257
258 # libGLU doesn't get the plain .so symlink either
259 #dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so
260
261 # Figure out why libGL.so.1.5 is built (directfb), and why it's linked to
262 # as the default libGL.so.1
263 }
264
265 pkg_postinst() {
266 switch_opengl_implem
267 }
268
269 fix_opengl_symlinks() {
270 # Remove invalid symlinks
271 local LINK
272 for LINK in $(find "${D}"/usr/$(get_libdir) \
273 -name libGL\.* -type l); do
274 rm -f ${LINK}
275 done
276 # Create required symlinks
277 if [[ ${CHOST} == *-freebsd* ]]; then
278 # FreeBSD doesn't use major.minor versioning, so the library is only
279 # libGL.so.1 and no libGL.so.1.2 is ever used there, thus only create
280 # libGL.so symlink and leave libGL.so.1 being the real thing
281 dosym libGL.so.1 /usr/$(get_libdir)/libGL.so
282 else
283 dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so
284 dosym libGL.so.1.2 /usr/$(get_libdir)/libGL.so.1
285 fi
286 }
287
288 dynamic_libgl_install() {
289 # next section is to setup the dynamic libGL stuff
290 ebegin "Moving libGL and friends for dynamic switching"
291 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include}
292 local x=""
293 for x in "${D}"/usr/$(get_libdir)/libGL.so* \
294 "${D}"/usr/$(get_libdir)/libGL.la \
295 "${D}"/usr/$(get_libdir)/libGL.a; do
296 if [ -f ${x} -o -L ${x} ]; then
297 # libGL.a cause problems with tuxracer, etc
298 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib
299 fi
300 done
301 # glext.h added for #54984
302 for x in "${D}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
303 if [ -f ${x} -o -L ${x} ]; then
304 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include
305 fi
306 done
307 eend 0
308 }
309
310 switch_opengl_implem() {
311 # Switch to the xorg implementation.
312 # Use new opengl-update that will not reset user selected
313 # OpenGL interface ...
314 echo
315 eselect opengl set --use-old ${OPENGL_DIR}
316 }
317
318 # $1 - VIDEO_CARDS flag
319 # other args - names of DRI drivers to enable
320 driver_enable() {
321 case $# in
322 # for enabling unconditionally
323 1)
324 DRI_DRIVERS="${DRI_DRIVERS},$1"
325 ;;
326 *)
327 if use $1; then
328 shift
329 for i in $@; do
330 DRI_DRIVERS="${DRI_DRIVERS},${i}"
331 done
332 fi
333 ;;
334 esac
335 }