diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-12-15 03:02:06 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-12-15 03:02:06 +0000 |
commit | c1eb97fea020ac09dc329651c4f33436e071997b (patch) | |
tree | e4542aed8b0d3bd3f4fee28641817c3a99b7812c | |
parent | 71f447ec1d0d131164ae0076174c09ab7940c521 (diff) | |
download | ports-c1eb97fea020ac09dc329651c4f33436e071997b.tar.gz ports-c1eb97fea020ac09dc329651c4f33436e071997b.zip |
x11/nvidia-driver: try to unbreak the build on recent -CURRENT
After src commit df38ada2931f, `sys/module.h' must be included
after `sys/param.h'.
PR: 260318
-rw-r--r-- | x11/nvidia-driver/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 6899b455b65c..e7de4d18e89a 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -168,6 +168,12 @@ post-patch: .SILENT ${REINPLACE_CMD} -e '/^#include/s:lock\.h:mutex.h:' \ ${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' \ + ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c +.endif # Disable installation of Linux libraries (provided by the corresponding # `x11/linux-nvidia-libs' port or its slaves) ${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& 0/' \ |