[Lunar-commits] <moonbase> NVIDIA: updated to 256.53 * fixed 64bit build * gentle libglx.so care * no more binary installer * compile from source as much as possible * gcc version check to make sure binary module compatibility with kernel

Zbigniew Luszpinski zbiggy at lunar-linux.org
Sun Sep 12 17:17:53 CEST 2010


commit 8a52555844f1866943477c098b31da9aacedda88
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Sun Sep 12 17:17:53 2010 +0200

    NVIDIA: updated to 256.53
    * fixed 64bit build
    * gentle libglx.so care
    * no more binary installer
    * compile from source as much as possible
    * gcc version check to make sure binary module compatibility with kernel
---
 x11/NVIDIA/BUILD                  |  208 +++++++++++++++++++++++++++----------
 x11/NVIDIA/DEPENDS                |    2 +
 x11/NVIDIA/DETAILS                |   34 ++++--
 x11/NVIDIA/DETAILS.x86_64         |   29 ++++--
 x11/NVIDIA/POST_INSTALL           |   21 ++++
 x11/NVIDIA/POST_REMOVE            |   19 ++++
 x11/NVIDIA/PRE_BUILD              |    6 +-
 x11/NVIDIA/profile.d/nvidia_gl.rc |   11 --
 8 files changed, 242 insertions(+), 88 deletions(-)

