system/nvidia-driver: Fix nvidia-switch lib names.

This avoids ldconfig changing the symlinks

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Edward W. Koenig 2017-04-02 11:01:28 +02:00 committed by Willy Sudiarto Raharjo
parent 20c47e3b8a
commit 6003a13b80
No known key found for this signature in database
GPG key ID: 887B8374D7333381
3 changed files with 18 additions and 16 deletions

View file

@ -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

View file

@ -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}

View file

@ -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