diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-05-28 23:35:49 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-05-28 23:35:49 +0000 |
commit | aa50ede34f98174c8a15b6944baeb593b2e39fc5 (patch) | |
tree | 776e4cf13502fb1503a7827d38865b0edfba43bf /x11-base/opengl-update | |
parent | new gob version (diff) | |
download | gentoo-2-aa50ede34f98174c8a15b6944baeb593b2e39fc5.tar.gz gentoo-2-aa50ede34f98174c8a15b6944baeb593b2e39fc5.tar.bz2 gentoo-2-aa50ede34f98174c8a15b6944baeb593b2e39fc5.zip |
add support for libGLU.so
Diffstat (limited to 'x11-base/opengl-update')
-rw-r--r-- | x11-base/opengl-update/ChangeLog | 8 | ||||
-rw-r--r-- | x11-base/opengl-update/files/digest-opengl-update-1.1 | 0 | ||||
-rw-r--r-- | x11-base/opengl-update/files/opengl-update-1.1 | 145 | ||||
-rw-r--r-- | x11-base/opengl-update/opengl-update-1.1.ebuild | 19 |
4 files changed, 171 insertions, 1 deletions
diff --git a/x11-base/opengl-update/ChangeLog b/x11-base/opengl-update/ChangeLog index 18ff5a3ebb31..f3ddfcaffc6f 100644 --- a/x11-base/opengl-update/ChangeLog +++ b/x11-base/opengl-update/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-base/opengl-update # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.1 2002/05/12 18:33:22 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.2 2002/05/28 23:35:49 azarah Exp $ + +*opengl-update-1.1 (28 May 2002) + + 28 May 2002; Martin Schlemmer <azarah@gentoo.org> opengl-update-1.1.ebuild : + + Update to also handle libGLU.so. *opengl-update-1.0 (12 May 2002) diff --git a/x11-base/opengl-update/files/digest-opengl-update-1.1 b/x11-base/opengl-update/files/digest-opengl-update-1.1 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/x11-base/opengl-update/files/digest-opengl-update-1.1 diff --git a/x11-base/opengl-update/files/opengl-update-1.1 b/x11-base/opengl-update/files/opengl-update-1.1 new file mode 100644 index 000000000000..77ec62366428 --- /dev/null +++ b/x11-base/opengl-update/files/opengl-update-1.1 @@ -0,0 +1,145 @@ +#!/bin/bash +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author: Martin Schlemmer <azarah@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/files/opengl-update-1.1,v 1.1 2002/05/28 23:35:49 azarah Exp $ + + +source /etc/init.d/functions.sh + +if [ `id -u` -ne 0 ] +then + eerror "${0}: must be root." + exit 1 +fi + +usage() { +cat << FOO +usage: opengl-update <GL implementation> + +note: + This utility switch between OpenGL implementations. Currently there + are two supported implementations, namely "xfree" and "nvidia", the + implementations for XFree86 and the NVidia drivers respectively. + +examples: + opengl-update xfree86 + This will setup things to use libGL.so from XFree86 + + opengl-update nvidia + This will setup things to use libGL.so from the NVidia drivers. + +FOO + exit 1 +} + +if [ "$#" -ne 1 ] +then + usage +fi +if [ ! -d /usr/lib/opengl/${1} ] +then + usage +else + ebegin "Switching to ${1} OpenGL interface" + + #setup the $LDPATH + echo "LDPATH=/usr/lib/opengl/${1}/lib" >/etc/env.d/09opengl + /usr/sbin/env-update &>/dev/null + + #setup the /usr/lib/libGL.so symlink + if [ -e /usr/lib/libGL.so ] + then + rm -f /usr/lib/libGL.so + fi + if [ -e /usr/lib/libGL.so.1 ] + then + rm -f /usr/lib/libGL.so.1 + fi + realname="$(readlink /usr/lib/opengl/${1}/lib/libGL.so)" + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/lib/libGL.so + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/lib/libGL.so.1 + + #setup the /usr/lib/libGLU.so symlink + if [ -e /usr/lib/libGLU.so ] + then + rm -f /usr/lib/libGLU.so + fi + if [ -e /usr/lib/libGLU.so.1 ] + then + rm -f /usr/lib/libGLU.so.1 + fi + if [ -e /usr/lib/opengl/${1}/lib/libGLU.so ] + then + realname="$(readlink /usr/lib/opengl/${1}/lib/libGLU.so)" + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/lib/libGLU.so + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/lib/libGLU.so.1 + fi + + #setup the /usr/X11R6/lib/libMesaGL.so symlink + if [ -e /usr/X11R6/lib/libMesaGL.so ] + then + rm -f /usr/X11R6/lib/libMesaGL.so + fi + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/X11R6/lib/libMesaGL.so + + #setup the /usr/lib/libGLcore.so symlink + if [ -e /usr/lib/libGLcore.so ] + then + rm -f /usr/lib/libGLcore.so + fi + if [ -e /usr/lib/libGLcore.so.1 ] + then + rm -f /usr/lib/libGLcore.so.1 + fi + if [ -e /usr/lib/opengl/${1}/lib/libGLcore.so ] + then + realname="$(readlink /usr/lib/opengl/${1}/lib/libGLcore.so)" + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/lib/libGLcore.so + ln -sf /usr/lib/opengl/${1}/lib/${realname} \ + /usr/lib/libGLcore.so.1 + fi + + #setup the /usr/X11R6/lib/modules/extensions/libglx.so symlink + if [ -e /usr/X11R6/lib/modules/extensions/libglx.so ] + then + rm -f /usr/X11R6/lib/modules/extensions/libglx.so + fi + if [ -e /usr/lib/opengl/${1}/extensions/libglx.so ] + then + ln -sf /usr/lib/opengl/${1}/extensions/libglx.so \ + /usr/X11R6/lib/modules/extensions/libglx.so + fi + #setup the /usr/X11R6/lib/modules/extensions/libglx.a symlink + if [ -e /usr/X11R6/lib/modules/extensions/libglx.a ] + then + rm -f /usr/X11R6/lib/modules/extensions/libglx.a + fi + if [ -e /usr/lib/opengl/${1}/extensions/libglx.a ] + then + ln -sf /usr/lib/opengl/${1}/extensions/libglx.a \ + /usr/X11R6/lib/modules/extensions/libglx.a + fi + + #setup the includes + for x in gl.h glx.h glxtokens.h + do + if [ -e /usr/X11R6/include/GL/${x} ] + then + rm -f /usr/X11R6/include/GL/${x} + fi + ln -sf /usr/lib/opengl/${1}/include/${x} \ + /usr/X11R6/include/GL/${x} + done + + eend 0 +fi + + +# vim:ts=4 diff --git a/x11-base/opengl-update/opengl-update-1.1.ebuild b/x11-base/opengl-update/opengl-update-1.1.ebuild new file mode 100644 index 000000000000..6d1b885444e6 --- /dev/null +++ b/x11-base/opengl-update/opengl-update-1.1.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Martin Schlemmer <azarah@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/opengl-update-1.1.ebuild,v 1.1 2002/05/28 23:35:49 azarah Exp $ + +S=${WORKDIR}/${P} +SLOT="0" +DESCRIPTION="Utility to change the OpenGL interface being used." +SRC_URI="" +HOMEPAGE="http://" + +DEPEND="" + + +src_install() { + + newsbin ${FILESDIR}/opengl-update-${PV} opengl-update +} + |