diff options
author | Lenard Spencer <lenardrspencer@gmail.com> | 2023-02-09 22:59:30 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-02-11 09:30:36 +0700 |
commit | 0b4016ab05e1ab8b81880459c99cbf50b4a6373d (patch) | |
tree | 0de0c3a8afcd05a12bdea6c6f763a4d7377ffaab /system | |
parent | 2507e6b5f493266431d70050422c16bd51fb890b (diff) |
system/nvidia-legacy470-driver: Fix build, add Wine libraries.
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/nvidia-legacy470-driver/README | 3 | ||||
-rw-r--r-- | system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild | 34 |
2 files changed, 23 insertions, 14 deletions
diff --git a/system/nvidia-legacy470-driver/README b/system/nvidia-legacy470-driver/README index 79f756d4879bb..1e5e4cba05809 100644 --- a/system/nvidia-legacy470-driver/README +++ b/system/nvidia-legacy470-driver/README @@ -5,6 +5,9 @@ part of the nvidia-kernel package at SlackBuilds.org. NOTE: 64-bit x86_64 support ONLY for Slackware64. For x86 32-bit support, use nvidia-legacy390-{driver,kernel} +The Wine libraries are now installed by default. To disable, pass + WINE="no" to the script. + Installing the 32-bit compatibility libraries is available: if desired, do: diff --git a/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild index ccaeb0309e57e..6e940c91fe9a9 100644 --- a/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild +++ b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for nvidia-legacy470-driver # Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, US -# Copyright 2021 Lenard Spencer, Orlando, FL, USA +# Copyright 2021-2023 Lenard Spencer, Orlando, FL, USA # # All rights reserved. # @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=nvidia-legacy470-driver VERSION=${VERSION:-470.161.03} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -89,9 +89,8 @@ rm -rf $PKG rm -rf $TMP/$SRCNAM 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,sbin} \ + $PKG/etc/OpenCL/vendors/ $PKG/usr/{bin,doc,man/man1} \ $PKG/usr/share/{applications,nvidia,pixmaps,egl/egl_external_platform.d} \ - $PKG/usr/include/GL $PKG/etc/vulkan/{icd.d,implicit_layer.d} $PKG/etc/X11/xorg.conf.d \ $PKG/etc/X11/glvnd/egl_vendor.d if [ "$COMPAT32" = "yes" ]; then @@ -125,6 +124,11 @@ cd $TMP/nvidia-installer-$VERSION # Let's try to remove the conflicting files and GPU detection patch -p0 < $CWD/skip_conflict-GPU_detect.patch +# Install the /etc/vulkan folder in $PKG instead of the root filesystem: + 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 + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -162,21 +166,28 @@ cd $TMP/$SRCNAM --log-file-name=$PKG/var/log/nvidia-installer.log \ --egl-external-platform-config-path=$PKG/usr/share/egl/egl_external_platform.d \ --no-nvidia-modprobe \ + --no-install-libglvnd \ + --no-wine-files \ --no-systemd \ --no-peermem \ $COMP32 - # Move ICDs to $PKG and cleanup (no switch option in installer?) -mv /etc/OpenCL/vendors/nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd -mv /etc/vulkan/icd.d/nvidia_icd.json $PKG/etc/vulkan/icd.d/nvidia_icd.json -mv /etc/vulkan/implicit_layer.d/nvidia_layers.json $PKG/etc/vulkan/implicit_layer.d/nvidia_layers.json - +# If we are using Wine, then: +if [ "${WINE:-yes}" != "no" ]; then + mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/nvidia/wine + install -m 755 _nvngx.dll $PKG/usr/lib$LIBDIRSUFFIX/nvidia/wine + install -m 755 nvngx.dll $PKG/usr/lib$LIBDIRSUFFIX/nvidia/wine +fi # libOpenCL.so is now included in 15.0 (in ocl-icd), # so we don't need this one. rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libOpenCL.so* if [ "${COMPAT32}" = "yes" ]; then rm -f $PKG/usr/lib/libOpenCL.so* 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 # Compile utilites from source, replacing the precompiled versions # @@ -271,11 +282,6 @@ fi cat $CWD/doinst.sh > $PKG/install/doinst.sh -# 14.2 needs nvidia-switch, -current does not -if [ "$CURRENT" = "no" ]; then - echo -e "usr/sbin/nvidia-switch --install\n" >> $PKG/install/doinst.sh -fi - # Add rc.nvidia-persistenced: if [ "${PERSISTENCED:-no}" = "yes" ]; then cd $TMP |