From ff995e0a83e9df645420a6a545af3edae803ad8b Mon Sep 17 00:00:00 2001 From: Lenard Spencer Date: Wed, 1 Mar 2023 12:30:47 +0700 Subject: [PATCH] system/nvidia-legacy470-driver: script updates. Signed-off-by: Willy Sudiarto Raharjo --- system/nvidia-legacy470-driver/README | 6 +++--- .../nvidia-legacy470-driver.SlackBuild | 19 +++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/system/nvidia-legacy470-driver/README b/system/nvidia-legacy470-driver/README index 1e5e4cba05..a25c03aef0 100644 --- a/system/nvidia-legacy470-driver/README +++ b/system/nvidia-legacy470-driver/README @@ -33,9 +33,9 @@ Notes: This is easily done by installing xf86-video-nouveau-blacklist in extra/xf86-video-nouveau-blacklist on the distibution DVD. -2. If nvidia-driver is already installed, the script will abort with - a prompt to remove the existing driver (it is not necessary to - remove the kernel module). +2. It is now no longer required to remove the old driver before + running this script. + 3. With Slackware 15.0, nvidia-switch has been dropped once and for all as there are no longer any conflicts. diff --git a/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild index 46a7bc56fe..34602c1c0d 100644 --- a/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild +++ b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=nvidia-legacy470-driver VERSION=${VERSION:-470.161.03} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -73,14 +73,6 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -# There are a couple of unresolved issues with nvidia-installer, so we -# abort if an Nvidia driver is still installed: -if [ -x /usr/bin/nvidia-installer ]; then - echo -e "\n A previous Nvidia installation has been detected!" - echo -e " Please remove the installed driver and rerun this script.\n" - exit 1 -fi - SRCNAM=NVIDIA-Linux-$TARGET-${VERSION} # make a clean package directory tree @@ -90,7 +82,7 @@ mkdir -p $TMP $PKG $OUTPUT $PKG/install mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \ $PKG/etc/OpenCL/vendors/ $PKG/usr/{bin,doc,man/man1} \ $PKG/usr/share/{applications,nvidia,pixmaps,egl/egl_external_platform.d} \ - $PKG/etc/X11/glvnd/egl_vendor.d + $PKG/etc/X11/glvnd/egl_vendor.d $PKG/var/log if [ "$COMPAT32" = "yes" ]; then mkdir -p $PKG/usr/lib/tls @@ -127,6 +119,9 @@ cd $TMP/nvidia-installer-$VERSION sed -i "s|/etc/vulkan|$PKG/etc/vulkan|" files.c sed -i "s|/lib/firmware/nvidia|$PKG/lib/firmware/nvidia|" files.c sed -i "s|\"/etc\"|\"$PKG/etc\"|" nvidia-installer.h + sed -i "s|/var/lib/nvidia|$PKG/var/lib/nvidia|" backup.c + sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" files.c + sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" misc.c chown -R root:root . find -L . \ @@ -186,7 +181,7 @@ fi # remove a pair of folders installed and used by nvidia-installer but # no longer needed (caused the "failed to remove some directories" # warning message): -rm -rf /{var,usr}/lib/nvidia || true +rm -rf $PKG/{var,usr}/lib/nvidia || true # Compile utilites from source, replacing the precompiled versions # @@ -328,4 +323,4 @@ fi # Flag multlib as needed and build package. cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION$MULTI-$ARCH-$BUILD$TAG.$PKGTYPE +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE