summaryrefslogtreecommitdiff
path: root/sys-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/nvidia-drivers-dkms/Manifest1
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-370.28-conf.patch28
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-370.28.ebuild46
3 files changed, 75 insertions, 0 deletions
diff --git a/sys-kernel/nvidia-drivers-dkms/Manifest b/sys-kernel/nvidia-drivers-dkms/Manifest
new file mode 100644
index 00000000..7ad5acbe
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/Manifest
@@ -0,0 +1 @@
+DIST NVIDIA-Linux-x86_64-370.28.run 76690360 SHA256 90aa3c186e45b39e6fc0064ab8dbda8bcc897cb61d2e7b7cb30b4ec9a4b39239 SHA512 931476f92a63d142478b2d6b3da4031769fd3b93aee2387800a78b1354b59a5fb5e4e293436b6b4c246627d51c0f55d140ab230de385cb1567bc8b25518eb741 WHIRLPOOL ce866c38291d2ab4aeeff05654a0e61196129f77baea5af93ddbc22fab9574ba39cc05d58020ea2407cc7342f0bcf5c2702d42290f4cc3b53c9e04fb7c617413
diff --git a/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-370.28-conf.patch b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-370.28-conf.patch
new file mode 100644
index 00000000..a48450a1
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-370.28-conf.patch
@@ -0,0 +1,28 @@
+diff -Nur a/kernel/dkms.conf b/kernel/dkms.conf
+--- a/kernel/dkms.conf 2016-09-02 02:32:09.000000000 +0100
++++ b/kernel/dkms.conf 2016-10-23 17:36:01.946597121 +0100
+@@ -1,12 +1,20 @@
+-PACKAGE_NAME="nvidia"
+-PACKAGE_VERSION="__VERSION_STRING"
++PACKAGE_NAME="nvidia-drivers-dkms"
++PACKAGE_VERSION="370.28"
+ AUTOINSTALL="yes"
+
+ # By default, DKMS will add KERNELRELEASE to the make command line; however,
+ # this will cause the kernel module build to infer that it was invoked via
+ # Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting
+ # the 'make' command name to suppress this behavior.
+-MAKE[0]="'make' -j__JOBS NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=${kernelver} modules"
++MAKE[0]="'make' -j`nproc` NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=${kernelver} modules"
+
+ # The list of kernel modules will be generated by nvidia-installer at runtime.
+-__DKMS_MODULES
++BUILT_MODULE_NAME[0]="nvidia"
++DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
++BUILT_MODULE_NAME[1]="nvidia-uvm"
++DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
++BUILT_MODULE_NAME[2]="nvidia-modeset"
++DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
++BUILT_MODULE_NAME[3]="nvidia-drm"
++DEST_MODULE_LOCATION[3]="/kernel/drivers/video"
++
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-370.28.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-370.28.ebuild
new file mode 100644
index 00000000..e8c2780d
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-370.28.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+NV_URI="http://us.download.nvidia.com/XFree86/"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
+
+DESCRIPTION="NVIDIA driver sources for linux"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
+
+LICENSE="GPL-2 NVIDIA-r2"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE=""
+
+DEPEND="sys-kernel/dkms"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${AMD64_NV_PACKAGE}"
+
+src_unpack() {
+ sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only
+}
+
+src_prepare() {
+ epatch ${FILESDIR}/${P}-conf.patch
+}
+
+src_install() {
+ dodir /usr/src/${P}
+ insinto /usr/src/${P}
+ doins -r "${S}"/kernel/*
+}
+
+pkg_postinst() {
+ dkms add ${PN}/${PV}
+}
+
+pkg_postrm() {
+ dkms remove ${PN}/${PV} --all
+}