Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/mesa: mesa-7.7-r1.ebuild ChangeLog mesa-7.7.ebuild
Date: Mon, 28 Dec 2009 21:38:13
Message-Id: E1NPNHz-0001eu-Jf@stork.gentoo.org
1 scarabeus 09/12/28 21:38:07
2
3 Modified: ChangeLog
4 Added: mesa-7.7-r1.ebuild
5 Removed: mesa-7.7.ebuild
6 Log:
7 Revision bump to make sure everyone has disabled gallium intel.
8 (Portage version: 2.2_rc61/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.255 media-libs/mesa/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.255&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.255&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.254&r2=1.255
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
20 retrieving revision 1.254
21 retrieving revision 1.255
22 diff -u -r1.254 -r1.255
23 --- ChangeLog 27 Dec 2009 18:18:41 -0000 1.254
24 +++ ChangeLog 28 Dec 2009 21:38:07 -0000 1.255
25 @@ -1,6 +1,12 @@
26 # ChangeLog for media-libs/mesa
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.254 2009/12/27 18:18:41 josejx Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.255 2009/12/28 21:38:07 scarabeus Exp $
30 +
31 +*mesa-7.7-r1 (28 Dec 2009)
32 +
33 + 28 Dec 2009; Tomáš Chvátal <scarabeus@g.o> -mesa-7.7.ebuild,
34 + +mesa-7.7-r1.ebuild:
35 + Revision bump to make sure everyone has disabled gallium intel.
36
37 27 Dec 2009; Joseph Jezak <josejx@g.o> mesa-7.5.2.ebuild:
38 Marked ppc stable for bug #294958.
39
40
41
42 1.1 media-libs/mesa/mesa-7.7-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/mesa-7.7-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/mesa/mesa-7.7-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: mesa-7.7-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2009 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.7-r1.ebuild,v 1.1 2009/12/28 21:38:07 scarabeus Exp $
52
53 EAPI="2"
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 autotools multilib flag-o-matic ${GIT_ECLASS} portability
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 DESCRIPTION="OpenGL-like graphic library for Linux"
70 HOMEPAGE="http://mesa3d.sourceforge.net/"
71
72 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
73 if [[ $PV = 9999* ]]; then
74 SRC_URI="${SRC_PATCHES}"
75 else
76 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${PV/_rc*/}/${MY_SRC_P}.tar.bz2
77 ${SRC_PATCHES}"
78 fi
79
80 LICENSE="LGPL-2"
81 SLOT="0"
82 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
83
84 VIDEO_CARDS="intel mach64 mga none nouveau r128 radeon radeonhd savage sis sunffb svga tdfx via"
85 for card in ${VIDEO_CARDS}; do
86 IUSE_VIDEO_CARDS+=" video_cards_${card}"
87 done
88
89 IUSE="${IUSE_VIDEO_CARDS}
90 debug +gallium motif +nptl pic selinux +xcb kernel_FreeBSD"
91
92 # keep correct libdrm and dri2proto dep
93 # keep blocks in rdepend for binpkg
94 RDEPEND="
95 !<x11-base/xorg-server-1.7
96 !<=x11-proto/xf86driproto-2.0.3
97 >=app-admin/eselect-opengl-1.1.1-r2
98 dev-libs/expat
99 >=x11-libs/libdrm-2.4.17
100 x11-libs/libICE
101 x11-libs/libX11[xcb?]
102 x11-libs/libXdamage
103 x11-libs/libXext
104 x11-libs/libXi
105 x11-libs/libXmu
106 x11-libs/libXxf86vm
107 motif? ( x11-libs/openmotif )
108 "
109 DEPEND="${RDEPEND}
110 dev-util/pkgconfig
111 x11-misc/makedepend
112 >=x11-proto/dri2proto-1.99.3
113 >=x11-proto/glproto-1.4.8
114 x11-proto/inputproto
115 >=x11-proto/xextproto-7.0.99.1
116 x11-proto/xf86driproto
117 x11-proto/xf86vidmodeproto
118 "
119
120 S="${WORKDIR}/${MY_P}"
121
122 # Think about: ggi, svga, fbcon, no-X configs
123
124 pkg_setup() {
125 # gcc 4.2 has buggy ivopts
126 if [[ $(gcc-version) = "4.2" ]]; then
127 append-flags -fno-ivopts
128 fi
129
130 # recommended by upstream
131 append-flags -ffast-math
132 }
133
134 src_unpack() {
135 [[ $PV = 9999* ]] && git_src_unpack || unpack ${A}
136 }
137
138 src_prepare() {
139 # apply patches
140 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
141 EPATCH_FORCE="yes" \
142 EPATCH_SOURCE="${WORKDIR}/patches" \
143 EPATCH_SUFFIX="patch" \
144 epatch
145 fi
146 # FreeBSD 6.* doesn't have posix_memalign().
147 [[ ${CHOST} == *-freebsd6.* ]] && \
148 sed -i -e "s/-DHAVE_POSIX_MEMALIGN//" configure.ac
149
150 eautoreconf
151 }
152
153 src_configure() {
154 local myconf r600
155
156 # Configurable DRI drivers
157 driver_enable swrast
158 driver_enable video_cards_intel i810 i915 i965
159 driver_enable video_cards_mach64 mach64
160 driver_enable video_cards_mga mga
161 driver_enable video_cards_r128 r128
162 # ATI has two implementations as video_cards
163 driver_enable video_cards_radeon radeon r200 r300 r600
164 driver_enable video_cards_radeonhd r300 r600
165 driver_enable video_cards_savage savage
166 driver_enable video_cards_sis sis
167 driver_enable video_cards_sunffb ffb
168 driver_enable video_cards_tdfx tdfx
169 driver_enable video_cards_via unichrome
170
171 myconf="${myconf} $(use_enable gallium)"
172 if use gallium; then
173 elog "You have enabled gallium infrastructure."
174 elog "This infrastructure currently support these drivers:"
175 elog " Intel: driver not really functional, thus disabled."
176 elog " Nouveau: only available implementation. Experimental Quality."
177 elog " Radeon: implementation up to the r500. Testing Quality."
178 elog " Svga: VMWare Virtual GPU driver. Hic sunt leones."
179 echo
180 myconf="${myconf}
181 --disablegallium-intel
182 --with-state-trackers=glx,dri,egl
183 $(use_enable video_cards_svga gallium-svga)
184 $(use_enable video_cards_nouveau gallium-nouveau)"
185 #$(use_enable video_cards_intel gallium-intel)"
186 if use video_cards_radeon || use video_cards_radeonhd; then
187 myconf="${myconf} --enable-gallium-radeon"
188 else
189 myconf="${myconf} --disable-gallium-radeon"
190 fi
191 else
192 if use video_cards_nouveau || use video_cards_svga; then
193 elog "SVGA and nouveau drivers are available only via gallium interface."
194 elog "Enable gallium useflag if you insist to use them."
195 fi
196 fi
197
198 # --with-driver=dri|xlib|osmesa || do we need osmesa?
199 econf \
200 --disable-option-checking \
201 --with-driver=dri \
202 --disable-glut \
203 --without-demos \
204 $(use_enable debug) \
205 $(use_enable motif glw) \
206 $(use_enable motif) \
207 $(use_enable nptl glx-tls) \
208 $(use_enable xcb) \
209 $(use_enable !pic asm) \
210 --with-dri-drivers=${DRI_DRIVERS} \
211 ${myconf}
212 }
213
214 src_install() {
215 dodir /usr
216 emake DESTDIR="${D}" install || die "Installation failed"
217
218 # Remove redundant headers
219 # GLUT thing
220 rm -f "${D}"/usr/include/GL/glut*.h || die "Removing glut include failed."
221 # Glew includes
222 rm -f "${D}"/usr/include/GL/{glew,glxew,wglew}.h \
223 || die "Removing glew includes failed."
224
225 # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
226 # because user can eselect desired GL provider.
227 ebegin "Moving libGL and friends for dynamic switching"
228 dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include}
229 local x
230 for x in "${D}"/usr/$(get_libdir)/libGL.{la,a,so*}; do
231 if [ -f ${x} -o -L ${x} ]; then
232 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \
233 || die "Failed to move ${x}"
234 fi
235 done
236 for x in "${D}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
237 if [ -f ${x} -o -L ${x} ]; then
238 mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \
239 || die "Failed to move ${x}"
240 fi
241 done
242 eend $?
243 }
244
245 pkg_postinst() {
246 # Switch to the xorg implementation.
247 echo
248 eselect opengl set --use-old ${OPENGL_DIR}
249 }
250
251 # $1 - VIDEO_CARDS flag
252 # other args - names of DRI drivers to enable
253 driver_enable() {
254 case $# in
255 # for enabling unconditionally
256 1)
257 DRI_DRIVERS+=",$1"
258 ;;
259 *)
260 if use $1; then
261 shift
262 for i in $@; do
263 DRI_DRIVERS+=",${i}"
264 done
265 fi
266 ;;
267 esac
268 }