From owner-svn-ports-all@freebsd.org Thu Feb 4 12:55:12 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44FD6542C3F; Thu, 4 Feb 2021 12:55:12 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DWdnD1Wkpz3pxR; Thu, 4 Feb 2021 12:55:12 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2737D40AA; Thu, 4 Feb 2021 12:55:12 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 114CtCCw040679; Thu, 4 Feb 2021 12:55:12 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 114CtCLC040678; Thu, 4 Feb 2021 12:55:12 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202102041255.114CtCLC040678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Thu, 4 Feb 2021 12:55:12 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r564024 - head/x11/nvidia-driver X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: head/x11/nvidia-driver X-SVN-Commit-Revision: 564024 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 12:55:12 -0000 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 ; }' \