Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2021 12:55:12 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r564024 - head/x11/nvidia-driver
Message-ID:  <202102041255.114CtCLC040678@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 ; }' \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102041255.114CtCLC040678>