aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2022-01-02 15:47:24 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2022-01-02 15:47:24 +0000
commit0375fc8f10e7ebcee63258c57abcd80e3c84333f (patch)
tree1e3cf78306d0c71a063b9064aacf4c66cc408371
parent04138ea7ad4820107903e8c7040b1fa71c7a19bb (diff)
downloadports-0375fc8f10e7ebcee63258c57abcd80e3c84333f.tar.gz
ports-0375fc8f10e7ebcee63258c57abcd80e3c84333f.zip
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
-rw-r--r--x11/nvidia-driver/Makefile7
1 files 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