Skip to content

Commit

Permalink
security/libfido2: Convert REINPLACE_CMD to patch file
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Apr 16, 2022
1 parent 956faac commit 3c39406
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
3 changes: 1 addition & 2 deletions security/libfido2/Makefile
Expand Up @@ -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>
26 changes: 26 additions & 0 deletions 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}

0 comments on commit 3c39406

Please sign in to comment.