[Lunar-commits] <moonbase> NVIDIA-beta: updated to 256.29 Removed nvidia_gl.rc - it does not work. New build script, whole module reworked. Prepared to become NVIDIA module when 2xx driver become official
Zbigniew Luszpinski
zbiggy at lunar-linux.org
Sun Jun 13 17:14:39 CEST 2010
commit 72d4b226ee9c60ab557350ec565df815efa0d501
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date: Sun Jun 13 17:14:39 2010 +0200
NVIDIA-beta: updated to 256.29
Removed nvidia_gl.rc - it does not work.
New build script, whole module reworked.
Prepared to become NVIDIA module when 2xx driver become official
---
x11/NVIDIA-beta/BUILD | 240 +++++++++++++++++---------------
x11/NVIDIA-beta/DEPENDS | 2 +
x11/NVIDIA-beta/DETAILS | 18 ++--
x11/NVIDIA-beta/DETAILS.x86_64 | 16 +-
x11/NVIDIA-beta/POST_INSTALL | 20 +++
x11/NVIDIA-beta/POST_REMOVE | 19 +++
x11/NVIDIA-beta/PRE_BUILD | 2 +-
x11/NVIDIA-beta/profile.d/nvidia_gl.rc | 11 --
8 files changed, 190 insertions(+), 138 deletions(-)
diff --git a/x11/NVIDIA-beta/BUILD b/x11/NVIDIA-beta/BUILD
index 8268d22..a8d3d3c 100644
--- a/x11/NVIDIA-beta/BUILD
+++ b/x11/NVIDIA-beta/BUILD
@@ -1,27 +1,27 @@
(
-
- cd $SOURCE_DIRECTORY &&
- rm -f nvidia-installer &&
- rm -f usr/bin/mkprecompiled &&
- rm -f usr/bin/tls_test &&
- rm -f usr/bin/tls_test_dso.so &&
- rm -f usr/share/man/man1/nvidia-installer.1.gz &&
- rm -f usr/bin/nvidia-settings &&
- rm -f usr/share/man/man1/nvidia-settings.1.gz &&
- rm -f usr/bin/nvidia-xconfig &&
- rm -f usr/share/man/man1/nvidia-xconfig.1.gz &&
- rm -f usr/bin/nvidia-settings/nvidia-settings &&
- if module_installed XOrg7 ; then
- rm -f usr/X11R6/lib/modules/libnvidia-wfb.so*
- fi &&
- rm -f usr/lib/libvdpau.so* &&
- rm -f usr/lib/libvdpau_trace.so* &&
- rm -rf usr/include/vdpau &&
- cd $SOURCE_DIRECTORY/nvidia-installer-$VERSION &&
- rm -f libpci.a &&
+ # This is installer less build script. If you find bugs let me know by e-mail: zbiggy(0)o2(period)pl
+
+ # 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* &&
+
+ # 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 libGL.so &&
+ ln -s libnvidia-glcore.so.$VERSION libGLcore.so.1 &&
+ ln -s libnvidia-tls.so.$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* &&
- sedit 's/Bstatic/Bdynamic/' Makefile &&
- sedit 's/Bstatic/Bdynamic/' public.mk &&
if [[ $(arch) == x86_64 ]] ; then
# Don't compile 32-bits on pure 64-bit Lunar
@@ -31,19 +31,28 @@
sedit 's/-DNV_X86_64//' public.mk
fi &&
+ sedit 's at -lGL@-I.. -L.. -lGL @' Makefile &&
make clean &&
make rebuild_tls_test &&
make rebuild_tls_test_dso &&
make rebuild_rtld_test &&
make &&
- make install ROOT=$SOURCE_DIRECTORY &&
- ARK=`uname -m | sed 's/i[3456]86/x86/'` &&
- cp tls_test_`uname`-$ARK -f $SOURCE_DIRECTORY/usr/bin/tls_test &&
- cp tls_test_dso_`uname`-$ARK.so -f $SOURCE_DIRECTORY/usr/bin/tls_test_dso.so &&
- cd .. &&
- cd $SOURCE_DIRECTORY/nvidia-settings-$VERSION &&
- sedit 's/-O -DNDEBUG/-DNDEBUG/' Makefile &&
- sedit '/CFLAGS = -Wall -g/d' src/XF86Config-parser/Makefile &&
+ 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 &&
+
+ # Builds nvidia-settings from source
+ cd ../nvidia-settings-$VERSION &&
# xf86vmode.h has been removed in xf86vidmodeproto 2.3
if [[ ! -e /usr/include/X11/extensions/xf86vmode.h ]] ; then
@@ -51,97 +60,110 @@
fi &&
make clean &&
- make &&
- make install ROOT=$SOURCE_DIRECTORY &&
- cd .. &&
- cd $SOURCE_DIRECTORY/nvidia-xconfig-$VERSION &&
- sedit '/CFLAGS += -O/d' Makefile &&
- sedit '/CFLAGS = -Wall -g/d' XF86Config-parser/Makefile &&
+ 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 &&
- make install ROOT=$SOURCE_DIRECTORY &&
+ 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/__GENERATED_BY__/nvidia-installer\:\ $VERSION/" libGL.la &&
+ sedit 's/__LIBGL_PATH__/\/usr\/lib/' libGL.la &&
+ 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 $SOURCE_DIRECTORY/usr/src/nv &&
+ 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 &&
- sedit "s:KBUILD_VERBOSE=1:KBUILD_VERBOSE=0:g" Makefile.kbuild &&
+ make SYSSRC=`readlink /usr/src/linux` install &&
+# NV_VERBOSE=0 EXTRA_CFLAGS=$CFLAGS ARCH=
+ cd .. &&
- make SYSSRC=/usr/src/linux module &&
+ 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 &&
- prepare_install &&
+ mkdir -p /usr/include/CL &&
+ install -m0444 cl*.h /usr/include/CL &&
- make SYSSRC=/usr/src/linux install &&
-
- cd $SOURCE_DIRECTORY &&
- rm -rf old.libraries &&
-
- # This is installer less build script. If you find bugs let me know: zbiggy at o2.pl
- sedit "s/__GENERATED_BY__/nvidia-installer\:\ 1.0.7/" usr/lib/libGL.la &&
- sedit "s/__LIBGL_PATH__/\/usr\/\/lib\/opengl\/nvidia/" usr/lib/libGL.la &&
- sedit "s/__UTILS_PATH__/\/usr\/bin/" usr/share/applications/nvidia-settings.desktop &&
- sedit "s/__PIXMAP_PATH__/\/usr\/share\/doc\/NVIDIA_GLX-1.0/" usr/share/applications/nvidia-settings.desktop &&
-
- mkdir -p /usr/lib/opengl/nvidia &&
-
- cd $SOURCE_DIRECTORY &&
- mkdir -p /usr/share/doc/NVIDIA_GLX-1.0/include &&
- cp -f LICENSE /usr/share/doc/NVIDIA_GLX-1.0/include &&
- cp -f usr/X11R6/lib/lib* /usr/lib &&
- cp -rf usr/X11R6/lib/modules /usr/X11/lib/xorg &&
-
- cd /usr/X11/lib/xorg/modules &&
- cd /usr/X11/lib/xorg/modules/extensions &&
- ln -sf libglx.so.$VERSION libglx.so &&
-
- cd $SOURCE_DIRECTORY &&
- cp -f usr/bin/nvidia* /usr/bin &&
- cp -rf usr/include/cuda /usr/X11/include &&
- cp -rf usr/include/GL /usr/share/doc/NVIDIA_GLX-1.0/include &&
- cp -rf usr/lib/tls /usr/lib &&
- cd /usr/lib/tls &&
- ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so.1 &&
-
- cd $SOURCE_DIRECTORY &&
- cp -f usr/lib/libGL* /usr/lib/opengl/nvidia/ &&
- cd /usr/lib/opengl/nvidia &&
- ln -sf libGL.so.$VERSION libGL.so.1 &&
- ln -sf libGL.so.1 libGL.so &&
- ln -sf libGLcore.so.$VERSION libGLcore.so.1 &&
- cd /usr/lib &&
- ln -sf libXvMCNVIDIA.so.$VERSION libXvMCNVIDIA_dynamic.so.1 &&
- ln -sf libnvidia-cfg.so.$VERSION libnvidia-cfg.so.1 &&
- ln -sf libnvidia-cfg.so.1 libnvidia-cfg.so &&
- ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so.1 &&
-
- cd $SOURCE_DIRECTORY &&
- cp -f usr/lib/lib*a*.* /usr/lib &&
- cp -rf usr/share/applications /usr/share &&
- cp -rf usr/share/doc/* /usr/share/doc/NVIDIA_GLX-1.0 &&
- cp -rf usr/share/man /usr/share &&
- cp -f usr/share/pixmaps/* /usr/share/doc/NVIDIA_GLX-1.0 &&
+ mkdir -p /usr/include/cuda &&
+ install -m0444 cuda*.h /usr/include/cuda &&
- # 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 &&
+ mkdir -p /usr/include/GL/nvidia &&
+ install -m0444 gl*.h /usr/include/GL/nvidia &&
+
+ 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 -m0644 libGL.la /usr/lib &&
+ install -m0755 libGL.so.$VERSION /usr/lib &&
- # This is a temp workaround for braindead dlopen calls inside the NVIDIA
- # libglx.so
+ 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 &&
- ln -sf /usr/lib/opengl/nvidia/libGLcore.so.1 \
- /usr/lib/libGLcore.so.1 &&
+ mkdir -p /usr/lib/tls &&
+ install -m0755 tls/libnvidia-tls.so.$VERSION /usr/lib/tls &&
- ln -sf /usr/lib/tls/libnvidia-tls.so.1 \
- /usr/lib/libnvidia-tls.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 &&
- if !( module_installed gtk+-2 ); then
- rm -f /usr/bin/nvidia-settings
- fi
+ install -m0755 nvidia_drv.so /usr/lib/xorg/modules/drivers &&
+ install -m0755 libglx.so.$VERSION /usr/lib/xorg/modules/extensions &&
+
+ 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-beta/DEPENDS b/x11/NVIDIA-beta/DEPENDS
index 4f1c8eb..6e26e11 100644
--- a/x11/NVIDIA-beta/DEPENDS
+++ b/x11/NVIDIA-beta/DEPENDS
@@ -1,3 +1,5 @@
depends pciutils
+depends ncurses
+depends libXxf86vm
depends libvdpau
depends gtk+-2
diff --git a/x11/NVIDIA-beta/DETAILS b/x11/NVIDIA-beta/DETAILS
index 2843040..99b8c2a 100644
--- a/x11/NVIDIA-beta/DETAILS
+++ b/x11/NVIDIA-beta/DETAILS
@@ -1,10 +1,10 @@
MODULE=NVIDIA-beta
- VERSION=190.42
- SOURCE=NVIDIA-Linux-x86-$VERSION-pkg0.run
+ VERSION=256.29
+ 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-pkg0
+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
@@ -26,16 +26,16 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86-$VERSION-pkg0
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:c2b20032160f4b5803a04a1bf7bb67a200516a51
- SOURCE2_VFY=sha1:4d8b9feb76f728108abf46f402e16ad5cec622fb
- SOURCE3_VFY=sha1:1f6d09d40a19ab689494211cb351a9cdc28521ae
- SOURCE4_VFY=sha1:4998c044ee898cb11001318ed58bcfe7dd732102
+ SOURCE_VFY=sha1:fc5576f55ba93bc31f594b0859052d7d8e5518e7
+ SOURCE2_VFY=sha1:a3c08749afa1b5de85865368dac93a383eaded74
+ SOURCE3_VFY=sha1:61e9188f3d8a88ec432f80d577f183d3b4901950
+ SOURCE4_VFY=sha1:20fcb1b25b345bd2fa62bd01a6fac9ce07a331c8
WEB_SITE=http://www.nvidia.com/
LICENSE="proprietary"
ENTERED=20030804
- UPDATED=20091022
+ UPDATED=20100603
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 Geforce 6/7/8/9/GT2xx
diff --git a/x11/NVIDIA-beta/DETAILS.x86_64 b/x11/NVIDIA-beta/DETAILS.x86_64
index df433e9..b9018cf 100644
--- a/x11/NVIDIA-beta/DETAILS.x86_64
+++ b/x11/NVIDIA-beta/DETAILS.x86_64
@@ -1,10 +1,10 @@
MODULE=NVIDIA-beta
- VERSION=190.42
- SOURCE=NVIDIA-Linux-x86_64-$VERSION-pkg0.run
+ VERSION=256.29
+ 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-pkg0
+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
@@ -26,14 +26,14 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/NVIDIA-Linux-x86_64-$VERSION-pkg0
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:b48b8637585395b7a2427d8f971eb951155c2c77
- SOURCE2_VFY=sha1:4d8b9feb76f728108abf46f402e16ad5cec622fb
- SOURCE3_VFY=sha1:1f6d09d40a19ab689494211cb351a9cdc28521ae
- SOURCE4_VFY=sha1:4998c044ee898cb11001318ed58bcfe7dd732102
+ SOURCE_VFY=sha1:94170c5baa84024b0e49c7aaf781ab0ee33cdc88
+ SOURCE2_VFY=sha1:a3c08749afa1b5de85865368dac93a383eaded74
+ SOURCE3_VFY=sha1:61e9188f3d8a88ec432f80d577f183d3b4901950
+ SOURCE4_VFY=sha1:20fcb1b25b345bd2fa62bd01a6fac9ce07a331c8
WEB_SITE=http://www.nvidia.com/
LICENSE="proprietary"
ENTERED=20030804
- UPDATED=20091022
+ UPDATED=20100603
SHORT="X11 NVIDIA binary driver for Geforce 6/7/8/9/GT2xx"
cat << EOF
diff --git a/x11/NVIDIA-beta/POST_INSTALL b/x11/NVIDIA-beta/POST_INSTALL
new file mode 100644
index 0000000..88564a4
--- /dev/null
+++ b/x11/NVIDIA-beta/POST_INSTALL
@@ -0,0 +1,20 @@
+# 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
+ln -sf libglx.so.$VERSION libglx.so
+
+# Clean up
+rm -rf $SOURCE_DIRECTORY
diff --git a/x11/NVIDIA-beta/POST_REMOVE b/x11/NVIDIA-beta/POST_REMOVE
new file mode 100644
index 0000000..fef026d
--- /dev/null
+++ b/x11/NVIDIA-beta/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-beta/PRE_BUILD b/x11/NVIDIA-beta/PRE_BUILD
index 81a94fa..ef98bbe 100644
--- a/x11/NVIDIA-beta/PRE_BUILD
+++ b/x11/NVIDIA-beta/PRE_BUILD
@@ -2,7 +2,7 @@
cd $BUILD_DIRECTORY &&
rm -rf $SOURCE_DIRECTORY &&
- sh $SOURCE_CACHE/$SOURCE --extract-only &&
+ sh $SOURCE_CACHE/$SOURCE -x &&
cd $SOURCE_DIRECTORY &&
unpack $SOURCE2 &&
unpack $SOURCE3 &&
diff --git a/x11/NVIDIA-beta/profile.d/nvidia_gl.rc b/x11/NVIDIA-beta/profile.d/nvidia_gl.rc
deleted file mode 100644
index 60c63d2..0000000
--- a/x11/NVIDIA-beta/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