Date: Fri, 31 Jul 2020 19:53:37 +0000 (UTC) From: Craig Leres <leres@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r543880 - head/security/yubico-piv-tool/files Message-ID: <202007311953.06VJrbxU048332@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: leres Date: Fri Jul 31 19:53:37 2020 New Revision: 543880 URL: https://svnweb.freebsd.org/changeset/ports/543880 Log: security/yubico-piv-tool: Unbreak build on FreeBSD 11 with DEFAULT_VERSIONS=ssl=openssl 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) Added: head/security/yubico-piv-tool/files/patch-cmake_openssl.cmake (contents, props changed) Deleted: head/security/yubico-piv-tool/files/patch-CMakeLists.txt Added: head/security/yubico-piv-tool/files/patch-cmake_openssl.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/yubico-piv-tool/files/patch-cmake_openssl.cmake Fri Jul 31 19:53:37 2020 (r543880) @@ -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()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007311953.06VJrbxU048332>