# $Id$ PNAME="opengl-update" PVER="2.3.11" PBUILD="r1" PCAT="x11-base" DESCRIPTION="Updates your X11 OpenGL backend." HOMEPAGE="http://www.magellan-linux.de/" sminclude mbuild mtools msetfeature "!check" DEPEND=">= virtual/glibc" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" # http://oss.sgi.com/projects/ogl-sample/ABI/glext.h # http://oss.sgi.com/projects/ogl-sample/ABI/glxext.h # or the newest with opengl-2.1 at: # http://www.opengl.org/registry/api/glext.h # http://www.opengl.org/registry/api/glxext.h SRC_URI=( mirror://${PNAME}/${SRCFILE} ) preinstall() { if [[ ! -z $(magequery -n opengl-update-magellan) ]] then echo -e ${COLRED} echo -e "Error: x11-base/opengl-update-magellan is installed!!" echo -e "opengl-update-magellan was renamed to opengl-update." echo -e "Please uninstall x11-base/opengl-update-magellan first!" echo -e ${COLDEFAULT} die "x11-base/opengl-update-magellan found!" fi # the location has changed to 03opengl if [ -f ${MROOT}/etc/env.d/09opengl ] then mv ${MROOT}/etc/env.d/09opengl ${MROOT}/etc/env.d/03opengl fi if [ -e /usr/$(mlibdir)/opengl/xorg/lib/libMesaGL.so ] then echo "Removing libMesaGL.so from xorg profile." rm -f ${MROOT}/usr/$(mlibdir)/opengl/xorg/lib/libMesaGL.so fi if [ -e ${MROOT}/usr/$(mlibdir)/libMesaGL.so ] then echo "Removing libMesaGL.so from /usr/lib." rm -f ${MROOT}/usr/$(mlibdir)/libMesaGL.so fi local i for i in ${MROOT}/usr/$(mlibdir)/libGL.so.* \ ${MROOT}/usr/$(mlibdir)/libGLcore.so.* \ ${MROOT}/usr/$(mlibdir)/libnvidia-tls* \ ${MROOT}/usr/$(mlibdir)/tls/libnvidia-tls* do [[ -e ${i} ]] && rm -f ${i} done } postinstall() { local impl="$(${MROOT}/usr/sbin/opengl-update --get-implementation)" if [[ -n ${impl} ]] then ${MROOT}/usr/sbin/opengl-update ${impl} fi impl="$(${MROOT}/usr/sbin/dri-update --get-implementation)" if [[ -n ${impl} ]] then ${MROOT}/usr/sbin/dri-update ${impl} fi }