aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-04-16 03:56:22 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-04-16 04:19:10 +0000
commit3c39406e827036f4b97d754db64beb343c988f02 (patch)
tree2d483d4db8ce1816f4ea33d374b14b7184453ce1
parent956faac726810b957031259f785c400466bfc226 (diff)
downloadports-3c39406e827036f4b97d754db64beb343c988f02.tar.gz
ports-3c39406e827036f4b97d754db64beb343c988f02.zip
security/libfido2: Convert REINPLACE_CMD to patch file
-rw-r--r--security/libfido2/Makefile3
-rw-r--r--security/libfido2/files/extra-patch-openssl26
2 files changed, 27 insertions, 2 deletions
diff --git a/security/libfido2/Makefile b/security/libfido2/Makefile
index 1f7a5c424597..ecd68835e1af 100644
--- a/security/libfido2/Makefile
+++ b/security/libfido2/Makefile
@@ -24,10 +24,9 @@ OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
-post-patch:
# we do not ship libcrypto.pc in base system
.if ${SSL_DEFAULT} == base
- @${REINPLACE_CMD} -e '/libcrypto/d' ${WRKSRC}/CMakeLists.txt ${WRKSRC}/src/libfido2.pc.in
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-openssl
.endif
.include <bsd.port.post.mk>
diff --git a/security/libfido2/files/extra-patch-openssl b/security/libfido2/files/extra-patch-openssl
new file mode 100644
index 000000000000..6cab9adce02d
--- /dev/null
+++ b/security/libfido2/files/extra-patch-openssl
@@ -0,0 +1,26 @@
+--- CMakeLists.txt.orig 2022-01-17 12:42:03 UTC
++++ CMakeLists.txt
+@@ -196,14 +196,10 @@ if(MSVC)
+ else()
+ include(FindPkgConfig)
+ pkg_search_module(CBOR libcbor)
+- pkg_search_module(CRYPTO libcrypto)
+ pkg_search_module(ZLIB zlib)
+
+ if(NOT CBOR_FOUND AND NOT HAVE_CBOR_H)
+ message(FATAL_ERROR "could not find libcbor")
+- endif()
+- if(NOT CRYPTO_FOUND AND NOT HAVE_OPENSSLV_H)
+- message(FATAL_ERROR "could not find libcrypto")
+ endif()
+ if(NOT ZLIB_FOUND)
+ message(FATAL_ERROR "could not find zlib")
+--- src/libfido2.pc.in.orig 2022-01-17 12:42:03 UTC
++++ src/libfido2.pc.in
+@@ -7,6 +7,5 @@ Name: @PROJECT_NAME@
+ Description: A FIDO2 library
+ URL: https://github.com/yubico/libfido2
+ Version: @FIDO_VERSION@
+-Requires: libcrypto
+ Libs: -L${libdir} -lfido2
+ Cflags: -I${includedir}