diff --git a/x11/NVIDIA/BUILD b/x11/NVIDIA/BUILD
index 9273315..3153a60 100644
--- a/x11/NVIDIA/BUILD
+++ b/x11/NVIDIA/BUILD
@@ -1,73 +1,173 @@
 (
+  # This is installer less build script. If you find bugs let me know by e-mail: zbiggy(0)o2(period)pl
+
+  GCCKNL=`cat /proc/version | cut -d\( -f3 | cut -d\  -f3`
+  GCCNOW=`gcc --version | grep gcc | cut -d\  -f3`
+  if [ $GCCKNL != $GCCNOW ]; then
+  message "${PROBLEM_COLOR}The kernel is compiled using gcc version: $GCCKNL"
+  message "but you try to compile nvidia kernel module with"
+  message "gcc version: $GCCNOW. You can not use different"
+  message "gcc to build kernel and modules. Please lin kernel"
+  message "with current gcc, then reboot and lin nvidia driver.${DEFAULT_COLOR}"
+  exit 1
+  fi &&
 
-  cd $SOURCE_DIRECTORY &&
-  rm -f usr/X11R6/lib/modules/libnvidia-wfb* &&
-  sedit '/wfb/d' .manifest &&
-  rm -f usr/lib/libvdpau.so* \
-        usr/lib/vdpau/libvdpau_trace* &&
-  rm -rf usr/include/vdpau &&
-  sedit '/libvdpau.so/d' .manifest &&
-  sedit '/libvdpau_trace/d' .manifest &&
-  sedit '/include\/vdpau/d' .manifest &&
+  # Remove files to avoid module conflicts and
+  # make place for source compiled replacements
+  rm -f .manifest libvdpau.so* libvdpau_trace.so* \
+  vdpau*.h pkg-history.txt nvidia-installer{,.*} \
+  mkprecompiled nvidia-xconfig{,.*} nvidia-settings{,.*} \
+  libnvidia-wfb* tls_test* libGL.la &&
+
+  # Temporary paths and symlinks to make sources compilable
+  LD_LIBRARY_PATH="$SOURCE_DIRECTORY:$LD_LIBRARY_PATH" &&
+  CFLAGS=" -I$SOURCE_DIRECTORY -L$SOURCE_DIRECTORY $CFLAGS " &&
+  ln -s libGL.so.$VERSION nvidia-installer-$VERSION/libGL.so &&
+  ln -s libnvidia-glcore.so.$VERSION nvidia-installer-$VERSION/libGLcore.so.1 &&
+  ln -s libnvidia-tls.so.$VERSION nvidia-installer-$VERSION/libnvidia-tls.so.1 &&
+  mkdir GL &&
+  cp gl*.h GL &&
+
+  echo libXvMCNVIDIA_dynamic.so.1 > XvMCConfig &&
+ 
+  # Builds nvidia-installer from source
+  cd nvidia-installer-$VERSION &&
+  rm -f *Linux* &&
+
+  if [[ $(arch) == x86_64 ]] ; then
+    # Don't compile 32-bits on pure 64-bit Lunar
+    sedit 's/COMPAT_32_SRC *= */\0#/' Makefile &&
+    sedit 's/-DNV_X86_64//' Makefile
+  fi &&
 
-  # Clean up old install before doing new one
-  ./nvidia-installer --uninstall --silent &&
+  make clean &&
+  make rebuild_tls_test &&
+  make rebuild_tls_test_dso &&
+  make rebuild_rtld_test &&
+  make &&
+  if [[ $(arch) == x86_64 ]] ; then
+  install -m 755 _out/Linux_x86_64/nvidia-installer ..
+  install -m 755 _out/Linux_x86_64/mkprecompiled ..
+  install -m 644 _out/Linux_x86_64/nvidia-installer.1.gz ..
+  cp tls_test_`uname`-x86_64 ../tls_test
+  cp tls_test_dso_`uname`-x86_64.so ../tls_test_dso.so
+  else
+  install -m 755 _out/Linux_x86/nvidia-installer ..
+  install -m 755 _out/Linux_x86/mkprecompiled ..
+  install -m 644 _out/Linux_x86/nvidia-installer.1.gz ..
+  cp tls_test_`uname`-x86 ../tls_test
+  cp tls_test_dso_`uname`-x86.so ../tls_test_dso.so
+  fi &&
 
-  # We make the kernel modules on our own
-  cd $SOURCE_DIRECTORY/usr/src/nv &&
+  # Builds nvidia-settings from source
+  cd ../nvidia-settings-$VERSION &&
 
-  sedit "s:KBUILD_VERBOSE=1:KBUILD_VERBOSE=0:g" Makefile.kbuild &&
+  # xf86vmode.h has been removed in xf86vidmodeproto 2.3
+  if [[ ! -e /usr/include/X11/extensions/xf86vmode.h ]] ; then
+    sedit "s:#include <X11/extensions/xf86vmode.h>:#include <X11/extensions/xf86vmproto.h>:" src/libXNVCtrlAttributes/NvCtrlAttributes{,VidMode,Glx}.c
+  fi &&
 
-  make SYSSRC=/usr/src/linux module &&
+  make clean &&
+  make -C src/libXNVCtrl &&
+# X_CFLAGS=$CFLAGS GL_INCLUDE_PATH=$SOURCE_DIRECTORY
+  make
+  if [[ $(arch) == x86_64 ]] ; then
+  install -m 755 _out/Linux_x86_64/nvidia-settings ..
+  install -m 644 _out/Linux_x86_64/nvidia-settings.1.gz ..
+  else
+  install -m 755 _out/Linux_x86/nvidia-settings ..
+  install -m 644 _out/Linux_x86/nvidia-settings.1.gz ..
+  fi && 
+  install -m 644 doc/nvidia-settings.png .. &&
+  install -m 644 doc/nvidia-settings.desktop .. &&
+
+  # Builds nvidia-xconfig from source
+  cd ../nvidia-xconfig-$VERSION &&
+  make clean &&
+  make &&
+  if [[ $(arch) == x86_64 ]] ; then
+  install -m 755 _out/Linux_x86_64/nvidia-xconfig ..
+  install -m 644 _out/Linux_x86_64/nvidia-xconfig.1.gz ..
+  else
+  install -m 755 _out/Linux_x86/nvidia-xconfig ..
+  install -m 644 _out/Linux_x86/nvidia-xconfig.1.gz ..
+  fi &&
+  cd .. &&
+  sedit 's/__UTILS_PATH__/\/usr\/bin/' nvidia-settings.desktop &&
+  sedit 's/__PIXMAP_PATH__/\/usr\/share\/doc\/NVIDIA_GLX-1.0/' nvidia-settings.desktop &&
+  sedit 's/__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__/Settings;DesktopSettings;/' nvidia-settings.desktop &&
 
+  # We make the kernel modules on our own
+  cd kernel &&
+  sedit "s@\$\(shell uname -r\)@`readlink /usr/src/linux | cut -d- -f2`@" Makefile.* makefile &&
+# sedit "s/-O/$CFLAGS/" Makefile.nvidia &&
+# NV_VERBOSE=0 EXTRA_CFLAGS=$CFLAGS ARCH=
+  make SYSSRC=`readlink /usr/src/linux` module &&
+  rm -f $SOURCE_DIRECTORY/{libGL.so,libGLcore.so.1,libnvidia-tls.so.1} &&
+ 
   prepare_install &&
 
-  make SYSSRC=/usr/src/linux install &&
+  make SYSSRC=`readlink /usr/src/linux` install &&
+# NV_VERBOSE=0 EXTRA_CFLAGS=$CFLAGS ARCH=
+  cd .. &&
+
+  mkdir -p /etc/OpenCL/vendors &&
+  install -m0444 nvidia.icd /etc/OpenCL/vendors &&
+  install -m0755 nvidia-bug-report.sh /usr/bin &&
+  install -m0755 nvidia-installer /usr/bin &&
+  install -m0755 nvidia-settings /usr/bin &&
+  install -m0755 nvidia-smi /usr/bin &&
+  ln -sf  /usr/bin/nvidia-installer /usr/bin/nvidia-uninstall &&
+  install -m0755 nvidia-xconfig /usr/bin &&
 
-  # And let nvidia-installer handle the rest
-  cd $SOURCE_DIRECTORY &&
-  rm -rf old.libraries &&
+  mkdir -p /usr/include/CL &&
+  install -m0444 cl*.h /usr/include/CL &&
+
+  mkdir -p /usr/include/cuda &&
+  install -m0444 cuda*.h /usr/include/cuda &&
 
-  mkdir -p /usr/lib/opengl/nvidia &&
   mkdir -p /usr/include/GL/nvidia &&
-  install -m644 usr/include/GL/*.h /usr/include/GL/nvidia &&
-
-  # We need to fool the installer a little as it checks for the
-  # libraries after the installation
-  export LD_LIBRARY_PATH="/usr/lib/opengl/nvidia" &&
-
-  ./nvidia-installer --silent \
-                     --no-precompiled-interface \
-                     --no-rpms \
-                     --no-network \
-                     --no-recursion \
-                     --no-kernel-module \
-                     --no-x-check \
-                     --no-opengl-headers \
-                     --opengl-libdir=lib/opengl/nvidia &&
+  install -m0444 gl*.h /usr/include/GL/nvidia &&
 
-  # Register Nvidia XvMC library for use in any XvMC enabled media player
-  rm -f /etc/X11/XvMCConfig &&
-  touch /etc/X11/XvMCConfig &&
-  echo libXvMCNVIDIA_dynamic.so.1 > /etc/X11/XvMCConfig &&
-  chmod 644 /etc/X11/XvMCConfig &&
-
-  # Get a sane default if haven't set it yet
-  if [ "x$LUNAR_GL" == "x" ] ; then
-    set_local_config LUNAR_GL binary
-  fi &&
+  install -m0755 libnvidia-*.so.$VERSION /usr/lib &&
+  ln -sf /usr/lib/libnvidia-cfg.so.$VERSION /usr/lib/libnvidia-cfg.so.1 &&
+  ln -sf /usr/lib/libnvidia-cfg.so.1 /usr/lib/libnvidia-cfg.so &&
+
+  install -m0755 libXvMCNVIDIA.so.$VERSION /usr/lib &&
+  install -m0444 libXvMCNVIDIA.a /usr/lib &&
+  ln -sf /usr/lib/libXvMCNVIDIA.so.$VERSION /usr/lib/libXvMCNVIDIA_dynamic.so.1 &&
+  ln -sf /usr/lib/libXvMCNVIDIA_dynamic.so.1 /usr/lib/libXvMCNVIDIA_dynamic.so &&
+
+  install -m0755 libcuda.so.$VERSION /usr/lib &&
+  ln -sf /usr/lib/libcuda.so.$VERSION /usr/lib/libcuda.so.1 &&
+  ln -sf /usr/lib/libcuda.so.1 /usr/lib/libcuda.so &&
+
+  install -m0755 libGL.so.$VERSION /usr/lib &&
+
+  install -m0755 libOpenCL.so.1.0.0 /usr/lib &&
+  ln -sf /usr/lib/libOpenCL.so.1.0.0 /usr/lib/libOpenCL.so.1.0 &&
+  ln -sf /usr/lib/libOpenCL.so.1.0 /usr/lib/libOpenCL.so.1 &&
+  ln -sf /usr/lib/libOpenCL.so.1 /usr/lib/libOpenCL.so &&
 
-  # This is a temp workaround for braindead dlopen calls inside the NVIDIA
-  # libglx.so
+  mkdir -p /usr/lib/tls &&
+  install -m0755 tls/libnvidia-tls.so.$VERSION /usr/lib/tls &&
 
-  ln -sf /usr/lib/opengl/nvidia/libGLcore.so.1 \
-         /usr/lib/libGLcore.so.1 &&
+  install -m0755 libvdpau_nvidia.so.$VERSION /usr/lib/vdpau &&
+  ln -sf /usr/lib/vdpau/libvdpau_nvidia.so.$VERSION /usr/lib/vdpau/libvdpau_nvidia.so.1 &&
+  ln -sf /usr/lib/vdpau/libvdpau_nvidia.so.1 /usr/lib/libvdpau_nvidia.so &&
 
-  ln -sf /usr/lib/opengl/nvidia/tls/libnvidia-tls.so.1 \
-         /usr/lib/libnvidia-tls.so.1 &&
+  install -m0755 nvidia_drv.so /usr/lib/xorg/modules/drivers &&
+  install -m0755 libglx.so.$VERSION /usr/lib/xorg/modules/extensions &&
 
-  if !( module_installed gtk+-2 ); then
-    rm -f /usr/bin/nvidia-settings
-  fi
+  install -m0444 nvidia-settings.desktop /usr/share/applications &&
+
+  mkdir -p /usr/share/doc/NVIDIA_GLX-1.0/html &&
+  install -m0444 html/* /usr/share/doc/NVIDIA_GLX-1.0/html &&
+
+  install -m0444 README.txt nvidia-settings.png LICENSE NVIDIA_Changelog /usr/share/doc/NVIDIA_GLX-1.0 &&
+  install -m0444 nvidia-xconfig.1.gz nvidia-smi.1.gz nvidia-settings.1.gz nvidia-installer.1.gz /usr/share/man/man1 &&
+
+  # Register Nvidia XvMC library for use in any XvMC enabled media player
+  install -m644 XvMCConfig /etc/X11
 
 ) > $C_FIFO 2>&1
diff --git a/x11/NVIDIA/DEPENDS b/x11/NVIDIA/DEPENDS
index 4f1c8eb..6e26e11 100644
--- a/x11/NVIDIA/DEPENDS
+++ b/x11/NVIDIA/DEPENDS
@@ -1,3 +1,5 @@
 depends pciutils
+depends ncurses
+depends libXxf86vm
 depends libvdpau
 depends gtk+-2
diff --git a/x11/NVIDIA/DETAILS b/x11/NVIDIA/DETAILS
index f45e9f8..911f3f5 100644
--- a/x11/NVIDIA/DETAILS
+++ b/x11/NVIDIA/DETAILS
@@ -1,7 +1,10 @@
           MODULE=NVIDIA
-         VERSION=195.36.31
-          SOURCE=NVIDIA-Linux-x86-$VERSION-pkg0.run
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86-$VERSION-pkg0
+         VERSION=256.53
+          SOURCE=NVIDIA-Linux-x86-$VERSION.run
+         SOURCE2=nvidia-settings-$VERSION.tar.bz2
+         SOURCE3=nvidia-installer-$VERSION.tar.bz2
+         SOURCE4=nvidia-xconfig-$VERSION.tar.bz2
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86-$VERSION
    SOURCE_URL[0]=ftp://download.nvidia.com/XFree86/Linux-x86/$VERSION
    SOURCE_URL[1]=http://download.nvidia.com/XFree86/Linux-x86/$VERSION
    SOURCE_URL[2]=http://us.download.nvidia.com/XFree86/Linux-x86/$VERSION
@@ -20,26 +23,33 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86-$VERSION-pkg0
   SOURCE_URL[15]=http://it.download.nvidia.com/XFree86/Linux-x86/$VERSION
   SOURCE_URL[16]=http://br.download.nvidia.com/XFree86/Linux-x86/$VERSION
   SOURCE_URL[17]=http://la.download.nvidia.com/XFree86/Linux-x86/$VERSION
-      SOURCE_VFY=sha1:9c65277ea7cceec900967e15a04629daba06ef45
-        WEB_SITE=http://www.nvidia.com
+     SOURCE2_URL=http://cgit.freedesktop.org/~aplattner/nvidia-settings/snapshot
+     SOURCE3_URL=http://cgit.freedesktop.org/~aplattner/nvidia-installer/snapshot
+     SOURCE4_URL=http://cgit.freedesktop.org/~aplattner/nvidia-xconfig/snapshot
+      SOURCE_VFY=sha1:ecebed7c07368f6e0fe09aead042e234db0ac559
+     SOURCE2_VFY=sha1:384c86014403037f6f1caa5be97dae5061abfca0
+     SOURCE3_VFY=sha1:73b8f0c05bae0a7931a72c1bee0384fb94762ec6
+     SOURCE4_VFY=sha1:b7607bf0c5539b77a679befc5c78b23fe215cbb4
+        WEB_SITE=http://www.nvidia.com/
          LICENSE="proprietary"
          ENTERED=20030804
-         UPDATED=20100616
-           SHORT="X11 NVIDIA binary driver for Geforce6/7/8/9/GT2xx"
-
+         UPDATED=20100905
+           SHORT="X11 NVIDIA binary beta driver for Geforce 6/7/8/9/GT2xx"
+KEEP_SOURCE=on
 cat << EOF
 These are the nvidia provided binary X11 drivers for their graphics
-cards. It also has the Linux kernel module needed for all Geforce 6/7/8/9/GT2xx
-cards. Supported GPUs: (6/7/8/9/GT2xx families only)
+cards. It also has the Linux kernel module needed for Geforce 6/7/8/9/GT2xx
+cards. Supported GPUs: (6/7/8/9/GTX 2xx families only)
 all Geforce 6xxx
 all Geforce 7xxx
 all Geforce 8xxx
 all Geforce 9xxx
-all Geforce GT2xx
+GeForce GTX 260
+GeForce GTX 280
 some models may be not supported yet.
 
 If you have RIVA/Vanta/TNT/Geforce1/Quadro1-2/Geforce2 (not MX)
 check NVIDIA-old module.
 If you have Geforce 2MX/3/4 check NVIDIA-legacy module.
-If you have Geforce FX/PCX check NVIDIA-fx module.
+If you have Geforce FX check NVIDIA-fx module.
 EOF
diff --git a/x11/NVIDIA/DETAILS.x86_64 b/x11/NVIDIA/DETAILS.x86_64
index 7731e0f..01c4ba8 100644
--- a/x11/NVIDIA/DETAILS.x86_64
+++ b/x11/NVIDIA/DETAILS.x86_64
@@ -1,7 +1,10 @@
           MODULE=NVIDIA
-         VERSION=195.36.31
-          SOURCE=NVIDIA-Linux-x86_64-$VERSION-pkg0.run
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86_64-$VERSION-pkg0
+         VERSION=256.53
+          SOURCE=NVIDIA-Linux-x86_64-$VERSION-no-compat32.run
+         SOURCE2=nvidia-settings-$VERSION.tar.bz2
+         SOURCE3=nvidia-installer-$VERSION.tar.bz2
+         SOURCE4=nvidia-xconfig-$VERSION.tar.bz2
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86_64-$VERSION-no-compat32
    SOURCE_URL[0]=ftp://download.nvidia.com/XFree86/Linux-x86_64/$VERSION
    SOURCE_URL[1]=http://download.nvidia.com/XFree86/Linux-x86_64/$VERSION
    SOURCE_URL[2]=http://us.download.nvidia.com/XFree86/Linux-x86_64/$VERSION
@@ -20,27 +23,33 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86_64-$VERSION-pkg0
   SOURCE_URL[15]=http://it.download.nvidia.com/XFree86/Linux-x86_64/$VERSION
   SOURCE_URL[16]=http://br.download.nvidia.com/XFree86/Linux-x86_64/$VERSION
   SOURCE_URL[17]=http://la.download.nvidia.com/XFree86/Linux-x86_64/$VERSION
-      SOURCE_VFY=sha1:237449311584b23c5ed6deee7602d8e4c913e4ff
-        WEB_SITE=http://www.nvidia.com
+     SOURCE2_URL=http://cgit.freedesktop.org/~aplattner/nvidia-settings/snapshot
+     SOURCE3_URL=http://cgit.freedesktop.org/~aplattner/nvidia-installer/snapshot
+     SOURCE4_URL=http://cgit.freedesktop.org/~aplattner/nvidia-xconfig/snapshot
+      SOURCE_VFY=sha1:5a7133a19337b9bc5a77b9f56e8d3929ad4420cd
+     SOURCE2_VFY=sha1:384c86014403037f6f1caa5be97dae5061abfca0
+     SOURCE3_VFY=sha1:73b8f0c05bae0a7931a72c1bee0384fb94762ec6
+     SOURCE4_VFY=sha1:b7607bf0c5539b77a679befc5c78b23fe215cbb4
+        WEB_SITE=http://www.nvidia.com/
          LICENSE="proprietary"
          ENTERED=20030804
-         UPDATED=20100616
+         UPDATED=20100905
            SHORT="X11 NVIDIA binary driver for Geforce 6/7/8/9/GT2xx"
 
-PSAFE=no
 cat << EOF
 These are the nvidia provided binary X11 drivers for their graphics
 cards. It also has the Linux kernel module needed for all Geforce 6/7/8/9/GT2xx
-cards. Supported GPUs: (6/7/8/9/GT2xx families only)
+cards. Supported GPUs: (6/7/8/9/GTX 2xx families only)
 all Geforce 6xxx
 all Geforce 7xxx
 all Geforce 8xxx
 all Geforce 9xxx
-all Geforce GT2xx
+GeForce GTX 260
+GeForce GTX 280
 some models may be not supported yet.
 
 If you have RIVA/Vanta/TNT/Geforce1/Quadro1-2/Geforce2 (not MX)
 check NVIDIA-old module.
 If you have Geforce 2MX/3/4 check NVIDIA-legacy module.
-If you have Geforce FX/PCX check NVIDIA-fx module.
+If you have Geforce FX check NVIDIA-fx module.
 EOF
diff --git a/x11/NVIDIA/POST_INSTALL b/x11/NVIDIA/POST_INSTALL
new file mode 100644
index 0000000..4ef7875
--- /dev/null
+++ b/x11/NVIDIA/POST_INSTALL
@@ -0,0 +1,21 @@
+# Make Nvidia OpenGL headers default:
+# This section is commented out because some applications require Mesa headers
+# Average Lunar user may not be able to handle broken compilations so we avoid this.
+#for file in `ls /usr/include/GL/nvidia`;
+#do ln -sf /usr/include/GL/nvidia/$file /usr/include/GL/$file;
+#done
+
+# Make Nvidia OpenGL libraries default:
+cd /usr/lib
+ln -sf libGL.so.$VERSION libGL.so.1
+ln -sf libGL.so.1 libGL.so
+ln -sf libnvidia-glcore.so.$VERSION libGLcore.so.1
+ln -sf libGLcore.so.1 libGLcore.so
+
+# Replace generic libglx from X server by Nvidia's one
+cd /usr/X11/lib/xorg/modules/extensions
+[ ! -h libglx.so ] && mv libglx.so libglx.so.xorg
+ln -sf libglx.so.$VERSION libglx.so
+
+# Clean up
+rm -rf $SOURCE_DIRECTORY
diff --git a/x11/NVIDIA/POST_REMOVE b/x11/NVIDIA/POST_REMOVE
new file mode 100644
index 0000000..b336012
--- /dev/null
+++ b/x11/NVIDIA/POST_REMOVE
@@ -0,0 +1,19 @@
+# Restore Mesa OpenGL headers:
+#if [[ ! -e /usr/include/GL/mesa ]] ; then
+#for file in `ls /usr/include/GL/mesa`;
+#do ln -sf /usr/include/GL/mesa/$file /usr/include/GL/$file;
+#done
+#fi
+
+# Restore Mesa OpenGL libraries:
+cd /usr/lib
+ln -sf libGL.so.1.2 libGL.so.1
+ln -sf libGL.so.1 libGL.so
+rm -f libGLcore.so*
+
+# Restore generic libglx from X server:
+cd /usr/X11/lib/xorg/modules/extensions
+ln -sf libglx.so.xorg libglx.so
+
+# Unregister Nvidia XvMC
+rm -f /etc/X11/XvMCConfig
diff --git a/x11/NVIDIA/PRE_BUILD b/x11/NVIDIA/PRE_BUILD
index 22c3ee2..ef98bbe 100644
--- a/x11/NVIDIA/PRE_BUILD
+++ b/x11/NVIDIA/PRE_BUILD
@@ -2,6 +2,10 @@
 
   cd $BUILD_DIRECTORY       &&
   rm -rf $SOURCE_DIRECTORY  &&
-  sh $SOURCE_CACHE/$SOURCE  -x
+  sh $SOURCE_CACHE/$SOURCE -x &&
+  cd $SOURCE_DIRECTORY &&
+  unpack $SOURCE2 &&
+  unpack $SOURCE3 &&
+  unpack $SOURCE4
 
 )
diff --git a/x11/NVIDIA/profile.d/nvidia_gl.rc b/x11/NVIDIA/profile.d/nvidia_gl.rc
deleted file mode 100644
index 60c63d2..0000000
--- a/x11/NVIDIA/profile.d/nvidia_gl.rc
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-source /etc/lunar/local/config
-
-if [ "$LUNAR_GL" == "binary" ] || [ "x$LUNAR_GL" == "x" ] ; then
-  if ! [ "x$LD_LIBRARY_PATH" == "x" ] ; then
-    export LD_LIBRARY_PATH="/usr/lib/opengl/nvidia:$LD_LIBRARY_PATH"
-  else
-    export LD_LIBRARY_PATH="/usr/lib/opengl/nvidia"
-  fi
-fi


More information about the Lunar-commits mailing list