From e47e40d4da273cedfc0f60a0e25566a19fc2e6fc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 29 Dec 2017 21:23:58 +0000 Subject: sys-kernel/nvidia-drivers-dkms : fix compiling with kernel > 4.14.9 --- .../nvidia-drivers-dkms-384.98-kernel-4.14.9.patch | 14 +++++++ .../nvidia-drivers-dkms-384.98-r2.ebuild | 46 --------------------- .../nvidia-drivers-dkms-384.98-r3.ebuild | 47 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 46 deletions(-) create mode 100644 sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-384.98-kernel-4.14.9.patch delete mode 100644 sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r2.ebuild create mode 100644 sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r3.ebuild (limited to 'sys-kernel') diff --git a/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-384.98-kernel-4.14.9.patch b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-384.98-kernel-4.14.9.patch new file mode 100644 index 00000000..89ad2df3 --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-384.98-kernel-4.14.9.patch @@ -0,0 +1,14 @@ +diff -durN a/kernel/nvidia-uvm/uvm8_va_block.c b/kernel/nvidia-uvm/uvm8_va_block.c +--- a/kernel/nvidia-uvm/uvm8_va_block.c 2017-12-26 11:20:17.097715622 +0100 ++++ b/kernel/nvidia-uvm/uvm8_va_block.c 2017-12-26 11:20:29.674381760 +0100 +@@ -36,6 +36,10 @@ + #include "uvm8_perf_prefetch.h" + #include "uvm8_mem.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,9) ++#include ++#endif ++ + typedef enum + { + BLOCK_PTE_OP_MAP, diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r2.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r2.ebuild deleted file mode 100644 index 7247e72f..00000000 --- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r2.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# 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/${PV}" -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_prerm() { - dkms remove ${PN}/${PV} --all -} diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r3.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r3.ebuild new file mode 100644 index 00000000..6c7d4f2c --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-384.98-r3.ebuild @@ -0,0 +1,47 @@ +# 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/${PV}" +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" + epatch ""${FILESDIR}"/"${P}"-kernel-4.14.9.patch" +} + +src_install() { + dodir /usr/src/${P} + insinto /usr/src/${P} + doins -r "${S}"/kernel/* +} + +pkg_postinst() { + dkms add ${PN}/${PV} +} + +pkg_prerm() { + dkms remove ${PN}/${PV} --all +} -- cgit v1.2.3