svn commit: r420499 - head/x11/nvidia-driver

Alexey Dokuchaev danfe at FreeBSD.org
Fri Aug 19 23:12:00 UTC 2016


Author: danfe
Date: Fri Aug 19 23:11:59 2016
New Revision: 420499
URL: https://svnweb.freebsd.org/changeset/ports/420499

Log:
  Clean up the Makefile after recent changes: put source code and build logic
  patching closer together and move OPTIONS-related patching thereafter.  Non
  functional.

Modified:
  head/x11/nvidia-driver/Makefile

Modified: head/x11/nvidia-driver/Makefile
==============================================================================
--- head/x11/nvidia-driver/Makefile	Fri Aug 19 22:45:12 2016	(r420498)
+++ head/x11/nvidia-driver/Makefile	Fri Aug 19 23:11:59 2016	(r420499)
@@ -127,27 +127,7 @@ post-patch: .SILENT
 # Fix stack buffer overflow in nvidia_sysctl_bus_type()
 	${REINPLACE_CMD} -e 's/8 bus_type\[4\]/8 bus_type[8]/' \
 		${WRKSRC}/src/nvidia_sysctl.c
-# Process OPTIONS
-.if ${PORT_OPTIONS:MFREEBSD_AGP}
-	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
-		${WRKSRC}/src/nv-freebsd.h
-.endif
-.if ${PORT_OPTIONS:MACPI_PM}
-	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \
-		${WRKSRC}/src/nv-freebsd.h
-.endif
-.if ! ${PORT_OPTIONS:MLINUX}
-	${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
-.endif
+# Respect WITHOUT_LINUX setting
 	${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& !defined(WITHOUT_LINUX)/' \
 		${WRKSRC}/lib/Makefile
 # Do not install VDPAU libraries which are provided by `multimedia/libvdpau'
@@ -162,10 +142,6 @@ post-patch: .SILENT
 .if ${NVVERSION} >= 346.016
 	${REINPLACE_CMD} -e '/libnvidia-gtk/d' ${WRKSRC}/lib/Makefile
 .endif
-# Conditionally install documentation (but you generally want it)
-.if ! ${PORT_OPTIONS:MDOCS}
-	${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile
-.endif
 # Adjust installation paths of some conflicting files (shared also between
 # libGL, libEGL, libGLESv2, and xorg-server) to ease package manager work
 	${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \
@@ -189,6 +165,31 @@ post-patch: .SILENT
 	${REINPLACE_CMD} -e 's,/usr/share/nvidia,${STAGEDIR}${DOCSDIR},' \
 		${WRKSRC}/lib/libGL/Makefile ${WRKSRC}/doc/Makefile
 .endif
+# Finally, process OPTIONS
+.if ${PORT_OPTIONS:MFREEBSD_AGP}
+	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
+		${WRKSRC}/src/nv-freebsd.h
+.endif
+.if ${PORT_OPTIONS:MACPI_PM}
+	${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \
+		${WRKSRC}/src/nv-freebsd.h
+.endif
+.if ! ${PORT_OPTIONS:MLINUX}
+	${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
+.endif
+# Conditionally install documentation (but you generally want it)
+.if ! ${PORT_OPTIONS:MDOCS}
+	${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile
+.endif
 
 pre-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/${MODULESDIR}/drivers \


More information about the svn-ports-all mailing list