Magellan Linux

Contents of /branches/magellan-next/core/opengl-update-magellan/opengl-update-magellan-2.2.16-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9078 - (show annotations) (download)
Wed Oct 5 11:49:40 2011 UTC (12 years, 7 months ago) by niro
File size: 1635 byte(s)
auto added: ver bump to 2.2.16-r1
1 # $Id$
2
3 PNAME="opengl-update-magellan"
4 PVER="2.2.16"
5 PBUILD="r1"
6
7 PCATEGORIE="x11-base"
8
9 DESCRIPTION="Updates your X11 OpenGL backend."
10 HOMEPAGE="http://www.magellan-linux.de/"
11
12 sminclude mbuild mtools
13
14 DEPEND=">= virtual/glibc"
15
16 SRCFILE="${PNAME}-${PVER}.tar.bz2"
17 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
18
19 # http://oss.sgi.com/projects/ogl-sample/ABI/glext.h
20 # http://oss.sgi.com/projects/ogl-sample/ABI/glxext.h
21 # or the newest with opengl-2.1 at:
22 # http://www.opengl.org/registry/api/glext.h
23 # http://www.opengl.org/registry/api/glxext.h
24 SRC_URI=( mirror://${PNAME}/${SRCFILE} )
25
26 src_compile()
27 {
28 cd ${SRCDIR}
29 mmake || die
30 }
31
32 preinstall()
33 {
34 # the location has changed to 03opengl
35 [ -f ${MROOT}/etc/env.d/09opengl ] && \
36 mv ${MROOT}/etc/env.d/09opengl ${MROOT}/etc/env.d/03opengl
37
38 if [ -e /usr/$(mlibdir)/opengl/xorg/lib/libMesaGL.so ]
39 then
40 echo "Removing libMesaGL.so from xorg profile."
41 rm -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/lib/libMesaGL.so
42 fi
43
44 if [ -e ${MROOT}/usr/$(mlibdir)/libMesaGL.so ]
45 then
46 echo "Removing libMesaGL.so from /usr/lib."
47 rm -f ${MROOT}/usr/$(mlibdir)/libMesaGL.so
48 fi
49
50 local i
51 for i in ${MROOT}/usr/$(mlibdir)/libGL.so.* \
52 ${MROOT}/usr/$(mlibdir)/libGLcore.so.* \
53 ${MROOT}/usr/$(mlibdir)/libnvidia-tls* \
54 ${MROOT}/usr/$(mlibdir)/tls/libnvidia-tls*
55 do
56 [[ -e ${i} ]] && rm -f ${i}
57 done
58 }
59
60 postinstall()
61 {
62 local impl="$(${MROOT}/usr/sbin/opengl-update --get-implementation)"
63 if [[ -n ${impl} ]]
64 then
65 ${MROOT}/usr/sbin/opengl-update ${impl}
66 fi
67 impl="$(${MROOT}/usr/sbin/dri-update --get-implementation)"
68 if [[ -n ${impl} ]]
69 then
70 ${MROOT}/usr/sbin/dri-update ${impl}
71 fi
72 }