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

Alexey Dokuchaev danfe at FreeBSD.org
Thu Feb 4 12:55:12 UTC 2021


Author: danfe
Date: Thu Feb  4 12:55:11 2021
New Revision: 564024
URL: https://svnweb.freebsd.org/changeset/ports/564024

Log:
  Use more robust logic to remove the first #if __FreeBSD_version check so
  we can support officially unsupported versions (e.g. -CURRENT), hardcoded
  line numbers would no longer work after coming update to version 460.xx.

Modified:
  head/x11/nvidia-driver/Makefile

Modified: head/x11/nvidia-driver/Makefile
==============================================================================
--- head/x11/nvidia-driver/Makefile	Thu Feb  4 12:53:47 2021	(r564023)
+++ head/x11/nvidia-driver/Makefile	Thu Feb  4 12:55:11 2021	(r564024)
@@ -98,8 +98,10 @@ EXTRA_PATCHES+=	${WRKDIR}/${p}
 .endfor
 
 post-patch: .SILENT
-# We should support -CURRENT: kill the check
-	${REINPLACE_CMD} -e '24,26d' ${WRKSRC}/src/${NVSRC}/nv-freebsd.h
+# We should support -CURRENT: kill the check (first #if __FreeBSD_version)
+	linenum=$$(${SED} -ne '/^#if __FreeBSD_version/ {=; q;}' \
+		${WRKSRC}/src/${NVSRC}/nv-freebsd.h) ; ${REINPLACE_CMD} \
+		-e "$$linenum,+2d" ${WRKSRC}/src/${NVSRC}/nv-freebsd.h
 # Adjust Linux headers #include's after FreeBSD src r246085
 	${REINPLACE_CMD} -E '/#include "machine\/\.\.\/linux(32)?\/linux.h"/ \
 		{ x ; s/.*/#include "machine\/..\/..\/compat\/linux\/linux_ioctl.h"/ ; H ; x ; }' \


More information about the svn-ports-all mailing list