Contents of /branches/magellan-next/core/mesa/mesa-7.10.2-r1.smage2
Parent Directory | Revision Log
Revision 7721 -
(show annotations)
(download)
Mon May 30 13:32:28 2011 UTC (13 years ago) by niro
File size: 9753 byte(s)
Mon May 30 13:32:28 2011 UTC (13 years ago) by niro
File size: 9753 byte(s)
auto added: ver bump to 7.10.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="mesa" |
4 | PVER="7.10.2" |
5 | PBUILD="r1" |
6 | |
7 | STATE="unstable" |
8 | |
9 | HOMEPAGE="http://mesa3d.sourceforge.net/" |
10 | |
11 | MESA_DEPEND=">= dev-libs/expat-2 |
12 | >= x11-libs/libX11-1.4 |
13 | >= x11-libs/libXext-1.3 |
14 | >= x11-libs/libXxf86vm-1.1 |
15 | >= x11-libs/libXi-1.4 |
16 | >= x11-libs/libXmu-1.1 |
17 | >= x11-libs/libdrm-2.4.25 |
18 | >= x11-libs/libICE-1 |
19 | >= x11-base/opengl-update-magellan-2.2.13 |
20 | >= x11-libs/libxcb-1 |
21 | >= x11-libs/libXfixes-5 |
22 | >= x11-libs/libXdamage-1" |
23 | |
24 | MESA_PROGS_DEPEND=">= virtual/glut" |
25 | |
26 | SDEPEND="${MESA_DEPEND} |
27 | ${MESA_PROGS_DEPEND} |
28 | >= dev-util/pkgconfig-0.25 |
29 | >= x11-misc/makedepend-1 |
30 | >= x11-proto/xf86vidmodeproto-2.3 |
31 | >= x11-libs/libXxf86vm-1.1 |
32 | >= x11-proto/glproto-1.4.12 |
33 | >= x11-proto/inputproto-2 |
34 | >= x11-proto/xextproto-7.2 |
35 | >= x11-proto/xf86driproto-2.1 |
36 | >= x11-proto/dri2proto-2.3 |
37 | >= x11-proto/xcb-proto-1.6 |
38 | >= x11-proto/xproto-7 |
39 | >= x11-proto/fixesproto-5 |
40 | >= x11-proto/damageproto-1.2" |
41 | |
42 | PROVIDE="virtual/opengl" |
43 | |
44 | # must be set before the include of multilib! |
45 | EMUL_LINUX_32=true |
46 | sminclude xorg mtools multilib |
47 | |
48 | # must be set *after* the include of xorg! |
49 | SRCFILE="MesaLib-${PVER/_/-}.tar.bz2" |
50 | PROGS_SRCFILE="MesaDemos-${PVER/_/-}.tar.bz2" |
51 | # libs + progs have the same SRCDIR |
52 | SRCDIR="${BUILDDIR}/Mesa-${PVER/_/-}" |
53 | |
54 | SPLIT_PACKAGES="mesa |
55 | mesa-progs |
56 | mesa-dri-swrast |
57 | mesa-dri-i810 |
58 | mesa-dri-i915 |
59 | mesa-dri-i965 |
60 | mesa-dri-mach64 |
61 | mesa-dri-mga |
62 | mesa-dri-r128 |
63 | mesa-dri-r200 |
64 | mesa-dri-r300 |
65 | mesa-dri-r600 |
66 | mesa-dri-radeon |
67 | mesa-dri-savage |
68 | mesa-dri-sis |
69 | mesa-dri-tdfx |
70 | mesa-dri-unichrome" |
71 | |
72 | SRC_URI=( |
73 | ftp://ftp.freedesktop.org/pub/mesa/${PVER}/${SRCFILE} |
74 | ftp://ftp.freedesktop.org/pub/mesa/${PVER}/${PROGS_SRCFILE} |
75 | sourceforge://mesa3d/${SRCFILE} |
76 | sourceforge://mesa3d/${PROGS_SRCFILE} |
77 | mirror://${PNAME}/${SRCFILE} |
78 | mirror://${PNAME}/${PROGS_SRCFILE} |
79 | mirror://${PNAME}/libGLU.la |
80 | mirror://${PNAME}/libGL.la |
81 | ) |
82 | |
83 | UP2DATE="updatecmd ftp://ftp.freedesktop.org/pub/mesa/current | lasttarball" |
84 | |
85 | split_info_mesa() |
86 | { |
87 | DESCRIPTION="Mesa3D OpenGL graphics library." |
88 | PCATEGORIE="media-libs" |
89 | |
90 | DEPEND="${MESA_DEPEND}" |
91 | |
92 | postinstall() |
93 | { |
94 | ${MROOT}/usr/sbin/opengl-update --use-old xorg |
95 | } |
96 | } |
97 | |
98 | split_info_mesa-progs() |
99 | { |
100 | DESCRIPTION="Mesa3D OpenGL graphics applications." |
101 | PCATEGORIE="x11-apps" |
102 | |
103 | DEPEND="${MESA_PROGS_DEPEND}" |
104 | |
105 | unset postinstall |
106 | } |
107 | |
108 | split_info_mesa-dri-swrast() |
109 | { |
110 | DESCRIPTION="Mesa Software Raster DRI driver." |
111 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
112 | } |
113 | |
114 | split_info_mesa-dri-i810() |
115 | { |
116 | DESCRIPTION="Mesa Intel i810 DRI driver." |
117 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
118 | } |
119 | |
120 | split_info_mesa-dri-i915() |
121 | { |
122 | DESCRIPTION="Mesa Intel i915 DRI driver." |
123 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
124 | } |
125 | |
126 | split_info_mesa-dri-i965() |
127 | { |
128 | DESCRIPTION="Mesa Intel i965 DRI driver." |
129 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
130 | } |
131 | |
132 | split_info_mesa-dri-mach64() |
133 | { |
134 | DESCRIPTION="Mesa ATI mach64 DRI driver." |
135 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
136 | } |
137 | |
138 | split_info_mesa-dri-mga() |
139 | { |
140 | DESCRIPTION="Mesa Matrox mga DRI driver." |
141 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
142 | } |
143 | |
144 | split_info_mesa-dri-r128() |
145 | { |
146 | DESCRIPTION="Mesa ATI Rage128 DRI driver." |
147 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
148 | } |
149 | |
150 | split_info_mesa-dri-r200() |
151 | { |
152 | DESCRIPTION="Mesa ATI Radeon r200 DRI driver." |
153 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
154 | } |
155 | |
156 | split_info_mesa-dri-r300() |
157 | { |
158 | DESCRIPTION="Mesa ATI Radeon r300 DRI driver." |
159 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
160 | } |
161 | |
162 | split_info_mesa-dri-r600() |
163 | { |
164 | DESCRIPTION="Mesa ATI Radeon r600 DRI driver." |
165 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
166 | } |
167 | |
168 | split_info_mesa-dri-radeon() |
169 | { |
170 | DESCRIPTION="Mesa ATI Radeon generic DRI driver." |
171 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
172 | } |
173 | |
174 | split_info_mesa-dri-savage() |
175 | { |
176 | DESCRIPTION="Mesa S3 Savage DRI driver." |
177 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
178 | } |
179 | |
180 | split_info_mesa-dri-sis() |
181 | { |
182 | DESCRIPTION="Mesa SIS generic DRI driver." |
183 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
184 | } |
185 | |
186 | split_info_mesa-dri-tdfx() |
187 | { |
188 | DESCRIPTION="Mesa 3DFX Voodoo DRI driver." |
189 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
190 | } |
191 | |
192 | split_info_mesa-dri-unichrome() |
193 | { |
194 | DESCRIPTION="Mesa VIA Chrome DRI driver." |
195 | DEPEND="== ${PCATEGORIE}/mesa-${PVER}" |
196 | } |
197 | |
198 | src_prepare() |
199 | { |
200 | munpack ${SRCFILE} || die |
201 | all-abis "oldmunpack ${PROGS_SRCFILE} && cp -R ${SRCDIR}/* ${SRCDIR}-$(mabi)/" || die |
202 | |
203 | # no debug code in the drives (gentoo) |
204 | all-abis '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/" ;' |
205 | |
206 | # get rid of glut includes |
207 | all-abis rm -f include/GL/glut*h || die |
208 | } |
209 | |
210 | src_compile() |
211 | { |
212 | # gallium is highly experimental, disabled atm! |
213 | mconfigure \ |
214 | --with-driver=dri \ |
215 | --with-dri-driverdir=/usr/'$(mlibdir)'/dri \ |
216 | --disable-debug \ |
217 | --disable-glut \ |
218 | --disable-ttm-api \ |
219 | --without-demos \ |
220 | --enable-glx-tls \ |
221 | --enable-asm \ |
222 | --enable-xcb \ |
223 | --enable-glw \ |
224 | --disable-gallium \ |
225 | --disable-egl \ |
226 | || die |
227 | |
228 | # only build software renderer on multilib arches |
229 | if [[ ${ARCH} = x86_64 ]] |
230 | then |
231 | only-m32 "echo 'DRI_DIRS =' >> configs/autoconf" || die |
232 | fi |
233 | |
234 | mmake || die |
235 | |
236 | # build mesa-progs |
237 | mmake -C progs/xdemos glxinfo || die |
238 | mmake -C progs/xdemos glxgears || die |
239 | } |
240 | |
241 | src_install_mesa() |
242 | { |
243 | # needed directories |
244 | minstalldir /etc/env.d || die |
245 | |
246 | mmake DESTDIR=${BINDIR} install || die |
247 | |
248 | # missing gl headers |
249 | minstallfile src/glw/GLwDrawA.h /usr/include/GL || die |
250 | |
251 | # remove private headers |
252 | rm -f ${BINDIR}/usr/include/GL/GLw*P.h || die |
253 | |
254 | for abi in ${MULTILIB_ABIS} |
255 | do |
256 | [[ ${abi} = m32 ]] && ABI_LIBDIR="lib" |
257 | [[ ${abi} = m64 ]] && ABI_LIBDIR="lib64" |
258 | cd ${SRCDIR}-${abi} |
259 | |
260 | # fix opengl-symlinks |
261 | # first remove invalid symlinks |
262 | find ${BINDIR}/usr/$(mlibdir) -name libGL\.* -type l | xargs rm -f |
263 | # now create required opengl-symlinks |
264 | mlink libGL.so.1.2 /usr/$(mlibdir)/libGL.so || die |
265 | mlink libGL.so.1.2 /usr/$(mlibdir)/libGL.so.1 || die |
266 | |
267 | # now setup dynamic opengl |
268 | minstalldir /usr/$(mlibdir)/opengl/xorg/lib || die |
269 | minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die |
270 | minstalldir /usr/$(mlibdir)/opengl/xorg/include || die |
271 | |
272 | local x |
273 | for x in ${BINDIR}/usr/$(mlibdir)/libGL.so* \ |
274 | ${BINDIR}/usr/$(mlibdir)/libGL.la \ |
275 | ${BINDIR}/usr/$(mlibdir)/libGL.a |
276 | do |
277 | if [ -f ${x} -o -L ${x} ] |
278 | then |
279 | # libGL.a cause problems with tuxracer, etc |
280 | mv -f ${x} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/lib || die "${x}" |
281 | fi |
282 | done |
283 | for x in ${BINDIR}/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h} |
284 | do |
285 | if [ -f ${x} -o -L ${x} ] |
286 | then |
287 | mv -f ${x} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/include || die "${x}" |
288 | fi |
289 | done |
290 | |
291 | # satisfy libtool |
292 | minstallfile -s libGLU.la /usr/$(mlibdir) || die |
293 | minstallfile -s libGL.la /usr/$(mlibdir)/opengl/xorg/lib || die |
294 | |
295 | # fix libdir on 64bit arches |
296 | if [[ $(mlibdir) != lib ]] |
297 | then |
298 | sed -i "s:/usr/lib:/usr/$(mlibdir):g" ${BINDIR}/usr/$(mlibdir)/libGLU.la || die |
299 | sed -i "s:/usr/lib:/usr/$(mlibdir):g" ${BINDIR}/usr/$(mlibdir)/opengl/xorg/lib/libGL.la || die |
300 | fi |
301 | |
302 | # create the two-number versioned libs (.so.#.#), since only .so.# and |
303 | # .so.#.#.# were made |
304 | local x |
305 | for x in ${BINDIR}/usr/$(mlibdir)/libGLU.so.*.*.* \ |
306 | ${BINDIR}/usr/$(mlibdir)/libGLw.so.*.*.* |
307 | do |
308 | local lib_name_dot3="$(basename $(ls ${x}))" |
309 | local lib_name_dot2="${lib_name_dot3%.*}" |
310 | local lib_name_dot1="${lib_name_dot2%.*}" |
311 | local lib_name_dot0="${lib_name_dot1%.*}" |
312 | mlink ${lib_name_dot3} /usr/$(mlibdir)/${lib_name_dot2} || die "${x}" |
313 | mlink ${lib_name_dot3} /usr/$(mlibdir)/${lib_name_dot1} || die "${x}" |
314 | mlink ${lib_name_dot3} /usr/$(mlibdir)/${lib_name_dot0} || die "${x}" |
315 | done |
316 | |
317 | # export LIBGL_DRIVER_PATH location. |
318 | # we are using '/usr/lib/dri' as hardcoded location. |
319 | # but nvidia and ati are using '/usr/$(mlibdir)/xorg/modules/dri' |
320 | # LIBGL_DRIVER_PATH overwrites the hardcoded location and |
321 | # if nvidia or ati driver are installed |
322 | # the dri modules will never be found by libGL |
323 | # use "LIBGL_DEBUG=verbose glxinfo" to check this issue |
324 | echo "LIBGL_DRIVERS_PATH=/usr/$(mlibdir)/dri" > ${BINDIR}/etc/env.d/09mesa-${abi} || die |
325 | done |
326 | |
327 | # remove dri-drivers |
328 | rm -r ${BINDIR}/usr/$(mlibdir)/dri || die |
329 | if [[ $(mlibdir) != lib ]] |
330 | then |
331 | rm -r ${BINDIR}/usr/lib/dri || die |
332 | fi |
333 | } |
334 | |
335 | src_install_mesa-progs() |
336 | { |
337 | all-abis minstallexec ${SRCDIR}-$(mabi)/progs/xdemos/glxgears || die |
338 | all-abis minstallexec ${SRCDIR}-$(mabi)/progs/xdemos/glxinfo || die |
339 | } |
340 | |
341 | src_install_mesa-dri-swrast() |
342 | { |
343 | mmake -C src/mesa/drivers/dri/swrast DESTDIR=${BINDIR} install || die |
344 | } |
345 | |
346 | src_install_mesa-dri-i810() |
347 | { |
348 | mmake -C src/mesa/drivers/dri/i810 DESTDIR=${BINDIR} install || die |
349 | } |
350 | |
351 | src_install_mesa-dri-i915() |
352 | { |
353 | mmake -C src/mesa/drivers/dri/i915 DESTDIR=${BINDIR} install || die |
354 | } |
355 | |
356 | src_install_mesa-dri-i965() |
357 | { |
358 | mmake -C src/mesa/drivers/dri/i965 DESTDIR=${BINDIR} install || die |
359 | } |
360 | |
361 | src_install_mesa-dri-mach64() |
362 | { |
363 | mmake -C src/mesa/drivers/dri/mach64 DESTDIR=${BINDIR} install || die |
364 | } |
365 | src_install_mesa-dri-mga() |
366 | { |
367 | mmake -C src/mesa/drivers/dri/mga DESTDIR=${BINDIR} install || die |
368 | } |
369 | |
370 | src_install_mesa-dri-r128() |
371 | { |
372 | mmake -C src/mesa/drivers/dri/r128 DESTDIR=${BINDIR} install || die |
373 | } |
374 | |
375 | src_install_mesa-dri-r200() |
376 | { |
377 | mmake -C src/mesa/drivers/dri/r200 DESTDIR=${BINDIR} install || die |
378 | } |
379 | |
380 | src_install_mesa-dri-r300() |
381 | { |
382 | mmake -C src/mesa/drivers/dri/r300 DESTDIR=${BINDIR} install || die |
383 | } |
384 | |
385 | src_install_mesa-dri-r600() |
386 | { |
387 | mmake -C src/mesa/drivers/dri/r600 DESTDIR=${BINDIR} install || die |
388 | } |
389 | |
390 | src_install_mesa-dri-radeon() |
391 | { |
392 | mmake -C src/mesa/drivers/dri/radeon DESTDIR=${BINDIR} install || die |
393 | } |
394 | |
395 | src_install_mesa-dri-savage() |
396 | { |
397 | mmake -C src/mesa/drivers/dri/savage DESTDIR=${BINDIR} install || die |
398 | } |
399 | |
400 | src_install_mesa-dri-sis() |
401 | { |
402 | mmake -C src/mesa/drivers/dri/sis DESTDIR=${BINDIR} install || die |
403 | } |
404 | |
405 | src_install_mesa-dri-tdfx() |
406 | { |
407 | mmake -C src/mesa/drivers/dri/tdfx DESTDIR=${BINDIR} install || die |
408 | } |
409 | |
410 | src_install_mesa-dri-unichrome() |
411 | { |
412 | mmake -C src/mesa/drivers/dri/unichrome DESTDIR=${BINDIR} install || die |
413 | } |