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