svn commit: r354638 - in head/x11/nvidia-driver: . files

Marius Strobl marius at FreeBSD.org
Tue May 20 13:23:17 UTC 2014


Author: marius
Date: Tue May 20 13:23:15 2014
New Revision: 354638
URL: http://svnweb.freebsd.org/changeset/ports/354638
QAT: https://qat.redports.org/buildarchive/r354638/

Log:
  - Update nvidia-driver to 331.67.
  - For i386, allow to build the non-legacy NVIDIA drivers with PAE support
    via an option, defaulting to disabled. This is tricky in two ways. First
    off, while their binary part is PAE-capable since around version 285,
    their build glue and wrapper only partially is. Second, for modules
    built along the kernel, enabled PAE support would be picked up via the
    generated opt_global.h from KERNBUILDDIR, which isn't available when
    compiling modules stand-alone. Nevertheless, these source modifications
    are modeled in a way so they also do the right thing when integrating a
    nvidia-driver module into a kernel build.
  
  Approved by:	maintainer timeout (2 weeks)
  Sponsored by:   Bally Wulff Games & Entertainment GmbH

Added:
  head/x11/nvidia-driver/files/extra-patch-src-Makefile   (contents, props changed)
  head/x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h   (contents, props changed)
  head/x11/nvidia-driver/files/extra-patch-src-nv-misc.h   (contents, props changed)
Modified:
  head/x11/nvidia-driver/Makefile
  head/x11/nvidia-driver/distinfo

Modified: head/x11/nvidia-driver/Makefile
==============================================================================
--- head/x11/nvidia-driver/Makefile	Tue May 20 13:21:38 2014	(r354637)
+++ head/x11/nvidia-driver/Makefile	Tue May 20 13:23:15 2014	(r354638)
@@ -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-
 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

Modified: head/x11/nvidia-driver/distinfo
==============================================================================
--- head/x11/nvidia-driver/distinfo	Tue May 20 13:21:38 2014	(r354637)
+++ head/x11/nvidia-driver/distinfo	Tue May 20 13:23:15 2014	(r354638)
@@ -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

Added: head/x11/nvidia-driver/files/extra-patch-src-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/nvidia-driver/files/extra-patch-src-Makefile	Tue May 20 13:23:15 2014	(r354638)
@@ -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

Added: head/x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/nvidia-driver/files/extra-patch-src-nv-freebsd.h	Tue May 20 13:23:15 2014	(r354638)
@@ -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.

Added: head/x11/nvidia-driver/files/extra-patch-src-nv-misc.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/nvidia-driver/files/extra-patch-src-nv-misc.h	Tue May 20 13:23:15 2014	(r354638)
@@ -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"
+ 


More information about the svn-ports-all mailing list