aboutsummaryrefslogtreecommitdiff
path: root/x11/nvidia-driver
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2014-05-20 13:23:15 +0000
committerMarius Strobl <marius@FreeBSD.org>2014-05-20 13:23:15 +0000
commit773fd2d837bde61a3b797e84f01b8d432e41a321 (patch)
tree8095e858159b0d295bb068b8bdaaba25098cc47d /x11/nvidia-driver
parent9c29ef5bc709e7fbcfd1156bfe2d9e67eea28305 (diff)
downloadports-773fd2d837bde61a3b797e84f01b8d432e41a321.tar.gz
ports-773fd2d837bde61a3b797e84f01b8d432e41a321.zip
Notes
Diffstat (limited to 'x11/nvidia-driver')
-rw-r--r--x11/nvidia-driver/Makefile21
-rw-r--r--x11/nvidia-driver/distinfo8
-rw-r--r--x11/nvidia-driver/files/extra-patch-src-Makefile18
-rw-r--r--x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h14
-rw-r--r--x11/nvidia-driver/files/extra-patch-src-nv-misc.h11
5 files changed, 65 insertions, 7 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index 098b4273b5ad..84b3e79c579f 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= nvidia-driver
-DISTVERSION?= 331.49
+DISTVERSION?= 331.67
# Always try to set PORTREVISION as it can be overridden by the slave ports
PORTREVISION?= 0
CATEGORIES= x11
@@ -56,6 +56,12 @@ EXTRA_PATCHES= ${FILESDIR}/legacy-patch-mk-nvidia.lib.mk
EXTRA_PATCHES= ${FILESDIR}/extra-patch-mk-nvidia.lib.mk
.endif
+.if ${NVVERSION} >= 3048800
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-Makefile \
+ ${FILESDIR}/extra-patch-src-nv-freebsd.h \
+ ${FILESDIR}/extra-patch-src-nv-misc.h
+.endif
+
.if ${NVVERSION} >= 3312000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-x11-driver-Makefile
.else
@@ -86,6 +92,11 @@ OPTIONS_DEFINE+= WBINVD
WBINVD_DESC= Flush CPU caches directly with WBINVD
.endif
+.if ${NVVERSION} >= 3048800
+OPTIONS_DEFINE_i386= PAE
+PAE_DESC= Physical Address Extensions Kernel
+.endif
+
PLIST_SUB+= LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \
MODULESDIR=${MODULESDIR}
@@ -150,7 +161,7 @@ post-patch: .SILENT
${WRKSRC}/src/nvidia_subr.c
.endif
# Adjust kmem(9) calls after FreeBSD src SVN r254025
-.if ${OSVERSION} > 1000040
+.if ${OSVERSION} > 1000040 && ${NVVERSION} < 3316700
${REINPLACE_CMD} -e '/kmem_/s/kernel_map/kernel_arena/' \
${WRKSRC}/src/nvidia_subr.c
.endif
@@ -161,7 +172,7 @@ post-patch: .SILENT
${WRKSRC}/src/nvidia_linux.c
.endif
# Argument count of vm_map_find() changed in FreeBSD src SVN r255426
-.if ${OSVERSION} > 1000054
+.if ${OSVERSION} > 1000054 && ${NVVERSION} < 3316700
${REINPLACE_CMD} -e 's/virtual_address, size,/& 0,/' \
${WRKSRC}/src/nvidia_subr.c
.endif
@@ -190,6 +201,10 @@ post-patch: .SILENT
${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \
${WRKSRC}/src/nv-freebsd.h
.endif
+.if ${PORT_OPTIONS:MPAE}
+ ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \
+ ${WRKSRC}/src/nv-freebsd.h
+.endif
.if ${PORT_OPTIONS:MWBINVD}
${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \
${WRKSRC}/src/nv-freebsd.h
diff --git a/x11/nvidia-driver/distinfo b/x11/nvidia-driver/distinfo
index 8b6aa9f20735..c26b8f546778 100644
--- a/x11/nvidia-driver/distinfo
+++ b/x11/nvidia-driver/distinfo
@@ -1,7 +1,7 @@
-SHA256 (NVIDIA-FreeBSD-x86_64-331.49.tar.gz) = 9ac938b54b85b4dd3fc22f10c6feee3d9c777d678dbc08dfa8214e7d917ae67d
-SIZE (NVIDIA-FreeBSD-x86_64-331.49.tar.gz) = 46988453
-SHA256 (NVIDIA-FreeBSD-x86-331.49.tar.gz) = 0686d20e647553f81afebc646b135b780c510679715344547ecc9244aff18cca
-SIZE (NVIDIA-FreeBSD-x86-331.49.tar.gz) = 55867593
+SHA256 (NVIDIA-FreeBSD-x86_64-331.67.tar.gz) = 5781bba8b7783f96c1f239961140317426910633fbfa3ba80fdcefe54aec7e92
+SIZE (NVIDIA-FreeBSD-x86_64-331.67.tar.gz) = 46997728
+SHA256 (NVIDIA-FreeBSD-x86-331.67.tar.gz) = 0c88c363db516ef09b0027aacb1e686191d3d4676f44445bab2156c2197a6cae
+SIZE (NVIDIA-FreeBSD-x86-331.67.tar.gz) = 55876749
SHA256 (NVIDIA-FreeBSD-x86_64-304.88.tar.gz) = be0e20a543fa14a8f91481dd64b080093b19edf951bf631c62365a64dadb1934
SIZE (NVIDIA-FreeBSD-x86_64-304.88.tar.gz) = 34597351
SHA256 (NVIDIA-FreeBSD-x86-304.88.tar.gz) = 739325b26a93d934d015159c420ef1875a24ccd62a5bb482e688cf918d4fa33d
diff --git a/x11/nvidia-driver/files/extra-patch-src-Makefile b/x11/nvidia-driver/files/extra-patch-src-Makefile
new file mode 100644
index 000000000000..03d383c719e3
--- /dev/null
+++ b/x11/nvidia-driver/files/extra-patch-src-Makefile
@@ -0,0 +1,18 @@
+--- src/Makefile.orig 2014-04-04 23:24:59.000000000 +0200
++++ src/Makefile 2014-05-06 14:31:07.000000000 +0200
+@@ -24,6 +24,15 @@
+ stdarg.h:
+ @ln -s machine/stdarg.h stdarg.h
+
++SRCS+= opt_global.h
++.if ${MACHINE_CPUARCH} == "i386" && !defined(KERNBUILDDIR)
++PAE!= sed -n '/define NV_SUPPORT_PAE/p' nv-freebsd.h
++.if !empty(PAE)
++opt_global.h:
++ echo "#define PAE 1" > ${.TARGET}
++.endif
++.endif
++
+ *.c: stdarg.h
+
+ beforeinstall: ${KMOD}.ko
diff --git a/x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h b/x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h
new file mode 100644
index 000000000000..4662aecb8331
--- /dev/null
+++ b/x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h
@@ -0,0 +1,14 @@
+--- src/nv-freebsd.h.orig 2014-02-13 05:07:44.000000000 +0100
++++ src/nv-freebsd.h 2014-05-05 18:38:59.000000000 +0200
+@@ -143,6 +143,11 @@
+ #define NV_SUPPORT_ACPI_PM
+
+ /*
++ * Enable/Disable support for PAE on i386.
++ */
++#undef NV_SUPPORT_PAE
++
++/*
+ * Enable/Disable heavy-weight cache-flush logic. By default, the driver
+ * relies on the kernel to perform cache flushes using optimized
+ * routines.
diff --git a/x11/nvidia-driver/files/extra-patch-src-nv-misc.h b/x11/nvidia-driver/files/extra-patch-src-nv-misc.h
new file mode 100644
index 000000000000..1a43fb40f029
--- /dev/null
+++ b/x11/nvidia-driver/files/extra-patch-src-nv-misc.h
@@ -0,0 +1,11 @@
+--- src/nv-misc.h.orig 2014-02-13 05:07:44.000000000 +0100
++++ src/nv-misc.h 2014-05-05 18:45:44.000000000 +0200
+@@ -11,6 +11,8 @@
+ #ifndef _NV_MISC_H_
+ #define _NV_MISC_H_
+
++#include "opt_global.h"
++
+ #include "nvtypes.h"
+ #include "rmretval.h"
+