summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-01-16 03:41:09 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-01-16 03:41:09 +0000
commit267c9112f91f228913c7f00ce1cbd24433c1c91f (patch)
tree0d189b423e1a4efc17a972ab56f959ab1e9b19fd /x11-base
parent*** empty log message *** (diff)
downloadgentoo-2-267c9112f91f228913c7f00ce1cbd24433c1c91f.tar.gz
gentoo-2-267c9112f91f228913c7f00ce1cbd24433c1c91f.tar.bz2
gentoo-2-267c9112f91f228913c7f00ce1cbd24433c1c91f.zip
nvidia changes
Diffstat (limited to 'x11-base')
-rwxr-xr-xx11-base/nvidia/files/nv_check.sh283
-rwxr-xr-xx11-base/nvidia/files/nvidia-setup185
-rw-r--r--x11-base/nvidia/nvidia-0.9.5-r2.ebuild63
-rw-r--r--x11-base/nvidia/nvidia-0.9.5-r3.ebuild53
4 files changed, 521 insertions, 63 deletions
diff --git a/x11-base/nvidia/files/nv_check.sh b/x11-base/nvidia/files/nv_check.sh
new file mode 100755
index 000000000000..34247dd62302
--- /dev/null
+++ b/x11-base/nvidia/files/nv_check.sh
@@ -0,0 +1,283 @@
+#!/bin/sh
+
+# NDIC Version 1.2
+# By Will Weisser (waw0573@rit.edu)
+#
+# Revision history:
+#
+# 1.2: July 23, 2000 check /etc/X11/XF86Config-4 first, don't recommend
+# removing /usr/X11R6/lib/lib*GLU.so.*
+#
+# 1.1: April 29, 2000 Added checking for /dev files
+#
+# 1.0: April 28, 2000 Initial revision
+#
+#
+
+echo "Welcome to the NVidia Driver Installation Checker."
+echo "This shell script is meant to help you debug your installation"
+echo "of the beta NVidia Linux drivers. It is not 100% foolproof."
+echo "In particular, you will definitely want to make sure you have"
+echo "the correct options in your XF86Config to make X work properly."
+echo "This script cannot debug your X setup. That being said, it"
+echo "should prove useful if are having problems with the drivers and"
+echo "want to check the validity of your driver install."
+echo ""
+echo "At no time will this script EVER make changes to your system."
+echo "It is simply a diagnostic tool - fixes of any kind will have to"
+echo "come from you."
+echo ""
+echo "Press enter to continue..."
+
+read
+
+echo "OK, the first thing we need to do is make sure your XF86Config file"
+echo "is set up correctly. In order to do this, I'm first going to try"
+echo "and find where this file might be..."
+
+FOUND=""
+
+echo "checking /usr/X11R6/lib/X11/XF86Config..."
+if [ -r /usr/X11R6/lib/X11/XF86Config ]; then
+ echo "found"
+ XF86FILE="/usr/X11R6/lib/X11/XF86Config"
+ FOUND="1"
+else
+ echo "not found"
+fi
+
+echo "checking /usr/X11R6/etc/X11/XF86Config..."
+if [ -r /usr/X11R6/etc/X11/XF86Config ]; then
+ echo "found"
+ XF86FILE="/usr/X11R6/etc/X11/XF86Config"
+ FOUND="1"
+else
+ echo "not found"
+fi
+
+echo "checking /etc/XF86Config..."
+if [ -r /etc/XF86Config ]; then
+ echo "found"
+ XF86FILE="/etc/XF86Config"
+ FOUND="1"
+else
+ echo "not found"
+fi
+
+echo "checking /etc/X11/XF86Config..."
+if [ -r /etc/X11/XF86Config ]; then
+ echo "found"
+ XF86FILE="/etc/X11/XF86Config"
+ FOUND="1"
+else
+ echo "not found"
+fi
+
+echo "checking /etc/X11/XF86Config-4..."
+if [ -r /etc/X11/XF86Config-4 ]; then
+ echo "found"
+ XF86FILE="/etc/X11/XF86Config-4"
+ FOUND="1"
+else
+ echo "not found"
+fi
+
+if [ -z $FOUND ] ; then
+ echo "I couldn't find an XF86Config file anywhere! Either you haven't set"
+ echo "up X at all, the file is not readable by you, or your file is in a"
+ echo "non-standard place. If the latter is the case, then make a symlink"
+ echo "to a standard place and run this script again."
+ exit
+fi
+
+echo "I'm going to be doing my checking using $XF86FILE. If this is not"
+echo "actually your X config, then quit this script with Ctrl-C, remove"
+echo "or rename the file, then run this script again."
+echo "Press enter to continue"
+
+read
+
+echo "I'm going to check your XF86Config file for the following things:"
+echo "1) Loading the GLcore and glx modules"
+echo "2) Specifying the nvidia driver instead of nv"
+
+REGEXP1='Load[[:space:]]*\"glx\"'
+REGEXP3='Driver[[:space:]]*\"nvidia\"'
+
+echo ""
+echo "Checking for the Load glx statement..."
+if ! cat $XF86FILE | sed -e 's/#.*//' | grep $REGEXP1 ; then
+ echo "You don't seem to have the statement: Load \"glx\""
+ echo "in the Module section of your XF86Config! By default it"
+ echo "is there, so if you removed it, replace it, then run this"
+ echo "script again."
+ exit
+fi
+
+echo "It seems to be intact. Now lets see if you're loading the correct"
+echo "video driver..."
+if ! cat $XF86FILE | sed -e 's/#.*//' | grep $REGEXP3 ; then
+ echo "You don't seem to have the statement: Driver \"nvidia\""
+ echo "in the Device section of your XF86Config! It is possible that"
+ echo "you are using the \"nv\" module instead. If this is the case,"
+ echo "then replace \"nv\" with \"nvidia\" and run this script again."
+ exit
+fi
+echo "Everything seems fine in your X config file. This is not 100%"
+echo "guaranteed to be accurate, but lets continue anyway (press enter)..."
+
+read
+
+echo "The next step involves making sure you have the proper files in"
+echo "the right places, and that the kernel module loaded correctly."
+echo "Press enter to begin the test."
+
+read
+
+echo "First lets make sure you don't have the old modules still present"
+echo "by mistake..."
+echo "Checking /usr/X11R6/lib/modules/extensions/libglx.a..."
+if [ -f /usr/X11R6/lib/modules/extensions/libglx.a ] ; then
+ echo "You seem to have a libglx.a file in your /usr/X11R6/lib/modules/extensions"
+ echo "directory. This will most likely cause a conflict with the"
+ echo "current drivers. Remove or rename this file, then run this"
+ echo "script again."
+ exit
+fi
+echo "Checking /usr/X11R6/lib/modules/extensions/libGLcore.a..."
+if [ -f /usr/X11R6/lib/modules/extensions/libGLcore.a ] ; then
+ echo "You seem to have a libGLcore.a file in your /usr/X11R6/lib/modules/extensions"
+ echo "directory. This will most likely cause a conflict with the"
+ echo "current drivers. Remove or rename this file, then run this"
+ echo "script again."
+ exit
+fi
+
+echo "You don't appear to have any conflicting older drivers. Now lets check"
+echo "if the new driver files are in place..."
+echo "Checking /usr/X11R6/lib/modules/drivers/nvidia_drv.o..."
+if ! [ -f /usr/X11R6/lib/modules/drivers/nvidia_drv.o ] ; then
+ echo "Your nvidia_drv.o file is missing! Please get this file from the"
+ echo "NVIDIA_GLX package, and install it as indicated in the FAQ, then"
+ echo "run this script again."
+ exit
+fi
+echo "Checking /usr/X11R6/lib/modules/extensions/libglx.so..."
+if ! [ -f /usr/X11R6/lib/modules/extensions/libglx.so ] ; then
+ echo "Your libglx.so file is missing! Please get this file from the"
+ echo "NVIDIA_GLX package, and install it as indicated in the FAQ, then"
+ echo "run this script again."
+ exit
+fi
+echo "Checking /usr/lib/libGL.so..."
+if ! [ -f /usr/lib/libGL.so ] ; then
+ echo "Your libGL.so file is missing! Please get this file from the"
+ echo "NVIDIA_GLX package, and install it as indicated in the FAQ, then"
+ echo "run this script again."
+ exit
+fi
+if ! ldd /usr/lib/libGL.so | grep libGLcore ; then
+ echo "Your libGL.so file does not seem to be the one from the"
+ echo "NVIDIA_GLX package! You probably forgot to install the correct"
+ echo "libGL.so and left an older copy instead. Put the libGL.so file"
+ echo "from the NVIDIA_GLX package in /usr/lib, then run this script"
+ echo "again."
+ exit
+fi
+echo "Checking /usr/lib/libGLcore.so.1..."
+if ! [ -f /usr/lib/libGLcore.so.1 ] ; then
+ echo "Your libGLcore.so.1 file is missing! Please get this file from the"
+ echo "NVIDIA_GLX package, and install it as indicated in the FAQ, then"
+ echo "run this script again."
+ exit
+fi
+echo "All the files seem to exist. Now I'm going to see if your kernel"
+echo "module is loaded correctly..."
+if ! grep NVdriver /proc/modules ; then
+ echo "the NVdriver kernel module does not seem to be loaded. The 3D"
+ echo "drivers will not work without it...please compile it for your"
+ echo "kernel, set it up to insert the module on boot, then run"
+ echo "this script again."
+ echo "Remember if you are having trouble compiling the module,"
+ echo "try adding -D_LOOSE_KERNEL_NAMES to the Makefile."
+ exit
+fi
+if ! [ -r /dev/nvidiactl ] || ! [ -w /dev/nvidiactl ] || ! [ -c /dev/nvidiactl ] ; then
+ echo "The kernel device /dev/nvidiactl does not exist, is not a device,"
+ echo "or does not have the proper permissions set. This dev entry should"
+ echo "have been created when you created the kernel module. If you"
+ echo "compiled the module by hand, you may have to create this device"
+ echo "manually (major number 195, minor number 255). After this is done,"
+ echo "please run this script again."
+ exit
+fi
+if ! [ -r /dev/nvidia0 ] || ! [ -w /dev/nvidia0 ] || ! [ -c /dev/nvidia0 ] ; then
+ echo "The kernel device /dev/nvidia0 does not exist, is not a device,"
+ echo "or does not have the proper permissions set. This dev entry should"
+ echo "have been created when you created the kernel module. If you"
+ echo "compiled the module by hand, you may have to create this device"
+ echo "manually (major number 195, minor number 0). After this is done,"
+ echo "please run this script again."
+ exit
+fi
+
+#devfs doesn't seem to have these nodes, so we disable these checks.
+
+#if ! [ -r /dev/nvidia1 ] || ! [ -w /dev/nvidia1 ] || ! [ -c /dev/nvidia1 ] ; then
+# echo "The kernel device /dev/nvidia1 does not exist, is not a device,"
+# echo "or does not have the proper permissions set. This dev entry should"
+# echo "have been created when you created the kernel module. If you"
+# echo "compiled the module by hand, you may have to create this device"
+# echo "manually (major number 195, minor number 1). After this is done,"
+# echo "please run this script again."
+# exit
+#fi
+#if ! [ -r /dev/nvidia2 ] || ! [ -w /dev/nvidia2 ] || ! [ -c /dev/nvidia2 ] ; then
+# echo "The kernel device /dev/nvidia2 does not exist, is not a device,"
+# echo "or does not have the proper permissions set. This dev entry should"
+# echo "have been created when you created the kernel module. If you"
+# echo "compiled the module by hand, you may have to create this device"
+# echo "manually (major number 195, minor number 2). After this is done,"
+# echo "please run this script again."
+# exit
+#fi
+#if ! [ -r /dev/nvidia3 ] || ! [ -w /dev/nvidia3 ] || ! [ -c /dev/nvidia3 ] ; then
+# echo "The kernel device /dev/nvidia3 does not exist, is not a device,"
+# echo "or does not have the proper permissions set. This dev entry should"
+# echo "have been created when you created the kernel module. If you"
+# echo "compiled the module by hand, you may have to create this device"
+# echo "manually (major number 195, minor number 3). After this is done,"
+# echo "please run this script again."
+# exit
+#fi
+echo "Your kernel module seems to be OK! Way to go, we're almost there now!"
+echo "Press enter to move on to the last test..."
+
+read
+
+echo "I'm going to check for duplicate OpenGL libraries on your system."
+echo "Having such libraries can cause OpenGL applications to run incorrectly."
+echo "Press enter to begin the test."
+
+read
+
+echo "Checking for libGL.so or libMesaGL.so in /lib, /usr/lib, /usr/local/lib,"
+echo "and /usr/X11R6/lib..."
+TEMP=`ls /lib/lib*GL.so* /usr/lib/libMesaGL.so* /usr/local/lib/lib*GL.so* /usr/X11R6/lib/lib*GL.so* 2> /dev/null`
+if ! [ -z "$TEMP" ] ; then
+ echo "I found the following possible conflicting files:"
+ echo `ls /lib/lib*GL.so* /usr/lib/libMesaGL.so* /usr/local/lib/lib*GL.so* /usr/X11R6/lib/lib*GL.so* 2> /dev/null`
+ echo "Unless you know what you're doing, I recommend removing these files"
+ echo "to prevent applications from using them instead of /usr/lib/libGL.so"
+ exit
+fi
+
+echo "No conflicting files were found! Your installation appears to be OK!"
+echo ""
+echo "I've done all I can...if you've gotten this far and things are still"
+echo "broken, then please e-mail linux-bugs@nvidia.com with your problem,"
+echo "or stop by #nvidia on irc.openprojects.net for help."
+echo "Don't forget that you must run /sbin/ldconfig after changing any"
+echo "shared libraries!"
+echo ""
+echo "Have a nice day!"
diff --git a/x11-base/nvidia/files/nvidia-setup b/x11-base/nvidia/files/nvidia-setup
new file mode 100755
index 000000000000..f659e9af1a94
--- /dev/null
+++ b/x11-base/nvidia/files/nvidia-setup
@@ -0,0 +1,185 @@
+#!/bin/bash
+
+source ${ROOT}/etc/rc.d/config/functions
+
+if [ "$ROOT" != "" ] || [ "$ROOT" = "/" ]
+then
+ eerror "nvidia-setup must be run under Gentoo Linux directly."
+ eerror "Please boot your system mounted at $ROOT, and then run"
+ eerror "/usr/src/nvidia/nvidia-setup. Make a note so you don't"
+ eerror "forget :)"
+ exit 1
+fi
+if [ "$DISPLAY" != "" ]
+then
+ eerror "Please make sure X is not running, then rerun nvidia-setup"
+ eerror "If X isn't running, please temporarily unset DISPLAY and"
+ eerror "run nvidia-setup again."
+ exit 1
+fi
+clear
+echo "Step 1: Selecting AGP code"
+echo
+echo "The NVdriver kernel module can be compiled to use AGPGART or NVAGP AGP access"
+echo "code. Choose the best match for your particular motherboard AGP chipset."
+echo "Here's some information about your AGP chipset that I gleaned from /proc/pci:"
+echo
+echo `cat /proc/pci | grep AGP | grep -v VGA`
+echo
+echo "Based on this information, you'll need to determine whether to use AGPGART or"
+echo "NVAGP. Here's a popular motherboard AGP chipset compatibility list:"
+cat << FOOFOO
+
+Intel: 440BX NVAGP / AGPGART (doesn't work for some people)
+ 810 NVAGP / AGPGART
+ 815(e) NVAGP / AGPGART (w/ 815 patch)
+Via: Apollo AGPGART / NVAGP
+ MVP3 AGPGART
+ MVP4 AGPGART
+ KX133 NVAGP
+ KT133 NVAGP
+ALi: ... AGPGART (2.4.0+, 2.2.18 w/ ALi patch)
+SiS: ... AGPGART
+FOOFOO
+echo
+agptype=""
+while [ "$agptype" != "a" ] && [ "$agptype" != "n" ]
+do
+ read -p "[a]GPGART or [n]VAGP > " agptype
+done
+clear
+echo "Step 2: Compiling and installing the NVdriver module"
+echo
+cd /usr/src/nvidia/NVIDIA_kernel-0.9-5
+make clean
+if [ "$agptype" = "n" ]
+then
+ make NVdriver BUILD_PARAMS=NOAGPGART
+else
+ make NVdriver
+fi
+if [ $? -ne 0 ]
+then
+ eerror "Compilation failed... exiting."
+ exit 1
+fi
+make install
+echo Compliation complete. Press any key to continue.
+read
+clear
+echo "Step 3: Setting up module stuff"
+echo
+echo "Time to modify your /etc/modules/`uname -r` file so that"
+echo "NVdriver will be autoloaded.
+echo
+echo "Press any key to begin."
+read
+modconf="/etc/modules/"`uname -r`
+
+if [ -f $modconf ] ; then
+ modtmp=/tmp/conf$$
+ sed '/^alias.*char-major-.*NVdriver/d' < $modconf > $modtmp
+ echo "alias char-major-195 NVdriver" >> $modtmp
+ mv $modtmp $modconf
+fi
+echo Modification complete. Press any key to continue.
+read
+clear
+echo "Step 4: Install accelerated OpenGL"
+echo
+echo "nVidia accelerated OpenGL libraries are now going to be installed,"
+echo "and all old Xfree86 OpenGL libraries and extensions will be backed"
+echo "up into a directory called 'old' in the directory that the original"
+echo "files existed."
+echo "Press any key to begin the accelerated OpenGL installation process."
+read
+if [ ! -e /usr/X11R6/lib/old ]
+then
+ mkdir /usr/X11R6/lib/old
+fi
+mv /usr/X11R6/lib/libGL.* /usr/X11R6/lib/old
+extdir=/usr/X11R6/lib/modules/extensions
+if [ ! -e ${extdir}/old ]
+then
+ mkdir ${extdir}/old
+fi
+if [ -e ${extdir}/libGLcore.a ]
+then
+ mv ${extdir}/libGLcore.a ${extdir}/old
+fi
+if [ -e ${extdir}/libglx.a ]
+then
+ mv ${extdir}/libglx.a ${extdir}/old
+fi
+#all the old Xfree86 files should be out of the way. Now to install the
+#nice new stuff
+cd /usr/src/nvidia/NVIDIA_GLX-0.9-5
+make ROOT=${D} install
+/sbin/ldconfig
+echo
+echo "Are you using DEVFS? If you don't know what it is, then answer no."
+echo "If you answer no, this script will create nvidia devices in /dev for you."
+echo
+devfs=""
+while [ "$devfs" != "y" ] && [ "$devfs" != "n" ]
+do
+ read -p "y/n> " devfs
+done
+if [ "$devfs" = "y" ]
+then
+ for i in 0 1 2 3 4; do
+ mknod ${D}/dev/nvidia$i c 195 $i
+ done
+ mknod ${D}/dev/nvidiactl c 195 255
+ chmod 0666 ${D}/dev/nvidia*
+fi
+echo
+echo "nVidia OpenGL libraries and devices installed."
+echo "Press any key to continue to the next step."
+read
+clear
+echo "Step 5: Final configuration"
+echo
+echo "The final configuration steps are left up to you. To use nVidia accelerated"
+echo "drivers, you must edit your /etc/X11/XF86Config, and change a line that looks"
+echo "like this:"
+echo " Driver [some text here]"
+echo
+echo "to this:
+echo " Driver \"nvidia\""
+echo
+echo "You'll also want to configure this file so that your modules section looks"
+echo "something like this:"
+cat << FOOBAR
+
+Section "Module"
+ Load "extmod"
+ Load "xie"
+ Load "dbe" # Double buffer extension
+ Load "ddc"
+ Load "type1"
+ Load "freetype"
+ Load "glx" # :)) nVidia :)) <--- WOO HOO!!!
+EndSection
+FOOBAR
+echo
+echo "Press any key to continue."
+read
+echo "Step 5: Final configuration, continued"
+echo
+echo "Additionally, if you want the nVidia kernel module to load when your system"
+echo "boots, add a single line with the word "NVdriver" on it to your"
+echo "/etc/rc.d/config/modules file."
+echo
+echo "That's about all. To verify your nVidia configuration, you can run the"
+echo "nv_check.sh script, also in the /usr/src/nvidia directory :)
+echo
+echo "Finally, run this script once every time you upgrade to a new kernel."
+echo "You'll need to run it after you've rebooted and are using the new kernel."
+echo "You can also rerun this script if your nVidia configuration somehow"
+echo "gets messed up. Again, the /usr/src/nvidia/nv_check.sh script is an"
+echo "excellent tool to diagnose such problems."
+
+echo
+echo "[DONE] :)"
+
diff --git a/x11-base/nvidia/nvidia-0.9.5-r2.ebuild b/x11-base/nvidia/nvidia-0.9.5-r2.ebuild
deleted file mode 100644
index cf50842c7bdb..000000000000
--- a/x11-base/nvidia/nvidia-0.9.5-r2.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# Author Achim Gottinger <achim@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/x11-base/nvidia/nvidia-0.9.5-r2.ebuild,v 1.2 2000/11/02 08:31:53 achim Exp $
-
-A="NVIDIA_GLX-0.9-5.tar.gz NVIDIA_kernel-0.9-5.tar.gz"
-S=${WORKDIR}
-DESCRIPTION="Accelerated X drivers for NVIDIA based cards"
-SRC_URI="ftp://ftp1.detonator.nvidia.com/pub/drivers/english/XFree86_40/0.9-5/NVIDIA_GLX-0.9-5.tar.gz
- ftp://ftp1.detonator.nvidia.com/pub/drivers/english/XFree86_40/0.9-5/NVIDIA_kernel-0.9-5.tar.gz"
-
-DEPEND=">=sys-libs/glibc-2.1.3
- >=x11-base/xfree-4.0.1"
-
-src_unpack() {
- unpack ${A}
- cd ${S}/NVIDIA_GLX-0.9-5
- cp Makefile Makefile.orig
- sed -e "s:/usr/lib:/usr/X11R6/lib:" \
- -e "s:/sbin/ldconfig::" Makefile.orig > Makefile
-}
-
-src_compile() {
- cd ${S}/NVIDIA_kernel-0.9-5
- try make NVdriver
-}
-
-src_install() {
- cd ${S}/NVIDIA_kernel-0.9-5
- insinto /lib/modules/current/misc
- doins NVdriver
- dodir /usr/lib
- dodir /usr/X11R6/lib/modules/drivers
- dodir /usr/X11R6/lib/modules/extensions
- cd ${S}/NVIDIA_GLX-0.9-5
- try make ROOT=${D} install
- preplib /usr/X11R6
- dodir /dev
- for i in 0 1 2 3 4; do
- mknod ${D}/dev/nvidia$i c 195 $i
- done
- mknod ${D}/dev/nvidiactl c 195 255
- chmod 0666 ${D}/dev/nvidia*
-}
-
-
-pkg_config() {
- if [ "${ROOT}" == "/" ] ; then
- modconf="/etc/modules/"`uname -r`
- if [ -f $modconf ] ; then
- modtmp=/tmp/conf$$
- sed '/^alias.*char-major-.*NVdriver/d' < $modconf > $modtmp
- echo "alias char-major-195 NVdriver" >> $modtmp
- mv $modtmp $modconf
- fi
- fi
-}
-
-
-
-
-
-
diff --git a/x11-base/nvidia/nvidia-0.9.5-r3.ebuild b/x11-base/nvidia/nvidia-0.9.5-r3.ebuild
new file mode 100644
index 000000000000..2cfecc4f8fd4
--- /dev/null
+++ b/x11-base/nvidia/nvidia-0.9.5-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/x11-base/nvidia/nvidia-0.9.5-r3.ebuild,v 1.1 2001/01/16 03:41:06 drobbins Exp $
+
+S=${WORKDIR}
+DESCRIPTION="Accelerated X drivers for NVIDIA based cards"
+SRC_URI="ftp://ftp1.detonator.nvidia.com/pub/drivers/english/XFree86_40/0.9-5/NVIDIA_GLX-0.9-5.tar.gz
+ ftp://ftp1.detonator.nvidia.com/pub/drivers/english/XFree86_40/0.9-5/NVIDIA_kernel-0.9-5.tar.gz"
+
+DEPEND=">=sys-libs/glibc-2.1.3 >=x11-base/xfree-4.0.1 >=media-libs/glut-3.7"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}/NVIDIA_GLX-0.9-5
+ cp Makefile Makefile.orig
+ sed -e "s:/usr/lib:/usr/X11R6/lib:" -e "s:/sbin/ldconfig::" Makefile.orig > Makefile
+
+ cd ${S}/NVIDIA_kernel-0.9-5
+ #patching to add devfs support and kernel 2.4.0 fixes
+ local x
+ for x in patch-2.4.0-PR nvidia_devfs.diff
+ do
+ cat $x | patch -p1
+ done
+}
+
+src_compile() {
+ cd ${S}/NVIDIA_kernel-0.9-5
+ try make NVdriver
+}
+
+src_install() {
+
+ #this module requires runtime configuration, as well as frequent reinstalls
+ #(as users upgrade kernels). Therefore, we install the sources and have a
+ #special script that handles compilation. This also allows our script to
+ #verify that the OpenGL libraries 'n stuff are installed correctly.
+
+ dodir /usr/src/nvidia
+ mv ${S}/NV* ${D}/usr/src/nvidia
+ exeinto /usr/src/nvidia
+ doexe ${FILESDIR}/nvidia-setup
+ doexe ${FILESDIR}/nv_check.sh
+}
+
+pkg_postinst() {
+ ${ROOT}/usr/src/nvidia/nvidia-setup
+}
+
+
+
+