diff options
author | Edward Koenig <kingbeowulf@gmail.com> | 2015-02-11 22:24:54 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-02-11 22:24:54 +0700 |
commit | 2b3956c934226e1160346ee65da26bffd05fbb46 (patch) | |
tree | ad3759504093a11cea533b882b84023e1c697cfe /system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild | |
parent | a7b8233afc1929e310f19b4ae1ad4f589f10e35a (diff) |
system/nvidia-legacy304-driver: Updated for version 304.125.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild')
-rw-r--r-- | system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild | 111 |
1 files changed, 67 insertions, 44 deletions
diff --git a/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild b/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild index b452b3316468..523d3b3a8847 100644 --- a/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild +++ b/system/nvidia-legacy304-driver/nvidia-legacy304-driver.SlackBuild @@ -25,27 +25,14 @@ # Thanks to Robby Workman for suggestions to improve this script. # -# ChangeLog -# ------------------------------------------------------------------------------ -# 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-JUNE-2011 minor edits, thanks to Robby and Roberto -# 1.5 01-JULY-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 +# See changelog.txt PRGNAM=nvidia-legacy304-driver -VERSION=304.108 +VERSION=${VERSION:-304.125} MVERS=304 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +CPROXY=${CPROXY:-no} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -64,24 +51,22 @@ if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" TARGET="x86" LIBDIRSUFFIX="" - COMPAT32="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" TARGET="x86" LIBDIRSUFFIX="" - COMPAT32="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" TARGET="x86_64" LIBDIRSUFFIX="64" - COMPAT32="-no-compat32" +# Set 32-bit compatibility flag default + COMPAT32=${COMPAT32:-no} else SLKCFLAGS="-O2" LIBDIRSUFFIX="" - COMPAT32="" fi -SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}$COMPAT32 +SRCNAM=NVIDIA-Linux-$TARGET-${VERSION} set -e @@ -102,52 +87,78 @@ 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 {} \; + -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 libGL.la $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 444 libXvMCNVIDIA.a $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libXvMCNVIDIA.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libcuda.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libnvidia-opencl.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libnvidia-wfb.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/ -install -m 755 libnvidia-cfg.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libGL.la $PKG/usr/lib$LIBDIRSUFFIX/libGL.la-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 644 nvidia.icd $PKG/etc/OpenCL/vendors/ +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/ # 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 # Don't forget separate libvdpau package on SBo. install -m 755 libvdpau_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libvdpau_trace.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ + +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/libGL.la $PKG/usr/lib/libGL.la-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-opencl.so.$VERSION $PKG/usr/lib/ + install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/ + install -m 755 32/libnvidia-opencl.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libnvidia-ml.so.$VERSION $PKG/usr/lib/ + 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 libnvcuvid libXvMCNVIDIA; do + 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 - -cd $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules - ln -sf libnvidia-wfb.so.$VERSION libnvidia-wfb.so -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 @@ -156,7 +167,16 @@ 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 cd $TMP/nvidia-installer-$VERSION chown -R root:root . find -L . \ @@ -165,9 +185,7 @@ cd $TMP/nvidia-installer-$VERSION \( -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 + 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/ @@ -215,14 +233,19 @@ 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" no longer supported. +# 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 correct wrong paths -sed -i "s|__LIBGL_PATH__|/usr/lib$LIBDIRSUFFIX/|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la -sed -i "s|/usr/X11R6/lib|/usr/lib$LIBDIRSUFFIX/|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la +# These update placeholders and correct wrong paths +sed -i "s|__LIBGL_PATH__|/usr/lib$LIBDIRSUFFIX/|" $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|" \ |