mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 15:36:35 -04:00
r541879 adds a patch that disables an openssl cmake module from being invoked. But on 11.3 at least if some other package dependency pulls in openssl (or DEFAULT_VERSIONS has ssl=openssl), yubico-piv-tool is built with openssl 1.0 includes from base and openssl 1.1 libraries from the port; this fails due to openssl API changes between 1.0 and 1.1 (e.g. EVP_MD_CTX_create() became EVP_MD_CTX_new()). This is not a compile time problem on 12.1 because the base version of openssl is 1.1 (but there is no guarantee there are not other issues caused by the mixing of includes and libraries). Replace the CMakeLists.txt patch with one for patch-cmake_openssl.cmake that the cmake checks for openssl/libcrypto optional. This ensures that openssl includes and libraries are not mixed between the base and ports versions. PR: 248049 Approved by: ume (maintainer timeout, 2 weeks)
36 lines
1.5 KiB
CMake
36 lines
1.5 KiB
CMake
--- 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()
|