svn commit: r541879 - head/security/yubico-piv-tool/files
Craig Leres
leres at freebsd.org
Tue Jul 14 20:27:05 UTC 2020
On 2020-07-14 04:28, Hajimu UMEMOTO wrote:
> leres> This patch breaks building for me with DEFAULT_VERSIONS=ssl=openssl;
> leres> the attached solves this on 11.3 with ssl=openssl and 12.1 with
> leres> ssl=base.
>
> Did you actually build it without your patch?
> The change is intentional for OpenSSL handling of USES=ssl which
> defines $OPENSSLINC and $OPENSSLLIB according to the setting of
> DEFAULT_VERSIONS=ssl=XXX.
> I confirmed it is buildable with DEFAULT_VERSIONS=ssl=openssl on
> 12.1-STABLE.
I used my patch on both systems. The difference appears to be that
archivers/libarchive has a new OPENSSL option that defaults to on. Also
I have OPENSSL enabled for curl (also the default).
I think really this boils down to yubico-piv-tool needs to always run
the cmake libcrypt checks in case openssl is installed in /usr/local.
Attached is a patchset that makes the package checks for libcrypto
optional; this should be safe because we have openssl in the base
system. I only tested three cases: 11.3 with ssl-openssl and 12.1 with
ssl=base and ssl=openssl.
Craig
-------------- next part --------------
Index: security/yubico-piv-tool/files/patch-CMakeLists.txt
===================================================================
--- security/yubico-piv-tool/files/patch-CMakeLists.txt (revision 542205)
+++ security/yubico-piv-tool/files/patch-CMakeLists.txt (nonexistent)
@@ -1,15 +0,0 @@
---- CMakeLists.txt.orig 2020-07-10 13:45:10 UTC
-+++ CMakeLists.txt
-@@ -121,9 +121,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")
- endif()
-
--include(${CMAKE_SOURCE_DIR}/cmake/openssl.cmake)
--find_libcrypto()
--include_directories(${LIBCRYPTO_INCLUDE_DIRS})
-+# include(${CMAKE_SOURCE_DIR}/cmake/openssl.cmake)
-+# find_libcrypto()
-+# include_directories(${LIBCRYPTO_INCLUDE_DIRS})
-
- enable_testing()
- find_package(codecov)
Property changes on: security/yubico-piv-tool/files/patch-CMakeLists.txt
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: security/yubico-piv-tool/files/patch-cmake_openssl.cmake
===================================================================
--- security/yubico-piv-tool/files/patch-cmake_openssl.cmake (nonexistent)
+++ security/yubico-piv-tool/files/patch-cmake_openssl.cmake (working copy)
@@ -0,0 +1,36 @@
+--- cmake/openssl.cmake.orig 2020-07-14 19:27:32 UTC
++++ cmake/openssl.cmake
+@@ -32,7 +32,7 @@ macro (find_libcrypto)
+ if(OPENSSL_STATIC_LINK)
+ set(OPENSSL_USE_STATIC_LIBS TRUE) #Need to be set so that find_package would find the static library
+ endif(OPENSSL_STATIC_LINK)
+- find_package(OpenSSL REQUIRED)
++ find_package(OpenSSL)
+
+ if(OpenSSL_FOUND)
+ set(LIBCRYPTO_LDFLAGS OpenSSL::Crypto)
+@@ -60,7 +60,7 @@ macro (find_libcrypto)
+ if(NOT LIBCRYPTO_FOUND)
+
+ set(ENV{PKG_CONFIG_PATH} "${OPENSSL_PKG_PATH}:$ENV{PKG_CONFIG_PATH}")
+- pkg_check_modules(LIBCRYPTO REQUIRED libcrypto)
++ pkg_check_modules(LIBCRYPTO libcrypto)
+ if(LIBCRYPTO_FOUND)
+ if(VERBOSE_CMAKE)
+ message("LIBCRYPTO_FOUND: ${LIBCRYPTO_FOUND}")
+@@ -76,7 +76,7 @@ macro (find_libcrypto)
+ message("LIBCRYPTO_LIBDIR: ${LIBCRYPTO_LIBDIR}")
+ endif(VERBOSE_CMAKE)
+ else(LIBCRYPTO_FOUND)
+- message (FATAL_ERROR "libcrypto not found. Aborting...")
++ #message (FATAL_ERROR "libcrypto not found. Aborting...")
+ endif(LIBCRYPTO_FOUND)
+ set(OPENSSL_VERSION ${LIBCRYPTO_VERSION})
+
+@@ -89,4 +89,4 @@ macro (find_libcrypto)
+ link_directories(${LIBCRYPTO_LIBRARY_DIRS})
+ include_directories(${LIBCRYPTO_INCLUDE_DIRS})
+
+-endmacro()
+\ No newline at end of file
++endmacro()
Property changes on: security/yubico-piv-tool/files/patch-cmake_openssl.cmake
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the svn-ports-all
mailing list