From e01d130b1ca8eacae2a2d1f54b22857649afdc98 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 7 Jul 2019 15:44:28 +0100 Subject: sys-kernel/nvidia-drivers-dkms : add a patch from ArchLinux to 430.26 driver (see https://bugs.archlinux.org/task/62142) --- sys-kernel/nvidia-drivers-dkms/files/fs62142.patch | 13 ++++++ .../nvidia-drivers-dkms-430.26-r1.ebuild | 47 ++++++++++++++++++++++ .../nvidia-drivers-dkms-430.26.ebuild | 46 --------------------- 3 files changed, 60 insertions(+), 46 deletions(-) create mode 100644 sys-kernel/nvidia-drivers-dkms/files/fs62142.patch create mode 100644 sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26-r1.ebuild delete mode 100644 sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26.ebuild (limited to 'sys-kernel/nvidia-drivers-dkms') diff --git a/sys-kernel/nvidia-drivers-dkms/files/fs62142.patch b/sys-kernel/nvidia-drivers-dkms/files/fs62142.patch new file mode 100644 index 00000000..04806bd8 --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/files/fs62142.patch @@ -0,0 +1,13 @@ +diff --git a/kernel/nvidia/nv-dma.c b/kernel/nvidia/nv-dma.c +index 73cdeed..e691014 100644 +--- a/kernel/nvidia/nv-dma.c ++++ b/kernel/nvidia/nv-dma.c +@@ -606,7 +606,7 @@ static NvBool nv_dma_is_map_resource_implemented + #if defined(NV_DMA_MAP_RESOURCE_PRESENT) + const struct dma_map_ops *ops = get_dma_ops(&nvl->dev->dev); + +- return (ops->map_resource != NULL); ++ return (ops && ops->map_resource); + #else + return NV_FALSE; + #endif diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26-r1.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26-r1.ebuild new file mode 100644 index 00000000..9130d290 --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +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/43026" +KEYWORDS="amd64" +IUSE="" + +DEPEND="sys-kernel/dkms" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/fs62142.patch + "${FILESDIR}"/"${P}"-conf.patch +) + +S="${WORKDIR}/${AMD64_NV_PACKAGE}" + +src_unpack() { + sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only +} + +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-430.26.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26.ebuild deleted file mode 100644 index 46ddb186..00000000 --- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-430.26.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=6 - -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/43026" -KEYWORDS="amd64" -IUSE="" - -DEPEND="sys-kernel/dkms" -RDEPEND="${DEPEND}" - -PATCHES=( - "${FILESDIR}"/"${P}"-conf.patch -) - -S="${WORKDIR}/${AMD64_NV_PACKAGE}" - -src_unpack() { - sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only -} - -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