diff --git a/srcpkgs/nvidia340/files/patch_nv1.diff b/srcpkgs/nvidia340/files/patch_nv1.diff new file mode 100644 index 00000000000..b6dc35a2e7f --- /dev/null +++ b/srcpkgs/nvidia340/files/patch_nv1.diff @@ -0,0 +1,14 @@ +--- kernel/nv-drm.c 2016-12-15 12:41:26.000000000 +0100 ++++ kernel/nv-drm.c 2016-12-15 12:58:48.000000000 +0100 +@@ -115,7 +115,11 @@ + }; + + static struct drm_driver nv_drm_driver = { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_LEGACY, ++#else + .driver_features = DRIVER_GEM | DRIVER_PRIME, ++#endif + .load = nv_drm_load, + .unload = nv_drm_unload, + .fops = &nv_drm_fops, diff --git a/srcpkgs/nvidia340/template b/srcpkgs/nvidia340/template index ca185fc5df7..9b91bec5b2e 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.101 -revision=1 +revision=2 maintainer="Juan RP " license="Proprietary NVIDIA license" homepage="http://www.nvidia.com" @@ -37,9 +37,12 @@ do_extract() { ./${_pkg}.run --extract-only rm -f ${_pkg}.run } + do_configure() { cd ${_pkg} + patch -p0 < ${FILESDIR}/patch_nv1.diff } + do_install() { cd ${_pkg}