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