git: 0375fc8f10e7 - main - x11/nvidia-driver: lax the check when applying fix for src df38ada293
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jan 2022 15:48:29 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=0375fc8f10e7ebcee63258c57abcd80e3c84333f commit 0375fc8f10e7ebcee63258c57abcd80e3c84333f Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2022-01-02 15:47:24 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2022-01-02 15:47:24 +0000 x11/nvidia-driver: lax the check when applying fix for src df38ada293 It turns out that NVVERSION check is not very accurate and may easily break the build in various circumstances. Also, do not use the line number as an anchor, just spell out the #include line in its entirety when removing it. PR: 260318 --- x11/nvidia-driver/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index e7de4d18e89a..383e2882d9b0 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -169,9 +169,10 @@ post-patch: .SILENT ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c .endif # After src df38ada2931f, `sys/module.h' must be included after `sys/param.h' -.if ${OSVERSION} >= 1400042 && ${NVVERSION} >= 358.009 - @${REINPLACE_CMD} -e '/^#include <sys\/module/ { x; \ - s:^:#include <sys/param.h>:; G; }; 14d' \ +.if ${NVVERSION} >= 358.009 + @${REINPLACE_CMD} -e '/^#include <sys\/param\.h>/d; \ + /^#include <sys\/module\.h>/ { x; \ + s:^:#include <sys/param.h>:; G; }' \ ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c .endif # Disable installation of Linux libraries (provided by the corresponding