From bc0f2c0524d09ed2219aab141fc96022dbc8aa58 Mon Sep 17 00:00:00 2001 From: graysky Date: Fri, 10 Jan 2020 15:03:48 -0500 Subject: [PATCH] Update to 340.108-2 --- .SRCINFO | 3 ++- PKGBUILD | 3 ++- fix_multi_core_build.patch | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 fix_multi_core_build.patch diff --git a/.SRCINFO b/.SRCINFO index 06f405f..c63f822 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = nvidia-340xx pkgdesc = NVIDIA drivers for linux, 340xx legacy branch pkgver = 340.108 - pkgrel = 1 + pkgrel = 2 url = https://www.nvidia.com/ arch = x86_64 license = custom @@ -12,6 +12,7 @@ pkgbase = nvidia-340xx options = !strip source = https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run source = unfuck-340.108-build-fix.patch + source = fix_multi_core_build.patch sha256sums = 995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77 sha256sums = 2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57 diff --git a/PKGBUILD b/PKGBUILD index 7d3a2b8..91503de 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=nvidia-340xx pkgname=(nvidia-340xx nvidia-340xx-dkms) pkgver=340.108 -pkgrel=1 +pkgrel=2 pkgdesc="NVIDIA drivers for linux, 340xx legacy branch" arch=('x86_64') url="https://www.nvidia.com/" @@ -18,6 +18,7 @@ options=(!strip) # https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" unfuck-340.108-build-fix.patch + fix_multi_core_build.patch ) sha256sums=('995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77' '2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57') diff --git a/fix_multi_core_build.patch b/fix_multi_core_build.patch new file mode 100644 index 0000000..0f5f687 --- /dev/null +++ b/fix_multi_core_build.patch @@ -0,0 +1,20 @@ +This patch will allow the call to make by dkms to use all host cpu cores. +See: https://github.com/dell/dkms/issues/100 + +--- a/dkms.conf 2019-12-11 17:04:24.000000000 -0500 ++++ b/dkms.conf 2020-01-10 12:47:44.770501121 -0500 +@@ -1,7 +1,13 @@ ++if [ -x /usr/bin/nproc ]; then ++ num_cpu_cores=$(nproc) ++else ++ num_cpu_cores=1 ++fi ++ + PACKAGE_NAME="nvidia" + PACKAGE_VERSION="340.108" + BUILT_MODULE_NAME[0]="$PACKAGE_NAME" + DEST_MODULE_LOCATION[0]="/kernel/drivers/video" +-MAKE[0]="make module KERNEL_UNAME=${kernelver}" ++MAKE[0]="make -j$num_cpu_cores module KERNEL_UNAME=${kernelver}" + CLEAN="make clean" + AUTOINSTALL="yes"