Magellan Linux

Annotation of /trunk/core/mesa/mesa-7.6-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3301 - (hide annotations) (download)
Mon Oct 19 14:46:20 2009 UTC (14 years, 11 months ago) by niro
File size: 4980 byte(s)
auto added: ver bump to 7.6-r1
1 niro 3300 # $Id$
2    
3     PNAME="mesa"
4     PVER="7.6"
5     PBUILD="r1"
6    
7     PCATEGORIE="media-libs"
8     STATE="unstable"
9    
10     DESCRIPTION="Mesa3D OpenGL graphics library."
11     HOMEPAGE="http://mesa3d.sourceforge.net/"
12    
13     DEPEND=">= dev-libs/expat-2
14     >= x11-libs/libX11-1
15     >= x11-libs/libXext-1
16     >= x11-libs/libXxf86vm-1
17     >= x11-libs/libXi-1
18     >= x11-libs/libXmu-1
19     >= x11-libs/libdrm-2.4
20     >= x11-libs/libICE-1
21     >= x11-base/opengl-update-magellan-2.2.9
22     >= x11-libs/libxcb-1
23     >= x11-libs/libXfixes-4
24     >= x11-libs/libXdamage-1"
25    
26     SDEPEND=">= dev-util/pkgconfig-0.23
27     >= x11-misc/makedepend-1
28     >= x11-proto/xf86vidmodeproto-1
29     >= x11-proto/glproto-1.4.9
30     >= x11-proto/inputproto-1
31     >= x11-proto/xextproto-7
32     >= x11-proto/xf86driproto-2
33     >= x11-proto/dri2proto-2.0
34     >= x11-proto/xcb-proto-1
35     >= x11-proto/xproto-7
36     >= x11-proto/fixesproto-4
37     >= x11-proto/damageproto-1"
38    
39     PROVIDE="virtual/opengl"
40    
41     # must be set before the include of multilib!
42     EMUL_LINUX_32=true
43     sminclude xorg mtools multilib
44    
45     # must be set *after* the include of xorg!
46     SRCFILE="MesaLib-${PVER/_/-}.tar.gz"
47     SRCDIR="${BUILDDIR}/Mesa-${PVER/_/-}"
48    
49     SRC_URI=(
50 niro 3301 ftp://ftp.freedesktop.org/pub/mesa/${PVER}/${SRCFILE}
51 niro 3300 sourceforge://mesa3d/${SRCFILE}
52     mirror://${PNAME}/${SRCFILE}
53     mirror://${PNAME}/libGLU.la
54     mirror://${PNAME}/libGL.la
55     )
56    
57     UP2DATE="updatecmd_sourceforge mesa3d MesaLib"
58    
59     src_prepare()
60     {
61     munpack ${SRCFILE} || die
62    
63     # no debug code in the drives (gentoo)
64     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/" ;'
65    
66     # get rid of glut includes
67     all-abis rm -f include/GL/glut*h || die
68     }
69    
70     src_compile()
71     {
72     mconfigure \
73     --with-driver=dri \
74     --with-dri-driverdir=/usr/'$(mlibdir)'/dri \
75     --disable-debug \
76     --disable-glut \
77     --disable-ttm-api \
78     --without-demos \
79     --enable-glx-tls \
80     --enable-asm \
81     --enable-xcb \
82     --enable-glw \
83     || die
84    
85     # only build software renderer on multilib arches
86     if [[ ${ARCH} = x86_64 ]]
87     then
88     only-m32 "echo 'DRI_DIRS =' >> configs/autoconf" || die
89     fi
90    
91     mmake || die
92     }
93    
94     src_install()
95     {
96     # needed directories
97     minstalldir /etc/env.d || die
98    
99     mmake DESTDIR=${BINDIR} install || die
100    
101     # missing gl headers
102     minstallfile src/glw/GLwDrawA.h /usr/include/GL || die
103    
104     # remove private headers
105     rm -f ${BINDIR}/usr/include/GL/GLw*P.h || die
106    
107     for abi in ${MULTILIB_ABIS}
108     do
109     [[ ${abi} = m32 ]] && ABI_LIBDIR="lib"
110     [[ ${abi} = m64 ]] && ABI_LIBDIR="lib64"
111     cd ${SRCDIR}-${abi}
112    
113     # fix opengl-symlinks
114     # first remove invalid symlinks
115     find ${BINDIR}/usr/$(mlibdir) -name libGL\.* -type l | xargs rm -f
116     # now create required opengl-symlinks
117     mlink libGL.so.1.2 /usr/$(mlibdir)/libGL.so || die
118     mlink libGL.so.1.2 /usr/$(mlibdir)/libGL.so.1 || die
119    
120     # now setup dynamic opengl
121     minstalldir /usr/$(mlibdir)/opengl/xorg/lib || die
122     minstalldir /usr/$(mlibdir)/opengl/xorg/extensions || die
123     minstalldir /usr/$(mlibdir)/opengl/xorg/include || die
124    
125     local x
126     for x in ${BINDIR}/usr/$(mlibdir)/libGL.so* \
127     ${BINDIR}/usr/$(mlibdir)/libGL.la \
128     ${BINDIR}/usr/$(mlibdir)/libGL.a
129     do
130     if [ -f ${x} -o -L ${x} ]
131     then
132     # libGL.a cause problems with tuxracer, etc
133     mv -f ${x} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/lib || die "${x}"
134     fi
135     done
136     for x in ${BINDIR}/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}
137     do
138     if [ -f ${x} -o -L ${x} ]
139     then
140     mv -f ${x} ${BINDIR}/usr/$(mlibdir)/opengl/xorg/include || die "${x}"
141     fi
142     done
143    
144     # satisfy libtool
145     minstallfile -s libGLU.la /usr/$(mlibdir) || die
146     minstallfile -s libGL.la /usr/$(mlibdir)/opengl/xorg/lib || die
147    
148     # fix libdir on 64bit arches
149     if [[ $(mlibdir) != lib ]]
150     then
151     sed -i "s:/usr/lib:/usr/$(mlibdir):g" ${BINDIR}/usr/$(mlibdir)/libGLU.la || die
152     sed -i "s:/usr/lib:/usr/$(mlibdir):g" ${BINDIR}/usr/$(mlibdir)/opengl/xorg/lib/libGL.la || die
153     fi
154    
155     # create the two-number versioned libs (.so.#.#), since only .so.# and
156     # .so.#.#.# were made
157     local x
158     for x in ${BINDIR}/usr/$(mlibdir)/libGLU.so.*.*.* \
159     ${BINDIR}/usr/$(mlibdir)/libGLw.so.*.*.*
160     do
161     local lib_name_dot3="$(basename $(ls ${x}))"
162     local lib_name_dot2="${lib_name_dot3%.*}"
163     local lib_name_dot1="${lib_name_dot2%.*}"
164     local lib_name_dot0="${lib_name_dot1%.*}"
165     mlink ${lib_name_dot3} /usr/$(mlibdir)/${lib_name_dot2} || die "${x}"
166     mlink ${lib_name_dot3} /usr/$(mlibdir)/${lib_name_dot1} || die "${x}"
167     mlink ${lib_name_dot3} /usr/$(mlibdir)/${lib_name_dot0} || die "${x}"
168     done
169    
170     # export LIBGL_DRIVER_PATH location.
171     # we are using '/usr/lib/dri' as hardcoded location.
172     # but nvidia and ati are using '/usr/$(mlibdir)/xorg/modules/dri'
173     # LIBGL_DRIVER_PATH overwrites the hardcoded location and
174     # if nvidia or ati driver are installed
175     # the dri modules will never be found by libGL
176     # use "LIBGL_DEBUG=verbose glxinfo" to check this issue
177     echo "LIBGL_DRIVERS_PATH=/usr/$(mlibdir)/dri" > ${BINDIR}/etc/env.d/09mesa-${abi} || die
178     done
179     }
180    
181     postinstall()
182     {
183     ${MROOT}/usr/sbin/opengl-update --use-old xorg
184     }

Properties

Name Value
svn:keywords Id