aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2013-08-08 12:39:00 +0800
committerdanfe <danfe@FreeBSD.org>2013-08-08 12:39:00 +0800
commit7f9a3ea53e594200532b1ecd134206eda0debdbe (patch)
treea7e46b5768065410355d7c28aa710a1de762ec90
parentcced33b3501abcbf6b2b8ddf6bf32f2e5ee5734d (diff)
downloadfreebsd-ports-gnome-7f9a3ea53e594200532b1ecd134206eda0debdbe.tar.gz
freebsd-ports-gnome-7f9a3ea53e594200532b1ecd134206eda0debdbe.tar.zst
freebsd-ports-gnome-7f9a3ea53e594200532b1ecd134206eda0debdbe.zip
- Unbreak the build on recent -CURRENT after r254025 [1]
- Respect custom SRC_BASE (e.g. when set in /etc/make.conf) [2] - Few non-functional changes (mostly comments; particularly, restore hint about MASTER_SITE_SUBDIR, bogusly changed by yours truly in r315754) PR: ports/181118 [1] ports/176733 [2]
-rw-r--r--x11/nvidia-driver/Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index f7d3839d0231..51874ad3f30f 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -16,7 +16,7 @@ DISTVERSION?= 319.32
PORTREVISION?= 0
CATEGORIES= x11 kld
MASTER_SITES= ${MASTER_SITE_NVIDIA}
-# MASTER_SITE_SUBDIR it set later because it depends on NVVERSION
+# MASTER_SITE_SUBDIR has to be set later because it depends on NVVERSION
DISTNAME= NVIDIA-FreeBSD-x86${ARCH_SUFX}-${DISTVERSION}
MAINTAINER= danfe@FreeBSD.org
@@ -38,7 +38,8 @@ USE_LDCONFIG= yes
# fixed upstream (across all versions, including legacy ones), use this
# hack below to universally set NVIDIA_ROOT. Also provide X11BASE value
# since it is going away from `Mk/bsd.port.mk' as deprecated.
-MAKE_ENV= NVIDIA_ROOT=${WRKSRC} X11BASE=${LOCALBASE}
+MAKE_ENV= NVIDIA_ROOT=${WRKSRC} X11BASE=${LOCALBASE} \
+ SYSDIR=${SRC_BASE}/sys
SUB_FILES= pkg-deinstall pkg-install pkg-message
DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0
MODULESDIR= lib/xorg/modules
@@ -64,9 +65,9 @@ EXTRA_PATCHES= ${FILESDIR}/legacy-patch-nvidia.lib.mk
# Fix recent arbitrary memory access vulnerability in legacy drivers
.if ${NVVERSION} <= 1905300
-. if ${NVVERSION} != 1731435
+. if ${NVVERSION} != 1731435
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-0946
-. endif
+. endif
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-4225
.endif
@@ -106,7 +107,7 @@ IGNORE= requires fairly recent FreeBSD-STABLE, or FreeBSD-CURRENT
.endif
.if ${NVVERSION} < 1952200
-# ABI version is hardcoded inside the binary, so better be explicit here
+# ABI version is hardcoded inside the binary, so specify it explicitly
LIB_DEPENDS= libm.so.3:${PORTSDIR}/misc/compat5x
.endif
@@ -155,6 +156,11 @@ post-patch: .SILENT
/return SYSCTL_OUT\(req, bus_type/d' \
${WRKSRC}/src/nvidia_sysctl.c
.endif
+# Catch up with KVA space allocation API changes in recent -CURRENT
+.if ${OSVERSION} > 1000040
+ ${REINPLACE_CMD} -e 's/kmem_free(kernel_map,/kva_free(/ ; \
+ /kmem_alloc_contig/s/map/arena/' ${WRKSRC}/src/nvidia_subr.c
+.endif
# Process OPTIONS
.if ${PORT_OPTIONS:MFREEBSD_AGP}
${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \