summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward W. Koenig <kingbeowulf@gmail.com>2017-04-02 11:01:28 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-04-08 06:58:03 +0700
commitd729b1a51cce27fbbc0fe242eb4e72fb5ca67e56 (patch)
tree68db300c9c5cfdf673cbea6313031c43fa954216
parente25a4add17dab172535c21285636627245929bdb (diff)
downloadslackbuilds-d729b1a51cce27fbbc0fe242eb4e72fb5ca67e56.tar.gz
system/nvidia-driver: Fix nvidia-switch lib names.
This avoids ldconfig changing the symlinks Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/nvidia-driver/changelog.txt1
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild2
-rw-r--r--system/nvidia-driver/nvidia-switch31
3 files changed, 18 insertions, 16 deletions
diff --git a/system/nvidia-driver/changelog.txt b/system/nvidia-driver/changelog.txt
index 2b74340715..d621da47f9 100644
--- a/system/nvidia-driver/changelog.txt
+++ b/system/nvidia-driver/changelog.txt
@@ -28,3 +28,4 @@
4.6 24-APR-2016 version update LLB, fix symlinks, added to version if multilib
4.7 31-APR-2016 version update LLB, added nvidia-installer, updated libs/symlinks
5.0 20-FEB-2017 version update LLB, security fixes, updated libs/symlinks, nvidia-switch
+5.1 01-APR-2017 fix nvidia-switch lib names to prevent bad ldconfig symlinks on reboot
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index bd1e93e1d2..bb3688f8a8 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -27,7 +27,7 @@
PRGNAM=nvidia-driver
VERSION=${VERSION:-375.39}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CPROXY=${CPROXY:-yes}
GLVND=${GLVND:-yes}
diff --git a/system/nvidia-driver/nvidia-switch b/system/nvidia-driver/nvidia-switch
index d28aa95526..f92f6837cf 100644
--- a/system/nvidia-driver/nvidia-switch
+++ b/system/nvidia-driver/nvidia-switch
@@ -27,6 +27,7 @@
# need to edit a bunch of other config files.
# TO-DO: needs more cleanup; still way too brittle.
+# might be better to move mesa and xorg conflicts to /var/lib/nvidia
ROOT="${ROOT:-/}"
@@ -47,10 +48,10 @@ save_GL(){
cd $2
case "$1" in
"nvidia")
- mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg
- mv libGL.la libGL.la-xorg
+ mv libGL.so.$GL_VERSION xorg-libGL.so.$GL_VERSION
+ mv libGL.la xorg-libGL.la
mv libGL.la-nvidia libGL.la
- mv libEGL.so.1.0.0 libEGL.so.1.0.0-xorg
+ mv libEGL.so.1.0.0 xorg-libEGL.so.1.0.0
if [ "$GLVND" = "yes" ]; then
ln -sf libGL.so.1.0.0 libGL.so.1
@@ -64,29 +65,29 @@ save_GL(){
ln -sf libEGL.so.1 libEGL.so
fi
- mv libGLESv1_CM.so.1.1.0 libGLESv1_CM.so.1.1.0-xorg
+ mv libGLESv1_CM.so.1.1.0 xorg-libGLESv1_CM.so.1.1.0
ln -sf libGLESv1_CM.so.1-nvidia libGLESv1_CM.so.1
ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so
- mv libGLESv2.so.2.0.0 libGLESv2.so.2.0.0-xorg
+ mv libGLESv2.so.2.0.0 xorg-libGLESv2.so.2.0.0
ln -sf libGLESv2.so.2-nvidia libGLESv2.so.2
ln -sf libGLESv2.so.2 libGLESv2.so
;;
"xorg")
mv libGL.la libGL.la-nvidia
- mv libGL.la-xorg libGL.la
- mv libEGL.so.1.0.0-xorg libEGL.so.1.0.0
- mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION
+ mv xorg-libGL.la libGL.la
+ mv xorg-libEGL.so.1.0.0 libEGL.so.1.0.0
+ mv xorg-libGL.so.$GL_VERSION libGL.so.$GL_VERSION
ln -sf libGL.so.$GL_VERSION libGL.so.1
ln -sf libGL.so.$GL_VERSION libGL.so
ln -sf libEGL.so.1.0.0 libEGL.so.1
ln -sf libEGL.so.1.0.0 libEGL.so
- mv libGLESv1_CM.so.1.1.0-xorg libGLESv1_CM.so.1.1.0
+ mv xorg-libGLESv1_CM.so.1.1.0 libGLESv1_CM.so.1.1.0
ln -sf libGLESv1_CM.so.1.1.0 libGLESv1_CM.so.1
ln -sf libGLESv1_CM.so.1.1.0 libGLESv1_CM.so
- mv libGLESv2.so.2.0.0-xorg libGLESv2.so.2.0.0
+ mv xorg-libGLESv2.so.2.0.0 libGLESv2.so.2.0.0
ln -sf libGLESv2.so.2.0.0 libGLESv2.so.2
ln -sf libGLESv2.so.2.0.0 libGLESv2.so
;;
@@ -103,14 +104,14 @@ save_glx(){
case "$1" in
"nvidia")
if [ -e libglx.so ]; then
- mv libglx.so libglx.so-xorg
+ mv libglx.so xorg-libglx.so
fi
ln -sf libglx.so.$NV_VERSION libglx.so
;;
"xorg")
- if [ -e libglx.so-xorg ]; then
+ if [ -e xorg-libglx.so ]; then
rm -f libglx.so
- mv libglx.so-xorg libglx.so
+ mv xorg-libglx.so libglx.so
else
rm -f libglx.so
fi
@@ -180,7 +181,7 @@ nvidia_remove(){
rm -f $LIB/libOpenCL.so.1
# Check for multilib configuration
if [ "$COMPAT32" = "yes" ]; then
- if [ -e $LIB32/libGL.so.$GL_VERSION-xorg ]; then
+ if [ -e $LIB32/xorg-libGL.so.$GL_VERSION ]; then
save_GL "xorg" $LIB32
else
echo "mesa-compat32 is not installed, skipping..."
@@ -208,7 +209,7 @@ restore(){
# Obviously, you will need to run this after '--remove' and before
# 'removepkg nvidia-driver'.
# User must:
-# 1. remove any dangling symlinks and *-xorg, *-nvidia files in /usr/lib*/,
+# 1. remove any dangling symlinks and xorg-*, *-nvidia files in /usr/lib*/,
# and any other housekeeping tasks.
# 2. copy stock Slackware packages to /root/Slackware
# 3. be running STOCK Slackware-14.2