summaryrefslogtreecommitdiff
path: root/system/nvidia-driver/nvidia-driver.SlackBuild
diff options
context:
space:
mode:
authorEdward W. Koenig <kingbeowulf@gmail.com>2016-09-01 18:30:48 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-09-03 07:48:54 +0700
commitc78bfeb65130ee9fa7d087b56bf2f8650b10196e (patch)
tree3f10ce3622b760258009d0391f62ff63e40a83ac /system/nvidia-driver/nvidia-driver.SlackBuild
parent69e8ff73e7c56f8513fbf0eebe5e7ba8258d12e7 (diff)
downloadslackbuilds-c78bfeb65130ee9fa7d087b56bf2f8650b10196e.tar.gz
system/nvidia-driver: Updated for version 367.44.
Added nvidia-installer, updated libs/symlinks Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/nvidia-driver/nvidia-driver.SlackBuild')
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild156
1 files changed, 85 insertions, 71 deletions
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index 7d858285ca..2040c422e8 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -26,11 +26,12 @@
# see changelog.txt
PRGNAM=nvidia-driver
-VERSION=${VERSION:-361.45.11}
+VERSION=${VERSION:-367.44}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CPROXY=${CPROXY:-yes}
-#GLVND=${GLVND:-no} # possibly switch needed?
+GLVND=${GLVND:-no} # change at your peril ;-)
+# Note: libglvnd may land in X.org Mesa
set -e
@@ -71,6 +72,8 @@ SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
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
@@ -92,149 +95,140 @@ find -L . \
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
+ $PKG/usr/include/GL $PKG/etc/vulcan/ic.d/
-# Get all the libs to the right place
+# Main driver
install -m 755 nvidia_drv.so $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/drivers/
install -m 755 libGL.la $PKG/usr/lib$LIBDIRSUFFIX/libGL.la-nvidia
-## GLVND libGL libraries for future consideration, conflict with non-GLVND versions
-#install -m 755 libGL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.1.0.0-nvidia
-#install -m 755 libGLX.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
-#
-# non-GLVND GLX client libraries are the default
-install -m 755 libGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX
-install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/
-#
-# we'll try leaving these in to get EGL etc support that needs GLVND (see README.txt)
+if [ "$GLVND" = "no" ]; then
+# The non-GLVND GLX client libraries are the default
+ install -m 755 libGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+else
+# GLVND libGL libraries for future consideration, conflict with non-GLVND versions
+ install -m 755 libGL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.1.0.0-nvidia
+fi
+
+# EGL requires the non-conflicting GLVND libs
+install -m 755 libGLX.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libGLX_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libOpenGL.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libGLdispatch.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
+
+# we'll try leaving these in to get EGL which needs GLVND (see README.txt)
install -m 755 libEGL.so.1 $PKG/usr/lib$LIBDIRSUFFIX/libEGL.so.1-nvidia
+install -m 755 libEGL_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libGLESv1_CM.so.1 $PKG/usr/lib$LIBDIRSUFFIX/libGLESv1_CM.so.1-nvidia
install -m 755 libGLESv2.so.2 $PKG/usr/lib$LIBDIRSUFFIX/libGLESv2.so.2-nvidia
install -m 755 libGLESv1_CM_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libGLESv2_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libEGL_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libGLdispatch.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libnvidia-eglcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libOpenGL.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
-#
-# Recommended GLVD bit
-install -m 755 libGLX_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-# All the rest...
+# common libs
+install -m 755 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/
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 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/
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-eglcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvidia-egl-wayland.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-encode.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-fatbinaryloader.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-fbc.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-glsi.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-ifr.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 libnvidia-ptxjitcompiler.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX
+install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/
install -m 755 libvdpau_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
# For nvidia-settings GUI support
install -m 755 libnvidia-gtk2.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-gtk3.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+#ICDs
install -m 644 nvidia.icd $PKG/etc/OpenCL/vendors/
+install -m 644 nvidia_icd.json $PKG/etc/vulcan/ic.d/
# Add optional 32-bit support
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
mkdir -p $PKG/usr/lib/tls
install -m 755 32/libGL.la $PKG/usr/lib/libGL.la-nvidia
-## GLVND libGL libraries for future consideration, conflict with non-GLVND versions
-#install -m 755 32/libGL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.1.0.0-nvidia
-#install -m 755 32/libGLX.so.0 $PKG/usr/lib$LIBDIRSUFFIX/
-#
-# non-GLVND GLX client libraries are the default
- install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/
- install -m 755 32/libnvidia-glcore.so.$VERSION $PKG/usr/lib/
- install -m 755 32/libnvidia-tls.so.$VERSION $PKG/usr/lib/
- install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/
-#
+ if [ "$GLVND" = "no" ]; then
+# The non-GLVND GLX client libraries are the default
+ install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/
+ else
+# GLVND libGL libraries for future consideration, conflict with non-GLVND versions
+ install -m 755 32/libGL.so.1.0.0 $PKG/usr/lib/libGL.so.1.0.0-nvidia
+ fi
+
+# EGL requires the non-conflicting GLVND libs
+ install -m 755 32/libGLX_nvidia.so.$VERSION $PKG/usr/lib/
+ install -m 755 32/libOpenGL.so.0 $PKG/usr/lib/
+ install -m 755 32/libGLdispatch.so.0 $PKG/usr/lib/
+ install -m 755 32/libGLX.so.0 $PKG/usr/lib/
+
+
# we'll try leaving these in to get EGL etc support that needs GLVND (see README.txt)
install -m 755 32/libEGL.so.1 $PKG/usr/lib/libEGL.so.1-nvidia
+ install -m 755 32/libEGL_nvidia.so.$VERSION $PKG/usr/lib/
install -m 755 32/libGLESv1_CM.so.1 $PKG/usr/lib/libGLESv1_CM.so.1-nvidia
install -m 755 32/libGLESv2.so.2 $PKG/usr/lib/libGLESv2.so.2-nvidia
install -m 755 32/libGLESv1_CM_nvidia.so.$VERSION $PKG/usr/lib/
install -m 755 32/libGLESv2_nvidia.so.$VERSION $PKG/usr/lib/
- install -m 755 32/libEGL_nvidia.so.$VERSION $PKG/usr/lib/
- install -m 755 32/libGLdispatch.so.0 $PKG/usr/lib/
- install -m 755 32/libnvidia-eglcore.so.$VERSION $PKG/usr/lib/
- install -m 755 32/libOpenGL.so.0 $PKG/usr/lib/
-#
-# Recommended GLVD bit
- install -m 755 32/libGLX_nvidia.so.$VERSION $PKG/usr/lib/
-
-# And the others...
+# Common libs
+ install -m 755 32/libOpenCL.so.1.0.0 $PKG/usr/lib/
install -m 755 32/libcuda.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvcuvid.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvidia-compiler.so.$VERSION $PKG/usr/lib/
+ install -m 755 32/libnvidia-eglcore.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvidia-encode.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvidia-fatbinaryloader.so.$VERSION $PKG/usr/lib/
+ install -m 755 32/libnvidia-glcore.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvidia-fbc.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvidia-glsi.so.$VERSION $PKG/usr/lib/
install -m 755 32/libnvidia-ifr.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/libnvidia-ptxjitcompiler.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/
+ install -m 755 32/libnvidia-tls.so.$VERSION $PKG/usr/lib
+ install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/
fi
-# symlinks
+# symlinks; see also 'nvidia-switch'
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 libnvcuvid.so.$VERSION libnvcuvid.so.1
- ln -sf libnvcuvid.so.1 libnvcuvid.so
+ ln -sf libcuda.so.$VERSION libcuda.so
ln -sf libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so
ln -sf libGLX_nvidia.so.$VERSION libGLX_nvidia.so.0
- ln -sf libGLX_nvidia.so.$VERSION libGLX_indirect.so.0
ln -sf libOpenGL.so.0 libOpenGL.so
ln -sf libEGL_nvidia.so.$VERSION libEGL_nvidia.so.0
ln -sf libGLESv1_CM_nvidia.so.$VERSION libGLESv1_CM_nvidia.so.1
ln -sf libGLESv2_nvidia.so.$VERSION libGLESv2_nvidia.so.2
ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so
- cd -
- cd $PKG/usr/lib$LIBDIRSUFFIX/tls
- ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so
- cd -
+cd -
+cd $PKG/usr/lib$LIBDIRSUFFIX/tls
+ ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.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.1
- ln -sf libcuda.so.1 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 libnvcuvid.so.$VERSION libnvcuvid.so.1
- ln -sf libnvcuvid.so.1 libnvcuvid.so
+ ln -sf libcuda.so.$VERSION libcuda.so
ln -sf libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so
ln -sf libGLX_nvidia.so.$VERSION libGLX_nvidia.so.0
- ln -sf libGLX_nvidia.so.$VERSION libGLX_indirect.so.0
ln -sf libOpenGL.so.0 libOpenGL.so
ln -sf libEGL_nvidia.so.$VERSION libEGL_nvidia.so.0
ln -sf libGLESv1_CM_nvidia.so.$VERSION libGLESv1_CM_nvidia.so.1
ln -sf libGLESv2_nvidia.so.$VERSION libGLESv2_nvidia.so.2
ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so
- cd -
- cd $PKG/usr/lib$LIBDIRSUFFIX/tls
- ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so
- cd -
+ cd -
+ cd $PKG/usr/lib$LIBDIRSUFFIX/tls
+ ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so
+ cd -
fi
# Next come the apps
@@ -252,6 +246,22 @@ if [ "$ARCH" = "x86_64" -a "${CPROXY}" = "yes" ]; then
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 .
@@ -346,6 +356,10 @@ 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
+if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
+ sed -i "s|__LIBGL_PATH__|/usr/lib/|" $PKG/usr/lib/libGL.la-nvidia
+ sed -i "s|/usr/X11R6/lib|/usr/lib/|" $PKG/usr/lib/libGL.la-nvidia
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $TMP/$SRCNAM