aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/libfido2/Makefile8
-rw-r--r--security/libfido2/files/patch-CMakeLists.txt21
-rw-r--r--security/libfido2/files/patch-openbsd-compat-openbsd-compat.h20
3 files changed, 42 insertions, 7 deletions
diff --git a/security/libfido2/Makefile b/security/libfido2/Makefile
index 74b7a8b3d15c..aa7075c2391c 100644
--- a/security/libfido2/Makefile
+++ b/security/libfido2/Makefile
@@ -24,10 +24,4 @@ PLIST_SUB= PORTVERSION=${PORTVERSION}
OPTIONS_DEFINE= DOCS
-.include <bsd.port.pre.mk>
-
-post-patch:
- @${REINPLACE_CMD} -e '/libcrypto/d' ${WRKSRC}/CMakeLists.txt
- @${REINPLACE_CMD} -e 's|endian.h|sys/&|' ${WRKSRC}/CMakeLists.txt ${WRKSRC}/openbsd-compat/openbsd-compat.h
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/security/libfido2/files/patch-CMakeLists.txt b/security/libfido2/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..7911231332bc
--- /dev/null
+++ b/security/libfido2/files/patch-CMakeLists.txt
@@ -0,0 +1,21 @@
+--- CMakeLists.txt.orig 2020-09-01 07:17:43 UTC
++++ CMakeLists.txt
+@@ -72,7 +72,6 @@ if(MSVC)
+ else()
+ include(FindPkgConfig)
+ pkg_search_module(CBOR libcbor)
+- pkg_search_module(CRYPTO libcrypto)
+
+ # XXX workaround libcbor's missing .pc file
+ if(NOT CBOR_FOUND)
+@@ -177,8 +176,8 @@ endif()
+
+ add_definitions(-DTLS=${TLS})
+
+-# endian.h
+-check_include_files(endian.h HAVE_ENDIAN_H)
++# sys/endian.h
++check_include_files(sys/endian.h HAVE_ENDIAN_H)
+ if(HAVE_ENDIAN_H)
+ add_definitions(-DHAVE_ENDIAN_H)
+ endif()
diff --git a/security/libfido2/files/patch-openbsd-compat-openbsd-compat.h b/security/libfido2/files/patch-openbsd-compat-openbsd-compat.h
new file mode 100644
index 000000000000..ef6cc20523ac
--- /dev/null
+++ b/security/libfido2/files/patch-openbsd-compat-openbsd-compat.h
@@ -0,0 +1,20 @@
+--- openbsd-compat/openbsd-compat.h.orig 2020-09-01 07:17:43 UTC
++++ openbsd-compat/openbsd-compat.h
+@@ -12,7 +12,7 @@
+ #endif
+
+ #if defined(HAVE_ENDIAN_H)
+-#include <endian.h>
++#include <sys/endian.h>
+ #endif
+
+ #if defined(__APPLE__) && !defined(HAVE_ENDIAN_H)
+@@ -33,7 +33,7 @@
+ #endif /* _WIN32 && !HAVE_ENDIAN_H */
+
+ #if defined(__FreeBSD__) && !defined(HAVE_ENDIAN_H)
+-#include <sys/endian.h>
++#include <sys/sys/endian.h>
+ #endif
+
+ #include <stdlib.h>