summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-09-07 21:35:08 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-09-07 21:35:08 +0000
commitfd77751534f346ec482c245dac7618eec22ad6f1 (patch)
treeff956222360b832709249cd1d68627205dfd204c /x11-base/opengl-update
parentfix minor error (diff)
downloadhistorical-fd77751534f346ec482c245dac7618eec22ad6f1.tar.gz
historical-fd77751534f346ec482c245dac7618eec22ad6f1.tar.bz2
historical-fd77751534f346ec482c245dac7618eec22ad6f1.zip
new version
Diffstat (limited to 'x11-base/opengl-update')
-rw-r--r--x11-base/opengl-update/ChangeLog9
-rw-r--r--x11-base/opengl-update/files/digest-opengl-update-1.40
-rw-r--r--x11-base/opengl-update/files/opengl-update-1.4154
-rw-r--r--x11-base/opengl-update/opengl-update-1.4.ebuild20
4 files changed, 182 insertions, 1 deletions
diff --git a/x11-base/opengl-update/ChangeLog b/x11-base/opengl-update/ChangeLog
index 7bb3e9261bd8..716275e97064 100644
--- a/x11-base/opengl-update/ChangeLog
+++ b/x11-base/opengl-update/ChangeLog
@@ -1,6 +1,13 @@
# 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.5 2002/07/15 23:58:22 owen Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/ChangeLog,v 1.6 2002/09/07 21:35:08 azarah Exp $
+
+*opengl-update-1.4 (9 Sep 2002)
+
+ 9 Sep 2002; Martin Schlemmer <azarah@gentoo.org> opengl-update-1.4.ebuild :
+
+ New version that will keep user selected OpenGl implementation if "--use-old"
+ is given as first argument, followed by fallback implementation.
*opengl-update-1.3 (1 June 2002)
diff --git a/x11-base/opengl-update/files/digest-opengl-update-1.4 b/x11-base/opengl-update/files/digest-opengl-update-1.4
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/x11-base/opengl-update/files/digest-opengl-update-1.4
diff --git a/x11-base/opengl-update/files/opengl-update-1.4 b/x11-base/opengl-update/files/opengl-update-1.4
new file mode 100644
index 000000000000..6aee4a7e9b8c
--- /dev/null
+++ b/x11-base/opengl-update/files/opengl-update-1.4
@@ -0,0 +1,154 @@
+#!/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.4,v 1.1 2002/09/07 21:35:08 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 xfree
+ 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 ] && [ "$#" -eq 2 -a "$1" != "--use-old" ]
+then
+ usage
+fi
+
+GL_IMPLEM=""
+
+# Only use specified implementation if it is not already selected.
+if [ "$1" = "--use-old" ]
+then
+ shift
+
+ if [ -f /etc/env.d/09opengl ]
+ then
+ source /etc/env.d/09opengl
+ if [ -n "${LDPATH}" ]
+ then
+ GL_IMPLEM="${LDPATH/\/usr\/lib\/opengl\/}"
+ GL_IMPLEM="${GL_IMPLEM/\/lib}"
+ unset LDPATH
+ fi
+ fi
+
+ if [ -z "${GL_IMPLEM}" ]
+ then
+ GL_IMPLEM="$1"
+ fi
+else
+ GL_IMPLEM="$1"
+fi
+if [ ! -d /usr/lib/opengl/${GL_IMPLEM} ]
+then
+ usage
+else
+ ebegin "Switching to ${GL_IMPLEM} OpenGL interface"
+
+ #setup the $LDPATH
+ echo "LDPATH=/usr/lib/opengl/${GL_IMPLEM}/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/${GL_IMPLEM}/lib/libGL.so)"
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
+ /usr/lib/libGL.so
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
+ /usr/lib/libGL.so.1
+
+ #setup the /usr/X11R6/lib/libMesaGL.so symlink
+ if [ -e /usr/X11R6/lib/libMesaGL.so ]
+ then
+ rm -f /usr/X11R6/lib/libMesaGL.so
+ fi
+ realname="$(readlink /usr/lib/opengl/${GL_IMPLEM}/lib/libGL.so)"
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/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/${GL_IMPLEM}/lib/libGLcore.so ]
+ then
+ realname="$(readlink /usr/lib/opengl/${GL_IMPLEM}/lib/libGLcore.so)"
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
+ /usr/lib/libGLcore.so
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/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/${GL_IMPLEM}/extensions/libglx.so ]
+ then
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/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/${GL_IMPLEM}/extensions/libglx.a ]
+ then
+ ln -sf /usr/lib/opengl/${GL_IMPLEM}/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/${GL_IMPLEM}/include/${x} \
+ /usr/X11R6/include/GL/${x}
+ done
+
+ eend 0
+fi
+
+
+# vim:ts=4
diff --git a/x11-base/opengl-update/opengl-update-1.4.ebuild b/x11-base/opengl-update/opengl-update-1.4.ebuild
new file mode 100644
index 000000000000..bab742bf2cd5
--- /dev/null
+++ b/x11-base/opengl-update/opengl-update-1.4.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/x11-base/opengl-update/opengl-update-1.4.ebuild,v 1.1 2002/09/07 21:35:08 azarah Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Utility to change the OpenGL interface being used."
+SRC_URI=""
+HOMEPAGE="http://www.gentoo.org/"
+
+KEYWORDS="x86 ppc sparc sparc64"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="virtual/glibc"
+
+
+src_install() {
+ newsbin ${FILESDIR}/opengl-update-${PV} opengl-update
+}
+