system/nvidia-legacy304-driver: Removed (unmaintained, ftbfs).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ee2bd6a203
commit
f35f54a437
|
@ -1,43 +0,0 @@
|
|||
This is the proprietary binary video driver from NVidia for the X.Org
|
||||
X-server. This package does not include the kernel-module - it is a part
|
||||
of the nvidia-kernel package at SlackBuilds.org.
|
||||
|
||||
Since this nvidia-driver conflicts with some files of xorg, it's a bit
|
||||
complex to install/uninstall the driver. However, installation of the
|
||||
nvidia-driver package itself backs up the conflicting files and puts
|
||||
the nvidia-specific files into place.
|
||||
|
||||
Included is a script called nvidia-switch, which is used to switch from
|
||||
the xorg driver to the nvidia driver, but it will not edit xorg.conf for
|
||||
you; you have to do that manually. The nvidia-switch script is installed
|
||||
to /usr/sbin.
|
||||
|
||||
Usage of nvidia-switch:
|
||||
nvidia-switch --install <--> install the nvidia files and save the
|
||||
stock xorg files.
|
||||
nvidia-switch --remove <--> remove the nvidia files and symlinks and
|
||||
restore the stock xorg files.
|
||||
|
||||
You do NOT have to run nvidia-switch after installing the package.
|
||||
|
||||
Note: x86_64 COMPAT32 enviroment is not supported.
|
||||
|
||||
Before uninstalling or upgrading this package, it is important that
|
||||
you execute 'nvidia-switch --remove', which will switch back to the
|
||||
stock xorg files and remove all links created by nvidia-switch during
|
||||
installation. If you forget to do this, you'll have to do the switch
|
||||
manually, or xorg won't work on next startup.
|
||||
|
||||
Here are the affected files:
|
||||
/usr/lib/libGL.so.1.2
|
||||
/usr/lib/xorg/modules/extensions/{libglx.so libglx.la}
|
||||
|
||||
or, for Slackware64,
|
||||
|
||||
/usr/lib64/libGL.so.1.2
|
||||
/usr/lib64/xorg/modules/extensions/{libglx.so libglx.la}
|
||||
|
||||
Simply remove the dead nvidia symlinks and rename the saved '-xorg'
|
||||
appended files.
|
||||
|
||||
Requires: nvidia-kernel,libvdpau
|
|
@ -1,19 +0,0 @@
|
|||
1.0 20-MAR-2011 New Maintainer: Edward W. Koenig <kingbeowulf@gmail.com>
|
||||
1.1 10-APR-2011 updated to new version, testing 13.37rc4.6692
|
||||
1.2 27-MAY-2011 new version, allow multilib option, minor edits
|
||||
1.2.1 20-JUN-2011 minor edits, thanks to Robby and Roberto
|
||||
1.5 01-JUL-2011 new version, single driver download, add switch to select pure x86_64 or x86_64 with 32-bit compatibility.
|
||||
1.6 27-AUG-2011 version bump, minor edits
|
||||
1.7 21-OCT-2011 version bump
|
||||
1.8 24-MAR-2012 version bump, fix to nvidia-switch thanks to Phill W.
|
||||
1.9 02-AUG-2012 version bmp, fixes, updates, nvidia-switch for install/uninstall only
|
||||
3.0 06-JUL-2013 Legacy 304 branch, removed 32-bit compatibility
|
||||
3.1 22-SEP-2013 version update
|
||||
3.1a 04-NOV-2013 minor fixes for 14.1 release
|
||||
3.2 08-FEB-2015 version update, restored 32-bit compatibility
|
||||
3.3 05-SEP-2015 version update
|
||||
3.4 13-DEC-2015 version update, X.org 1.18
|
||||
3.5 19-MAR-2016 remove nvidia-installer (doesn't compile on 14.2RC1), minor edits
|
||||
3.6 16-OCT-2016 bug fixes, added nvidia-installer
|
||||
4.0 15-FEB-2017 new version, security updates
|
||||
4.1 21-OCT-2017 new version for recent kernels
|
|
@ -1,6 +0,0 @@
|
|||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications
|
||||
fi
|
||||
|
||||
./usr/sbin/nvidia-switch --install
|
||||
|
|
@ -1,272 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Slackware build script for nvidia-driver
|
||||
|
||||
# Copyright 2007-2011 Heinz Wiesinger, Amsterdam, The Netherlands
|
||||
# Copyright 2011-2017 Edward W. koenig, Vancouver, WA, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Thanks to Robby Workman for suggestions to improve this script.
|
||||
#
|
||||
# See changelog.txt
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=nvidia-legacy304-driver
|
||||
VERSION=${VERSION:-304.137}
|
||||
MVERS=304
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
CPROXY=${CPROXY:-no}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
TARGET="x86"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
TARGET="x86"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
TARGET="x86_64"
|
||||
LIBDIRSUFFIX="64"
|
||||
# Set 32-bit compatibility flag default
|
||||
COMPAT32=${COMPAT32:-no}
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
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.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$TARGET-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf nvidia-installer-$VERSION
|
||||
tar xvf $CWD/nvidia-installer-$VERSION.tar.bz2
|
||||
rm -rf nvidia-settings-$VERSION
|
||||
tar xvf $CWD/nvidia-settings-$VERSION.tar.bz2
|
||||
rm -rf nvidia-xconfig-$VERSION
|
||||
tar xvf $CWD/nvidia-xconfig-$VERSION.tar.bz2
|
||||
rm -rf $SRCNAM
|
||||
sh $CWD/$SRCNAM.run --extract-only
|
||||
cd $SRCNAM
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
|
||||
$PKG/etc/OpenCL/vendors/ $PKG/usr/lib$LIBDIRSUFFIX/tls \
|
||||
$PKG/usr/{bin,man/man1,sbin} $PKG/usr/share/{applications,pixmaps} \
|
||||
$PKG/usr/include/GL
|
||||
|
||||
# Get all the libs to the right place
|
||||
install -m 755 nvidia_drv.so $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/drivers/
|
||||
install -m 755 libcuda.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libglx.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/extensions/libglx.so.$VERSION-nvidia
|
||||
install -m 755 libGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.$VERSION-nvidia
|
||||
install -m 755 libnvcuvid.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libnvidia-cfg.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libnvidia-compiler.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libnvidia-ml.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libnvidia-opencl.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/
|
||||
install -m 755 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libXvMCNVIDIA.a $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libXvMCNVIDIA.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libvdpau_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
|
||||
# For 8-series GPU if libwfb.so is missing (ie older X servers).
|
||||
install -m 755 libnvidia-wfb.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/libnvidia-wfb.so.$VERSION-nvidia
|
||||
|
||||
install -m 644 nvidia.icd $PKG/etc/OpenCL/vendors/
|
||||
|
||||
# Add optional 32-bit support
|
||||
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
|
||||
mkdir -p $PKG/usr/lib/tls
|
||||
|
||||
install -m 755 32/libcuda.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/libGL.so.$VERSION-nvidia
|
||||
install -m 755 32/libnvidia-compiler.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-glcore.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-ml.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-opencl.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/
|
||||
install -m 755 32/libOpenCL.so.1.0.0 $PKG/usr/lib/
|
||||
install -m 755 32/libvdpau_nvidia.so.$VERSION $PKG/usr/lib/
|
||||
fi
|
||||
|
||||
# symlinks
|
||||
cd $PKG/usr/lib$LIBDIRSUFFIX
|
||||
for i in libcuda libnvidia-cfg; do
|
||||
ln -s $i.so.$VERSION $i.so.1
|
||||
ln -s $i.so.1 $i.so
|
||||
done
|
||||
ln -sf libOpenCL.so.1.0.0 libOpenCL.so.1.0
|
||||
ln -sf libOpenCL.so.1.0 libOpenCL.so.1
|
||||
ln -sf libOpenCL.so.1 libOpenCL.so
|
||||
ln -sf libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so
|
||||
ln -sf tls/libnvidia-tls.so.$VERSION libnvidia-tls.so.$VERSION
|
||||
cd -
|
||||
|
||||
# symlinks for optional 32-bit support
|
||||
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
|
||||
cd $PKG/usr/lib
|
||||
ln -sf libcuda.so.$VERSION libcuda.so.$MVERS
|
||||
ln -sf libcuda.so.$MVERS libcuda.so
|
||||
ln -sf libOpenCL.so.1.0.0 libOpenCL.so.1.0
|
||||
ln -sf libOpenCL.so.1.0 libOpenCL.so.1
|
||||
ln -sf libOpenCL.so.1 libOpenCL.so
|
||||
ln -sf libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so
|
||||
ln -sf tls/libnvidia-tls.so.$VERSION libnvidia-tls.so.$VERSION
|
||||
cd -
|
||||
fi
|
||||
|
||||
# Next come the apps
|
||||
for i in nvidia-smi nvidia-bug-report.sh nvidia-debugdump; do
|
||||
install -m 755 $i $PKG/usr/bin/
|
||||
done
|
||||
|
||||
install -m 644 nvidia-smi.1.gz $PKG/usr/man/man1/
|
||||
|
||||
# New CUDA proxy server for 64-bit Linux only, and requires a device that supports
|
||||
# Unified Virtual Address (UVA) and CUDA 4.0+.
|
||||
if [ "$ARCH" = "x86_64" -a "${CPROXY}" = "yes" ]; then
|
||||
install -m 755 nvidia-cuda-mps-control $PKG/usr/bin/
|
||||
install -m 755 nvidia-cuda-mps-server $PKG/usr/bin/
|
||||
install -m 644 nvidia-cuda-mps-control.1.gz $PKG/usr/man/man1/
|
||||
fi
|
||||
|
||||
# Compiling nvidia-installer from source
|
||||
# Not really needed for this SBo package...yet!
|
||||
cd $TMP/nvidia-installer-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
CFLAGS="$SLKCFLAGS" LDFLAGS="-lz" make
|
||||
|
||||
install -m 755 _out/Linux_$TARGET/nvidia-installer $PKG/usr/bin/
|
||||
install -m 644 _out/Linux_$TARGET/nvidia-installer.1.gz $PKG/usr/man/man1/
|
||||
cd -
|
||||
|
||||
# Compiling nvidia-settings from source
|
||||
cd $TMP/nvidia-settings-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
cd src/libXNVCtrl
|
||||
make clean
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
make
|
||||
cd ../../
|
||||
|
||||
CFLAGS="$SLKCFLAGS -fcommon" \
|
||||
make
|
||||
|
||||
install -m 755 src/_out/Linux_$TARGET/nvidia-settings $PKG/usr/bin/
|
||||
install -m 644 doc/_out/Linux_$TARGET/nvidia-settings.1.gz $PKG/usr/man/man1/
|
||||
install -m 644 doc/nvidia-settings.desktop $PKG/usr/share/applications/
|
||||
install -m 644 doc/nvidia-settings.png $PKG/usr/share/pixmaps/
|
||||
cd ../
|
||||
|
||||
# Compiling nvidia-xconfig from source
|
||||
cd $TMP/nvidia-xconfig-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
make
|
||||
|
||||
install -m 755 _out/Linux_$TARGET/nvidia-xconfig $PKG/usr/bin/
|
||||
install -m 644 _out/Linux_$TARGET/nvidia-xconfig.1.gz $PKG/usr/man/man1/
|
||||
cd -
|
||||
|
||||
# Bash script to cleanly install (in doinst.sh) and uninstall the nvidia files
|
||||
# so we don't stomp on the overlapping xorg files.
|
||||
# Note: switching "on the fly" is no longer supported.
|
||||
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 [ ${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 update placeholders and correct wrong paths
|
||||
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
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cd $TMP/$SRCNAM
|
||||
cp -a LICENSE NVIDIA_Changelog README.txt html $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
sed "s/PKGVERSION/$VERSION/g" $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$TARGET-$BUILD$TAG.$PKGTYPE
|
|
@ -1,22 +0,0 @@
|
|||
PRGNAM="nvidia-legacy304-driver"
|
||||
VERSION="304.137"
|
||||
HOMEPAGE="http://www.nvidia.com"
|
||||
DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/304.137/NVIDIA-Linux-x86-304.137.run \
|
||||
https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-304.137.tar.bz2 \
|
||||
https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-304.137.tar.bz2 \
|
||||
https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-304.137.tar.bz2"
|
||||
MD5SUM="133098e70581f6b81c481338cc20f100 \
|
||||
857e15c72cbf72245d4c9e5215a24019 \
|
||||
51a4d5286557f11f06f42ca949431cf8 \
|
||||
40be98ce681fed695e8888f4483f0e48"
|
||||
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/304.137/NVIDIA-Linux-x86_64-304.137.run \
|
||||
https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-304.137.tar.bz2 \
|
||||
https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-304.137.tar.bz2 \
|
||||
https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-304.137.tar.bz2"
|
||||
MD5SUM_x86_64="a61b391d44aa6e7222f64502ef7f3ea1 \
|
||||
857e15c72cbf72245d4c9e5215a24019 \
|
||||
51a4d5286557f11f06f42ca949431cf8 \
|
||||
40be98ce681fed695e8888f4483f0e48"
|
||||
REQUIRES="nvidia-legacy304-kernel"
|
||||
MAINTAINER="unmaintained"
|
||||
EMAIL="unmaintained@gmail.com"
|
|
@ -1,158 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2012-2015 Edward W. Koenig, Vancouver, WA, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# nvidia-switch utility 2.3
|
||||
#
|
||||
# A tool to install and cleanly remove the nvidia driver without stomping on the xorg files.
|
||||
# Note: this tool "should" allow switching on the fly, but why? Pick a driver! You will still
|
||||
# need to edit a bunch of other config files.
|
||||
|
||||
# TO-DO: needs cleanup; too "wordy" and brittle.
|
||||
|
||||
set -e
|
||||
|
||||
ROOT="/"
|
||||
CWD=$(pwd)
|
||||
LIBSUFFIX="LIBDIRSUFFIX" # This will be replaced in the build script
|
||||
COMPAT32="LIB32FLAG" # This will be replaced in the build script (yes | no)
|
||||
INC="${ROOT}usr/include/GL"
|
||||
LIB="${ROOT}usr/lib${LIBSUFFIX}"
|
||||
LIB32="${ROOT}usr/lib"
|
||||
XMOD="${LIB}/xorg/modules"
|
||||
XLIB="$XMOD/extensions"
|
||||
NV_VERSION='PKGVERSION' # This will be replaced in the build script
|
||||
GL_VERSION="1.2.0"
|
||||
NV_CONF="/usr/share/X11/xorg.conf.d/10-nvidia.conf"
|
||||
|
||||
save_GL(){
|
||||
cd $2
|
||||
if [ "$1" = "nvidia" ]; then
|
||||
if [ ! -e libGL.so.$GL_VERSION-xorg ]; then
|
||||
mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg
|
||||
fi
|
||||
mv libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION
|
||||
ln -sf libGL.so.$NV_VERSION libGL.so.1
|
||||
ln -sf libGL.so.$NV_VERSION libGL.so
|
||||
fi
|
||||
|
||||
if [ "$1" = "xorg" ]; then
|
||||
mv libGL.so.$NV_VERSION libGL.so.$NV_VERSION-nvidia
|
||||
if [ -e libGL.so.$GL_VERSION-xorg ]; then
|
||||
mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION
|
||||
ln -sf libGL.so.$GL_VERSION libGL.so.1
|
||||
ln -sf libGL.so.$GL_VERSION libGL.so
|
||||
else
|
||||
echo WARNING: libGL.so.$GL_VERSION is missing.
|
||||
fi
|
||||
|
||||
fi
|
||||
cd "$CWD"
|
||||
}
|
||||
|
||||
save_wfb(){
|
||||
cd "$XMOD"
|
||||
if [ "$1" = "nvidia" ]; then
|
||||
mv libnvidia-wfb.so.$NV_VERSION-nvidia libnvidia-wfb.so.$NV_VERSION
|
||||
ln -sf libnvidia-wfb.so.$NV_VERSION libnvidia-wfb.so.1
|
||||
if [ ! -e libwfb.so ]; then
|
||||
mv libwfb.so libwfb.so-xorg
|
||||
ln -sf libnvidia-wfb.so.$NV_VERSION libwfb.so
|
||||
fi
|
||||
elif [ "$1" = "xorg" ]; then
|
||||
mv libnvidia-wfb.so.$NV_VERSION libnvidia-wfb.so.$NV_VERSION-nvidia
|
||||
rm -f libnvidia-wfb.so.1
|
||||
if [ -L libwfb.so ]; then
|
||||
rm -f libwfb.so
|
||||
if [ -e libwfb.so-xorg ]; then
|
||||
mv libwfb.so-xorg libwfb.so
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
cd "$CWD"
|
||||
}
|
||||
|
||||
save_glx(){
|
||||
cd "$XLIB"
|
||||
if [ "$1" = "nvidia" ]; then
|
||||
if [ ! -e libglx.so-xorg ]; then
|
||||
mv libglx.so libglx.so-xorg
|
||||
fi
|
||||
ln -sf libglx.so.$NV_VERSION-nvidia libglx.so.$NV_VERSION
|
||||
ln -sf libglx.so.$NV_VERSION libglx.so
|
||||
elif [ "$1" = "xorg" ]; then
|
||||
rm -f libglx.so.$NV_VERSION
|
||||
rm -f libglx.so
|
||||
mv libglx.so-xorg libglx.so
|
||||
fi
|
||||
cd "$CWD"
|
||||
}
|
||||
|
||||
nvidia_install(){
|
||||
echo $'Installing to nvidia-driver files!\n'
|
||||
echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf"
|
||||
echo "and in /etc/X11/xorg.conf.d."
|
||||
echo "Otherwise, this may lead to improperly working drivers."
|
||||
|
||||
save_GL "nvidia" $LIB
|
||||
save_wfb "nvidia"
|
||||
save_glx "nvidia"
|
||||
# Check for multilib configuration
|
||||
if [ "$COMPAT32" = "yes" ]; then
|
||||
save_GL "nvidia" $LIB32
|
||||
fi
|
||||
}
|
||||
|
||||
nvidia_remove(){
|
||||
echo $'Returning to stock xorg files!\n'
|
||||
echo "Make sure the nvidia driver is DISABLED in /etc/X11/xorg.conf"
|
||||
echo "and in /etc/X11/xorg.conf.d."
|
||||
echo "Otherwise, this may lead to improperly working drivers."
|
||||
|
||||
save_GL "xorg" $LIB
|
||||
save_wfb "xorg"
|
||||
save_glx "xorg"
|
||||
# Check for multilib configuration
|
||||
if [ "$COMPAT32" = "yes" ]; then
|
||||
save_GL "xorg" $LIB32
|
||||
fi
|
||||
|
||||
if [ -e $NV_CONF ]; then
|
||||
rm -f $NV_CONF
|
||||
fi
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo "Usage:"
|
||||
echo " --install Set up nvidia driver files (only during pkg install)"
|
||||
echo " --remove Return to stock xorg files and remove all symlinks"
|
||||
echo " --help Show this help message"
|
||||
}
|
||||
|
||||
if [ "$1" = '--install' ]; then
|
||||
nvidia_install
|
||||
elif [ "$1" = '--remove' ]; then
|
||||
nvidia_remove
|
||||
elif [ "$1" = '--help' ]; then
|
||||
usage
|
||||
else
|
||||
usage
|
||||
fi
|
|
@ -1,19 +0,0 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description.
|
||||
# Line up the first '|' above the ':' following the base package name, and
|
||||
# the '|' on the right side marks the last column you can put a character in.
|
||||
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
nvidia-legacy304-driver: nvidia-legacy304-driver (Proprietary Binary Nvidia Video Driver)
|
||||
nvidia-legacy304-driver:
|
||||
nvidia-legacy304-driver: This is the proprietary binary video driver from nvidia for
|
||||
nvidia-legacy304-driver: the x.org X server. This package does not include the kernel
|
||||
nvidia-legacy304-driver: module - it is included in the nvidia-kernel package.
|
||||
nvidia-legacy304-driver:
|
||||
nvidia-legacy304-driver: See /usr/doc/nvidia-driver-PKGVERSION/README.Slackware
|
||||
nvidia-legacy304-driver: for more information.
|
||||
nvidia-legacy304-driver:
|
||||
nvidia-legacy304-driver:
|
||||
nvidia-legacy304-driver:
|
Loading…
Reference in New Issue