summaryrefslogtreecommitdiff
path: root/system/nvidia-legacy340-driver/nvidia-switch
diff options
context:
space:
mode:
authorEdward W. Koenig <kingbeowulf@gmail.com>2020-02-16 05:55:07 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-02-16 05:55:07 +0700
commitff353d762d021e8140d4f2a88dea895da90177d8 (patch)
tree8afb03d23d32cc0e256dabe505411761b81db1f9 /system/nvidia-legacy340-driver/nvidia-switch
parentc5357029e5ec0d75b613e2d8e2e45d27cf52f09a (diff)
downloadslackbuilds-ff353d762d021e8140d4f2a88dea895da90177d8.tar.gz
system/nvidia-legacy340-driver: Fix script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy340-driver/nvidia-switch')
-rw-r--r--system/nvidia-legacy340-driver/nvidia-switch21
1 files changed, 8 insertions, 13 deletions
diff --git a/system/nvidia-legacy340-driver/nvidia-switch b/system/nvidia-legacy340-driver/nvidia-switch
index 9226a103bd..fd90c87949 100644
--- a/system/nvidia-legacy340-driver/nvidia-switch
+++ b/system/nvidia-legacy340-driver/nvidia-switch
@@ -41,6 +41,7 @@ XMOD="${LIB}/xorg/modules"
XLIB="$XMOD/extensions"
NV_VERSION='PKGVERSION' # This will be replaced in the build script
GL_VERSION="1.2.0"
+EGL_VERSION="1.0.0"
NV_CONF="/usr/share/X11/xorg.conf.d/10-nvidia.conf"
save_GL(){
@@ -48,37 +49,33 @@ save_GL(){
if [ "$1" = "nvidia" ]; then
if [ ! -e libGL.so.$GL_VERSION-xorg ]; then
mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg
- mv libGL.la libGL.la-xorg
fi
mv libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION
ln -sf libGL.so.$NV_VERSION libGL.so.1
ln -sf libGL.so.$NV_VERSION libGL.so
- if [ ! -e libEGL.so.1.0.0-xorg ]; then
- mv libEGL.so.1.0.0 libEGL.so.1.0.0-xorg
+ if [ ! -e libEGL.so.$EGL_VERSION-xorg ]; then
+ mv libEGL.so.$EGL_VERSION libEGL.so.$EGL_VERSION-xorg
fi
- mv libGL.la-nvidia libGL.la
mv libEGL.so.$NV_VERSION-nvidia libEGL.so.$NV_VERSION
- ln -sf libEGL.so.$NV_VERSION libGEL.so.1.0.0
+ ln -sf libEGL.so.$NV_VERSION libEGL.so.$EGL_VERSION
ln -sf libEGL.so.$NV_VERSION libEGL.so.1
ln -sf libEGL.so.$NV_VERSION libEGL.so
fi
if [ "$1" = "xorg" ]; then
mv libGL.so.$NV_VERSION libGL.so.$NV_VERSION-nvidia
- mv libGL.la libGL.la-nvidia
if [ -e libGL.so.$GL_VERSION-xorg ]; then
mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION
ln -sf libGL.so.$GL_VERSION libGL.so.1
ln -sf libGL.so.$GL_VERSION libGL.so
- mv libGL.la-xorg libGL.la
else
echo WARNING: libGL.so is missing.
fi
mv libEGL.so.$NV_VERSION libEGL.so.$NV_VERSION-nvidia
- if [ -e libEGL.so.1.0.0-xorg ]; then
- mv libEGL.so.1.0.0-xorg libEGL.so.1.0.0
- ln -sf libEGL.so.1.0.0 libEGL.so.1
- ln -sf libEGL.so.1.0.0 libEGL.so
+ if [ -e libEGL.so.$EGL_VERSION-xorg ]; then
+ mv libEGL.so.$EGL_VERSION-xorg libEGL.so.$EGL_VERSION
+ ln -sf libEGL.so.$EGL_VERSION libEGL.so.1
+ ln -sf libEGL.so.$EGL_VERSION libEGL.so
fi
fi
@@ -111,7 +108,6 @@ save_glx(){
cd "$XLIB"
if [ "$1" = "nvidia" ]; then
if [ ! -e libglx.so-xorg ]; then
- mv libglx.la libglx.la-xorg
mv libglx.so libglx.so-xorg
fi
ln -sf libglx.so.$NV_VERSION-nvidia libglx.so.$NV_VERSION
@@ -120,7 +116,6 @@ save_glx(){
rm -f libglx.so.$NV_VERSION
rm -f libglx.so
mv libglx.so-xorg libglx.so
- mv libglx.la-xorg libglx.la
fi
cd "$CWD"
}