diff --git a/srcpkgs/nvidia340/files/linux-4.12.patch b/srcpkgs/nvidia340/files/linux-4.12.patch new file mode 100644 index 00000000000..87c50d6f497 --- /dev/null +++ b/srcpkgs/nvidia340/files/linux-4.12.patch @@ -0,0 +1,95 @@ +--- kernel/conftest.sh.orig 2017-07-04 19:34:18.849964147 +0200 ++++ kernel/conftest.sh 2017-07-04 19:40:00.084349448 +0200 +@@ -362,7 +362,11 @@ + # Determine if the set_memory_uc() function is present. + # + CODE=" +- #include ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++ #else ++ #include ++ #endif + void conftest_set_memory_uc(void) { + set_memory_uc(); + }" +@@ -375,7 +379,11 @@ + # Determine if the set_memory_array_uc() function is present. + # + CODE=" +- #include ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++ #else ++ #include ++ #endif + void conftest_set_memory_array_uc(void) { + set_memory_array_uc(); + }" +@@ -388,7 +396,11 @@ + # Determine if the set_pages_uc() function is present. + # + CODE=" +- #include ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++ #else ++ #include ++ #endif + void conftest_set_pages_uc(void) { + set_pages_uc(); + }" +--- kernel/uvm/conftest.sh.orig 2017-07-04 19:41:43.317660686 +0200 ++++ kernel/uvm/conftest.sh 2017-07-04 19:40:23.248644401 +0200 +@@ -362,7 +362,11 @@ + # Determine if the set_memory_uc() function is present. + # + CODE=" +- #include ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++ #else ++ #include ++ #endif + void conftest_set_memory_uc(void) { + set_memory_uc(); + }" +@@ -375,7 +379,11 @@ + # Determine if the set_memory_array_uc() function is present. + # + CODE=" +- #include ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++ #else ++ #include ++ #endif + void conftest_set_memory_array_uc(void) { + set_memory_array_uc(); + }" +@@ -388,7 +396,11 @@ + # Determine if the set_pages_uc() function is present. + # + CODE=" +- #include ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++ #else ++ #include ++ #endif + void conftest_set_pages_uc(void) { + set_pages_uc(); + }" +--- kernel/nv-vm.c.orig 2017-07-04 20:01:37.098802679 +0200 ++++ kernel/nv-vm.c 2017-07-04 20:02:23.720384972 +0200 +@@ -13,6 +13,10 @@ + #include "nv.h" + #include "nv-linux.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include ++#endif ++ + static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages) + { + if (nv_update_memory_types) diff --git a/srcpkgs/nvidia340/template b/srcpkgs/nvidia340/template index b8c3089d2c7..92433e64a99 100644 --- a/srcpkgs/nvidia340/template +++ b/srcpkgs/nvidia340/template @@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 8, 9, 9M, 100, 100M, 200, 300 series)" pkgname=nvidia340 version=340.102 -revision=4 +revision=5 maintainer="Juan RP " license="Proprietary NVIDIA license" homepage="http://www.nvidia.com" @@ -43,6 +43,7 @@ do_configure() { patch -p0 < ${FILESDIR}/patch_nv1.diff patch -p0 < ${FILESDIR}/4.10.0_kernel.patch patch -p0 < ${FILESDIR}/linux-4.11.patch + patch -p0 < ${FILESDIR}/linux-4.12.patch } do_install() {