summaryrefslogtreecommitdiff
path: root/system/nvidia-driver/nvidia-driver.SlackBuild
diff options
context:
space:
mode:
authorEdward W. Koenig <kingbeowulf@gmail.com>2019-08-17 20:34:44 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-08-17 20:34:44 +0700
commitcb3d27f572dfe25564789534e6f192d73794e54d (patch)
tree999391da37c5e2d9a189c199c5c69894fed0db3b /system/nvidia-driver/nvidia-driver.SlackBuild
parentc9309232a0e53eb008509821af5aaf78dd1406be (diff)
downloadslackbuilds-cb3d27f572dfe25564789534e6f192d73794e54d.tar.gz
system/nvidia-driver: Updated for version 430.40.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-driver/nvidia-driver.SlackBuild')
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild82
1 files changed, 22 insertions, 60 deletions
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index c86736ded8..e52adae023 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -25,12 +25,13 @@
# see changelog.txt
PRGNAM=nvidia-driver
-VERSION=${VERSION:-430.14}
+VERSION=${VERSION:-430.40}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-GLVND=${GLVND:-yes}
-# libglnvd may land in mesa and is Nvidia recommended
+GLVND=yes
+# libglnvd landed in mesa and is Nvidia recommended; no longer optional
+# future will remove
set -e
@@ -68,7 +69,7 @@ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
$PKG/etc/OpenCL/vendors/ $PKG/usr/{bin,doc,man/man1,sbin} \
$PKG/usr/share/{applications,nvidia,pixmaps,egl/egl_external_platform.d} \
$PKG/usr/include/GL $PKG/etc/vulkan/icd.d $PKG/etc/X11/xorg.conf.d \
- $PKG/etc/X11/glvnd/egl_vendor.d $PKG/var/log/nvidia/{32,64} \
+ $PKG/etc/X11/glvnd/egl_vendor.d $PKG/var/log/nvidia/{32,64}
if [ "$COMPAT32" = "yes" ]; then
mkdir -p $PKG/usr/lib/tls
@@ -170,6 +171,17 @@ if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
cd -
fi
+# Only one conflicting lib
+cd $PKG/usr/lib$LIBDIRSUFFIX
+mv libGL.la libGL.la-nvidia
+cd -
+
+if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
+ cd $PKG/usr/lib
+ mv libGL.la libGL.la-nvidia
+ cd -
+fi
+
# Compile utilites from source, replacing the precompiled versions
#
# Compiling nvidia-settings
@@ -255,68 +267,23 @@ cd -
install -m 0755 $CWD/nvidia-switch $PKG/usr/sbin/
sed -i s/PKGVERSION/$VERSION/g $PKG/usr/sbin/nvidia-switch
sed -i s/LIBDIRSUFFIX/$LIBDIRSUFFIX/g $PKG/usr/sbin/nvidia-switch
-if [ "$GLVND" = "yes" ]; then
- sed -i s/GLVNDFLAG/yes/g $PKG/usr/sbin/nvidia-switch
-else
- sed -i s/GLVNDFLAG/no/g $PKG/usr/sbin/nvidia-switch
-fi
+
if [ ${COMPAT32} = "yes" ]; then
sed -i s/LIB32FLAG/yes/g $PKG/usr/sbin/nvidia-switch
else
sed -i s/LIB32FLAG/no/g $PKG/usr/sbin/nvidia-switch
fi
-# These add or correct wrong paths
-sed -i "s|$TMP/package-$PRGNAM/usr|/usr|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la
-sed -i "s|/usr/X11R6/lib|/usr/lib$LIBDIRSUFFIX|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la
+# These update or correct wrong paths
+sed -i "s|$TMP/package-$PRGNAM/usr|/usr|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la-nvidia
+sed -i "s|/usr/X11R6/lib|/usr/lib$LIBDIRSUFFIX|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la-nvidia
sed -i "s|__UTILS_PATH__|/usr/bin|" $PKG/usr/share/applications/nvidia-settings.desktop
sed -i "s|__PIXMAP_PATH__|/usr/share/pixmaps|" $PKG/usr/share/applications/nvidia-settings.desktop
sed -i "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Application;Settings;|" $PKG/usr/share/applications/nvidia-settings.desktop
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- sed -i "s|$TMP/package-$PRGNAM/usr|/usr|" $PKG/usr/lib/libGL.la
- sed -i "s|/usr/X11R6/lib|/usr/lib|" $PKG/usr/lib/libGL.la
- sed -i "s|'/usr/'|'/usr/lib'|" $PKG/usr/lib/libGL.la
-fi
-
-# rename wrong/conficting files as needed; remove conflicting symlinks created by installer
-# since nvidia-switch tracks them.
-cd $PKG/usr/lib$LIBDIRSUFFIX
- if [ "$GLVND" = "yes" ]; then
- mv libEGL.so.1.1.0 libEGL.so.1.1.0-nvidia
- fi
- mv libGL.la libGL.la-nvidia
- mv libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1.2.0-nvidia
- mv libGLESv2.so.2.1.0 libGLESv2.so.2.1.0-nvidia
- rm -f libEGL.so
- rm -f libEGL.so.1
- rm -f libGL.so
- rm -f libGL.so.1
- rm -f libGLESv1_CM.so
- rm -f libGLESv1_CM.so.1
- rm -f libGLESv2.so
- rm -f libGLESv2.so.1
- rm -f xorg/modules/libwfb.so
-cd -
-
-if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- cd $PKG/usr/lib
- if [ "$GLVND" = "yes" ]; then
- mv libEGL.so.1.1.0 libEGL.so.1.1.0-nvidia
- fi
- mv libGL.la libGL.la-nvidia
- mv libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1.2.0-nvidia
- mv libGLESv2.so.2.1.0 libGLESv2.so.2.1.0-nvidia
- rm -f libEGL.so
- rm -f libGL.so
- rm -f libGL.so.1
- rm -f libGLESv1_CM.so
- rm -f libGLESv1_CM.so.1
- rm -f libGLESv2.so
- rm -f libGLESv2.so.1
- cd -
-# FIXME With COMPAT32=yes on pure x86_64, a weird /usr/lib/libGL.so.1 symlink to $PKG/usr/lib64/libGL.so.1
-# appears? Who would do this, so ignoring for now.
+ sed -i "s|$TMP/package-$PRGNAM/usr|/usr|" $PKG/usr/lib/libGL.la-nvidia
+ sed -i "s|/usr/X11R6/lib|/usr/lib|" $PKG/usr/lib/libGL.la-nvidia
fi
# Move ICDs to $PKG and cleanup (no switch option in installer?)
@@ -328,11 +295,6 @@ rm -rf /etc/vulkan
# Remove xorg conf file since we take care of that in nvidia-driver
rm -rf $PKG/etc/X11/xorg.conf.d
-cat <<EOF > $PKG/var/log/nvidia/README.txt
-Do NOT delete this directory!
-nvidia-switch will backup the original X.org libraries here.
-EOF
-
cd $TMP/$SRCNAM
# put docs in the right place
mv $PKG/usr/share/man/man1/nvidia-* $PKG/usr/man/man1