Gentoo Archives: gentoo-commits

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