[Lunar-commits] <moonbase> NVIDIA, fglrx: Update to support the new OpenGL framework.
Moritz Heiber
moe at lunar-linux.org
Wed Sep 10 14:42:12 CEST 2008
commit 077e6b7fa3fee8d8267e6f57b95f9a3b52547404
Author: Moritz Heiber <moe at lunar-linux.org>
Date: Wed Sep 10 14:26:56 2008 +0200
NVIDIA, fglrx: Update to support the new OpenGL framework.
Squashed commit of the following:
commit a40e39053110d48cddec5f35d4f20929064cca15
Author: Moritz Heiber <moe at lunar-linux.org>
Date: Wed Sep 10 12:32:28 2008 +0200
NVIDIA-beta, NVIDIA ..: Sync with regular NVIDIA. Also move over the profile.d.
commit a84915436fea2192a0cf36ccf0d05d2f13095ffd
Author: Moritz Heiber <moe at lunar-linux.org>
Date: Wed Sep 10 12:14:08 2008 +0200
NVIDIA-legacy: Sync up with NVIDIA.
commit 3f329aa7a96d7552ee6a3a9a0c64ab8a4cda4533
Author: Moritz Heiber <moe at lunar-linux.org>
Date: Wed Sep 10 12:13:47 2008 +0200
NVIDIA-old: Sync up with the regular NVIDIA.
commit 437ab83403edb29ea54727a8b97ee0665e3a751c
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
commit ead1c9bcb227198c8954e6ce000f39773d7fa316
Author: Moritz Heiber <moe at lunar-linux.org>
Date: Tue Sep 9 15:55:16 2008 +0200
fglrx: We need to source the configuration
commit 385cf3a05d8a4788092d5f6d25dea72f0350abb6
Author: Moritz Heiber <moe at lunar-linux.org>
Date: Tue Sep 9 12:43:00 2008 +0200
fglrx: Modified fglrx to use a special library directory.
This is needed to cope with the changes of the upcoming
MESA/xorg-server bump.
---
x11/NVIDIA-beta/BUILD | 41 +++++++++++++++++++---------
x11/NVIDIA-beta/profile.d/nvidia_gl.rc | 11 +++++++
x11/NVIDIA-legacy/BUILD | 43 +++++++++++++++++++++++++-----
x11/NVIDIA-legacy/CONFLICTS | 1 -
x11/NVIDIA-legacy/profile.d/nvidia_gl.rc | 11 +++++++
x11/NVIDIA-old/BUILD | 42 ++++++++++++++++++++++++-----
x11/NVIDIA-old/CONFLICTS | 1 -
x11/NVIDIA-old/profile.d/nvidia_gl.rc | 11 +++++++
x11/NVIDIA/BUILD | 42 ++++++++++++++++++++++++-----
x11/NVIDIA/CONFLICTS | 1 -
x11/NVIDIA/profile.d/nvidia_gl.rc | 11 +++++++
x11/fglrx/BUILD | 22 ++++++++++-----
x11/fglrx/profile.d/fglrx_gl.rc | 11 +++++++
13 files changed, 204 insertions(+), 44 deletions(-)
diff --git a/x11/NVIDIA-beta/BUILD b/x11/NVIDIA-beta/BUILD
index 2dc3e00..bfbe919 100644
--- a/x11/NVIDIA-beta/BUILD
+++ b/x11/NVIDIA-beta/BUILD
@@ -16,37 +16,38 @@
# 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\/X11R6\/lib/" 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 &&
cp -f nvidia-installer /usr/bin &&
mkdir -p /usr/share/doc/NVIDIA_GLX-1.0 &&
cp -f LICENSE /usr/share/doc/NVIDIA_GLX-1.0 &&
- cp -f usr/X11R6/lib/lib* /usr/X11R6/lib &&
- cp -f usr/X11R6/lib/modules/lib* /usr/X11R6/lib/xorg/modules &&
+ cp -f usr/X11R6/lib/lib* /usr/lib/opengl/nvidia/ &&
+ cp -f usr/X11R6/lib/modules/lib* /usr/X11/lib/xorg/modules &&
cp -f usr/share/applications/nvidia-settings.desktop /usr/share/applications/nvidia-settings.desktop
- cd /usr/X11R6/lib/xorg/modules &&
+ cd /usr/X11/lib/xorg/modules &&
ln -sf libnvidia-wfb.so.$VERSION libnvidia-wfb.so.1 &&
cd $SOURCE_DIRECTORY &&
- cp -rf usr/X11R6/lib/modules/drivers /usr/X11R6/lib/xorg/modules &&
- cp -rf usr/X11R6/lib/modules/extensions /usr/X11R6/lib/xorg/modules &&
- cd /usr/X11R6/lib/xorg/modules/extensions &&
+ cp -rf usr/X11R6/lib/modules/drivers /usr/X11/lib/xorg/modules &&
+ cp -rf usr/X11R6/lib/modules/extensions /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/GL /usr/X11R6/include &&
- cp -rf usr/include/cuda /usr/X11R6/include &&
- cp -rf usr/lib/tls /usr/X11R6/lib &&
- cd /usr/X11R6/lib/tls &&
+ cp -rf usr/include/cuda /usr/X11/include &&
+ cp -rf usr/lib/tls /usr/lib/opengl/nvidia/ &&
+ cd /usr/lib/opengl/nvidia/tls &&
ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so.1 &&
cd $SOURCE_DIRECTORY &&
- cp -f usr/lib/lib* /usr/X11R6/lib &&
- cd /usr/X11R6/lib &&
+ cp -f usr/lib/lib* /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 &&
@@ -71,4 +72,18 @@
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-beta/profile.d/nvidia_gl.rc b/x11/NVIDIA-beta/profile.d/nvidia_gl.rc
new file mode 100644
index 0000000..60c63d2
--- /dev/null
+++ b/x11/NVIDIA-beta/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
diff --git a/x11/NVIDIA-legacy/BUILD b/x11/NVIDIA-legacy/BUILD
index 897e2f1..dbd80b7 100644
--- a/x11/NVIDIA-legacy/BUILD
+++ b/x11/NVIDIA-legacy/BUILD
@@ -1,4 +1,5 @@
(
+
# We make the kernel modules on our own
cd $SOURCE_DIRECTORY/usr/src/nv &&
@@ -14,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-legacy/CONFLICTS b/x11/NVIDIA-legacy/CONFLICTS
index 5e0f17a..b67580f 100644
--- a/x11/NVIDIA-legacy/CONFLICTS
+++ b/x11/NVIDIA-legacy/CONFLICTS
@@ -1,4 +1,3 @@
conflicts NVIDIA
conflicts NVIDIA-old
conflicts NVIDIA-beta
-conflicts mesa-lib
diff --git a/x11/NVIDIA-legacy/profile.d/nvidia_gl.rc b/x11/NVIDIA-legacy/profile.d/nvidia_gl.rc
new file mode 100644
index 0000000..60c63d2
--- /dev/null
+++ b/x11/NVIDIA-legacy/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
diff --git a/x11/NVIDIA-old/BUILD b/x11/NVIDIA-old/BUILD
index 3b6e0b7..dbd80b7 100644
--- a/x11/NVIDIA-old/BUILD
+++ b/x11/NVIDIA-old/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-old/CONFLICTS b/x11/NVIDIA-old/CONFLICTS
index 5c13ce5..f3fd9cf 100644
--- a/x11/NVIDIA-old/CONFLICTS
+++ b/x11/NVIDIA-old/CONFLICTS
@@ -1,4 +1,3 @@
conflicts NVIDIA
conflicts NVIDIA-beta
conflicts NVIDIA-legacy
-conflicts mesa-lib
diff --git a/x11/NVIDIA-old/profile.d/nvidia_gl.rc b/x11/NVIDIA-old/profile.d/nvidia_gl.rc
new file mode 100644
index 0000000..60c63d2
--- /dev/null
+++ b/x11/NVIDIA-old/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
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
diff --git a/x11/fglrx/BUILD b/x11/fglrx/BUILD
index e8df46f..fbf1629 100644
--- a/x11/fglrx/BUILD
+++ b/x11/fglrx/BUILD
@@ -60,22 +60,25 @@
mkdir -p /usr/X11/lib/dri &&
- cp -af arch/x86/usr/X11R6/lib/lib* /usr/X11/lib/xorg/ &&
+ # We need a special location for the libaries
+ mkdir -p /usr/lib/opengl/ati &&
+
+ cp -af arch/x86/usr/X11R6/lib/lib* /usr/lib/opengl/ati/ &&
cp -af arch/x86/usr/X11R6/lib/modules/dri/fglrx_dri.so \
/usr/X11/lib/dri &&
# Setup symlinks
- ln -sf /usr/X11/lib/xorg/libGL.so.1.2 \
- /usr/X11/lib/libGL.so.1 &&
+ ln -sf /usr/lib/opengl/ati/libGL.so.1.2 \
+ /usr/lib/opengl/ati/libGL.so.1 &&
- ln -sf /usr/X11/lib/xorg/libGL.so.1.2 \
- /usr/X11/lib/libGL.so &&
+ ln -sf /usr/lib/opengl/ati/libGL.so.1.2 \
+ /usr/lib/opengl/ati/libGL.so &&
unset file
for file in libfglrx_dm libfglrx_gamma libfglrx_pp libfglrx_tvout ; do
- ln -sf /usr/X11/lib/xorg/${file}.so.1.0 \
- /usr/X11/lib/xorg/${file}.so.1
+ ln -sf /usr/lib/opengl/ati/${file}.so.1.0 \
+ /usr/lib/opengl/ati/${file}.so.1
done &&
cp -af x710/usr/X11R6/lib/modules /usr/X11/lib/xorg/ &&
@@ -87,6 +90,11 @@
install -m644 common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko \
/lib/modules/${KVER}/drivers/char/drm/ &&
+ # Get a sane default if haven't set it yet
+ if [ "x$LUNAR_GL" == "x" ] ; then
+ set_local_config LUNAR_GL binary
+ fi
+
#Update module dependencies
depmod
diff --git a/x11/fglrx/profile.d/fglrx_gl.rc b/x11/fglrx/profile.d/fglrx_gl.rc
new file mode 100644
index 0000000..91a0819
--- /dev/null
+++ b/x11/fglrx/profile.d/fglrx_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/ati:$LD_LIBRARY_PATH"
+ else
+ export LD_LIBRARY_PATH="/usr/lib/opengl/ati"
+ fi
+fi
More information about the Lunar-commits
mailing list