summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timo Gurr <tgurr@exherbo.org> 2017-05-10 21:38:21 +0200
committerAvatar Timo Gurr <tgurr@exherbo.org> 2017-05-10 22:00:55 +0200
commitefef7a3b09e171807f72b1b8cac821d7089e12e5 (patch)
tree6cd96e00f43ca4f13aaab88acb9845c011a08cb3
parent7c4b48da1e52011ed15623106e225e5421663f7a (diff)
downloadhardware-efef7a3b09e171807f72b1b8cac821d7089e12e5.tar.gz
hardware-efef7a3b09e171807f72b1b8cac821d7089e12e5.tar.xz
nvidia-drivers: patch for 381.22 to work with kernel 4.11 (masked)
Masked because it's a dirty hack.
-rw-r--r--packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-381.22-kernel-4.11.patch27
-rw-r--r--packages/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.exheres-011
2 files changed, 38 insertions, 0 deletions
diff --git a/packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-381.22-kernel-4.11.patch b/packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-381.22-kernel-4.11.patch
new file mode 100644
index 0000000..4d2f010
--- /dev/null
+++ b/packages/x11-drivers/nvidia-drivers/files/nvidia-drivers-381.22-kernel-4.11.patch
@@ -0,0 +1,27 @@
++Source: https://github.com/rpmfusion/nvidia-kmod/blob/master/kernel_4.11.patch
++Reason: Dirty hack to work with kernel 4.11
+
+--- a/kernel/nvidia-drm/nvidia-drm-linux.c
++++ b/kernel/nvidia-drm/nvidia-drm-linux.c
+@@ -20,6 +20,8 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
++
+ #include <linux/module.h>
+ #include <linux/slab.h>
+ #include <linux/err.h>
+@@ -196,7 +198,11 @@
+ module_exit(nv_linux_drm_exit);
+
+ #if defined(MODULE_LICENSE)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 10, 0)
++ MODULE_LICENSE("Dual MIT/GPL");
++#else
+ MODULE_LICENSE("MIT");
++#endif
+ #endif
+ #if defined(MODULE_INFO)
+ MODULE_INFO(supported, "external");
+
diff --git a/packages/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.exheres-0 b/packages/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.exheres-0
new file mode 100644
index 0000000..e7fa44d
--- /dev/null
+++ b/packages/x11-drivers/nvidia-drivers/nvidia-drivers-381.22-r1.exheres-0
@@ -0,0 +1,11 @@
+# Copyright 2010 Ingmar Vanhassel <ingmar@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require nvidia-drivers
+
+PLATFORMS="~amd64 ~x86"
+
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/${PN}-381.22-kernel-4.11.patch
+)
+