From 7e75d654517ba7b62deae136d1fed78554361167 Mon Sep 17 00:00:00 2001 From: Lenard Spencer Date: Mon, 6 Mar 2023 21:31:42 +0000 Subject: [PATCH] system/nvidia-driver: Fix typo that broke runlevel 4 SDDM login. Signed-off-by: bedlam Signed-off-by: Willy Sudiarto Raharjo --- system/nvidia-driver/nvidia-driver.SlackBuild | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild index b6d060daa6..73b110fcc0 100644 --- a/system/nvidia-driver/nvidia-driver.SlackBuild +++ b/system/nvidia-driver/nvidia-driver.SlackBuild @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=nvidia-driver VERSION=${VERSION:-525.89.02} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -57,6 +57,12 @@ else exit 1 fi +if [ "${COMPAT32}" = "yes" ]; then + MULTI="_multilib" +else + MULTI="" +fi + # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. @@ -131,12 +137,15 @@ cd - mv -f $PKG/usr/bin/nvidia-installer $TMP/$SRCNAM mv -f $PKG/usr/man/man1/nvidia-installer.1.gz $TMP/$SRCNAM -if [ "${COMPAT32}" = "yes" ]; then +if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr" - MULTI="_multilib" + mkdir -p $PKG/usr/lib else - COMP32="--no-install-compat32-libs" - MULTI="" + if [ ! "$ARCH" = "x86_64" ]; then + COMP32="" + else + COMP32="--no-install-compat32-libs" + fi fi # Install the binary libs using nvidia-installer compiled above @@ -178,7 +187,8 @@ 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 /{usr,var}/lib/nvidia || true +rm -rf $PKG/usr/lib/nvidia || true +rm -rf $PKG/var/lib || true # Mitigate a bug in nvidia-installer that misplaces a symlink # (Thanks to marco70 on LQ for catching this: