[Lunar-commits] <moonbase> NVIDIA: install libs in /usr/lib/opengl/nvidia
Samuel Verstraete
elangelo at lunar-linux.org
Fri Mar 13 16:02:45 CET 2009
commit fa3d054bc9444260bc563bf16f5f39d49d20afc3
Author: Samuel Verstraete <elangelo at lunar-linux.org>
Date: Wed Sep 10 09:10:57 2008 +0200
NVIDIA: install libs in /usr/lib/opengl/nvidia
allows for seamless switching from opensource drivers to propriearity
---
x11/NVIDIA/BUILD | 42 ++++++++++++++++++++++++++++++------
x11/NVIDIA/CONFLICTS | 1 -
x11/NVIDIA/profile.d/nvidia_gl.rc | 11 +++++++++
3 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/x11/NVIDIA/BUILD b/x11/NVIDIA/BUILD
index 3b6e0b7..dbd80b7 100644
--- a/x11/NVIDIA/BUILD
+++ b/x11/NVIDIA/BUILD
@@ -15,12 +15,40 @@
cd $SOURCE_DIRECTORY &&
rm -rf old.libraries &&
- ./nvidia-installer --silent --no-precompiled-interface --no-rpms --no-network --no-recursion --no-kernel-module --no-x-check &&
-
-# 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
+ mkdir -p /usr/lib/opengl/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 &&
+
+ # 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
+
+ # This is a temp workaround for braindead dlopen calls inside the NVIDIA
+ # libglx.so
+
+ ln -sf /usr/lib/opengl/nvidia/libGLcore.so.1 \
+ /usr/lib/libGLcore.so.1 &&
+
+ ln -sf /usr/lib/opengl/nvidia/tls/libnvidia-tls.so.1 \
+ /usr/lib/libnvidia-tls.so.1
) > $C_FIFO 2>&1
diff --git a/x11/NVIDIA/CONFLICTS b/x11/NVIDIA/CONFLICTS
index 7d8f152..561a254 100644
--- a/x11/NVIDIA/CONFLICTS
+++ b/x11/NVIDIA/CONFLICTS
@@ -1,4 +1,3 @@
conflicts NVIDIA-legacy
conflicts NVIDIA-beta
conflicts NVIDIA-old
-conflicts mesa-lib
diff --git a/x11/NVIDIA/profile.d/nvidia_gl.rc b/x11/NVIDIA/profile.d/nvidia_gl.rc
new file mode 100644
index 0000000..60c63d2
--- /dev/null
+++ b/x11/NVIDIA/profile.d/nvidia_gl.rc
@@ -0,0 +1,11 @@
+#!/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