diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch index 9db22af1d4f3ae..744fce107d513e 100644 --- a/ports/qca/0001-fix-path-for-vcpkg.patch +++ b/ports/qca/0001-fix-path-for-vcpkg.patch @@ -1,35 +1,47 @@ -From a3a8d50f3bdcb4df630f7126718c21f23efd7832 Mon Sep 17 00:00:00 2001 -From: Alexander Kaspar -Date: Wed, 30 Nov 2016 15:45:12 +0100 -Subject: [PATCH] fix path for vcpkg - ---- - CMakeLists.txt | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 605621b..3b5a9be 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -277,7 +277,7 @@ if(DEVELOPER_MODE) +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 1f84c2c9e..f72ee9d8d 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -58,6 +58,7 @@ set(QCA_SUFFIX "qt5") + if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC) + set(STATIC_PLUGINS ON) + add_definitions(-DQT_STATICPLUGIN) ++ add_definitions(-DQCA_STATIC) + set(PLUGIN_TYPE "STATIC") + else() + set(PLUGIN_TYPE "MODULE") +@@ -266,10 +267,17 @@ if(DEVELOPER_MODE) + add_definitions(-DDEVELOPER_MODE) + # To prefer plugins from build tree when run qca from build tree - file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf - "[Paths] +- file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf +-"[Paths] -Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} -+Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} - ") +-") ++ if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC) ++ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf ++ "[Paths] ++ Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} ++ ") ++ else() ++ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf ++ "[Paths] ++ Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} ++ ") ++ endif() endif() -@@ -320,7 +320,7 @@ else (qca_CERTSTORE) + if (APPLE) +@@ -309,7 +317,7 @@ else() set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem") # note that INSTALL_FILES targets are relative to the current installation prefix... if(NOT DEVELOPER_MODE) - install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs") + install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/qca/certs") endif() - endif (qca_CERTSTORE) + endif() message(STATUS "certstore path: " ${qca_CERTSTORE}) -@@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND) +@@ -390,10 +398,10 @@ endif() include(CMakePackageConfigHelpers) configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in" @@ -43,7 +55,7 @@ index 605621b..3b5a9be 100644 if(NOT DEVELOPER_MODE) -@@ -472,10 +472,10 @@ if(NOT DEVELOPER_MODE) +@@ -461,10 +469,10 @@ if(NOT DEVELOPER_MODE) endif() endif() @@ -58,6 +70,3 @@ index 605621b..3b5a9be 100644 + DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake ) endif() --- -2.8.1.windows.1 - diff --git a/ports/qca/0002-fix-build-error.patch b/ports/qca/0002-fix-build-error.patch index f4ddee3a0a482e..31aede75cee41e 100644 --- a/ports/qca/0002-fix-build-error.patch +++ b/ports/qca/0002-fix-build-error.patch @@ -1,57 +1,58 @@ -diff --git a/plugins/qca-gnupg/CMakeLists.txt b/plugins/qca-gnupg/CMakeLists.txt -index 1ed8e21..20890dd 100644 ---- a/plugins/qca-gnupg/CMakeLists.txt -+++ b/plugins/qca-gnupg/CMakeLists.txt -@@ -68,6 +68,4 @@ if(NOT DEVELOPER_MODE) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") -- -- install_pdb(qca-gnupg ${QCA_CRYPTO_INSTALL_DIR}) - endif() -diff --git a/plugins/qca-logger/CMakeLists.txt b/plugins/qca-logger/CMakeLists.txt -index ba6926e..45e1986 100644 ---- a/plugins/qca-logger/CMakeLists.txt -+++ b/plugins/qca-logger/CMakeLists.txt -@@ -20,6 +20,4 @@ if(NOT DEVELOPER_MODE) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") -- -- install_pdb(qca-logger ${QCA_CRYPTO_INSTALL_DIR}) - endif() -diff --git a/plugins/qca-ossl/CMakeLists.txt b/plugins/qca-ossl/CMakeLists.txt -index af3d756..c8480a3 100644 ---- a/plugins/qca-ossl/CMakeLists.txt -+++ b/plugins/qca-ossl/CMakeLists.txt -@@ -65,8 +65,6 @@ if(OPENSSL_FOUND) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") -- -- install_pdb(qca-ossl ${QCA_CRYPTO_INSTALL_DIR}) - endif() +diff --git "a/cmake/modules/QcaMacro.cmake" "b/cmake/modules/QcaMacro.cmake" +index 5d86e4725..62568626b 100644 +--- "a/cmake/modules/QcaMacro.cmake" ++++ "b/cmake/modules/QcaMacro.cmake" +@@ -61,15 +61,6 @@ macro(add_qca_test TARGET DESCRIPTION) + endmacro(add_qca_test) - else(OPENSSL_FOUND) -diff --git a/plugins/qca-softstore/CMakeLists.txt b/plugins/qca-softstore/CMakeLists.txt -index d7af072..3c64870 100644 ---- a/plugins/qca-softstore/CMakeLists.txt -+++ b/plugins/qca-softstore/CMakeLists.txt -@@ -20,6 +20,4 @@ if(NOT DEVELOPER_MODE) - LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" - RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") + macro(install_pdb TARGET INSTALL_PATH) +- if(MSVC) +- get_target_property(LOCATION ${TARGET} LOCATION_DEBUG) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${INSTALL_PATH} CONFIGURATIONS Debug) - -- install_pdb(qca-softstore ${QCA_CRYPTO_INSTALL_DIR}) - endif() -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 2e81974..907049c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -184,6 +184,5 @@ if(NOT DEVELOPER_MODE) - FRAMEWORK DESTINATION "${QCA_LIBRARY_INSTALL_DIR}" - PUBLIC_HEADER DESTINATION "${QCA_FULL_INCLUDE_INSTALL_DIR}" INCLUDES DESTINATION "${QCA_FULL_INCLUDE_INSTALL_DIR}" - ) -- install_pdb(${QCA_LIB_NAME} ${QCA_BINARY_INSTALL_DIR}) - endif() +- get_target_property(LOCATION ${TARGET} LOCATION_RELWITHDEBINFO) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${INSTALL_PATH} CONFIGURATIONS RelWithDebInfo) +- endif() + endmacro(install_pdb) + macro(normalize_path PATH) +diff --git "a/plugins/qca-ossl/qca-ossl.cpp" "b/plugins/qca-ossl/qca-ossl.cpp" +index ee872d721..fa3e2c414 100644 +--- "a/plugins/qca-ossl/qca-ossl.cpp" ++++ "b/plugins/qca-ossl/qca-ossl.cpp" +@@ -6910,6 +6910,7 @@ public: + else if ( type == QLatin1String("aes256-ccm") ) + return new opensslCipherContext( EVP_aes_256_ccm(), 0, this, type); + #endif ++#ifndef OPENSSL_NO_BF + else if ( type == QLatin1String("blowfish-ecb") ) + return new opensslCipherContext( EVP_bf_ecb(), 0, this, type); + else if ( type == QLatin1String("blowfish-cfb") ) +@@ -6920,6 +6921,8 @@ public: + return new opensslCipherContext( EVP_bf_cbc(), 0, this, type); + else if ( type == QLatin1String("blowfish-cbc-pkcs7") ) + return new opensslCipherContext( EVP_bf_cbc(), 1, this, type); ++#endif ++#ifndef OPENSSL_NO_DES + else if ( type == QLatin1String("tripledes-ecb") ) + return new opensslCipherContext( EVP_des_ede3(), 0, this, type); + else if ( type == QLatin1String("tripledes-cbc") ) +@@ -6936,6 +6939,8 @@ public: + return new opensslCipherContext( EVP_des_cfb(), 0, this, type); + else if ( type == QLatin1String("des-ofb") ) + return new opensslCipherContext( EVP_des_ofb(), 0, this, type); ++#endif ++#ifndef OPENSSL_NO_CAST + else if ( type == QLatin1String("cast5-ecb") ) + return new opensslCipherContext( EVP_cast5_ecb(), 0, this, type); + else if ( type == QLatin1String("cast5-cbc") ) +@@ -6946,6 +6951,7 @@ public: + return new opensslCipherContext( EVP_cast5_cfb(), 0, this, type); + else if ( type == QLatin1String("cast5-ofb") ) + return new opensslCipherContext( EVP_cast5_ofb(), 0, this, type); ++#endif + else if ( type == QLatin1String("pkey") ) + return new MyPKeyContext( this ); + else if ( type == QLatin1String("dlgroup") ) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index 0eadcc148d7324..7eacba3928df69 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,5 +1,5 @@ Source: qca -Version: 2.2.1-1 +Version: 2.3.1 Description: Qt Cryptographic Architecture (QCA). Homepage: https://cgit.kde.org/qca.git/ Build-Depends: qt5-base[core] diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index 9b2b1539736fed..b62de4a2a8b5ed 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -4,11 +4,6 @@ # Output directories according to vcpkg # Updated certstore. See certstore.pem in the output dirs # - -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) vcpkg_add_to_path(${PERL_EXE_PATH}) @@ -20,13 +15,21 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/qca - REF v2.2.1 - SHA512 6b10f9bbf9ebf136655d1c6464f3849c8581b3cd5ef07b0697ddd5f32611dce301af5148e8e6fe91e763301e68994957a62a278334ee7a78559101f411f27d49 + REF v2.3.1 + SHA512 e04a44fb395e24fd009bb6b005282880bef84ca492b5e15903f9ce3e5e3f93beae3a386a1a381507ed5b0c6550e64c6bf434328f9d965fa7f7d638c3e5d5948b PATCHES - 0001-fix-path-for-vcpkg.patch - 0002-fix-build-error.patch + 0001-fix-path-for-vcpkg.patch + 0002-fix-build-error.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(QCA_FEATURE_INSTALL_DIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/Qca) + set(QCA_FEATURE_INSTALL_DIR_RELEASE ${CURRENT_PACKAGES_DIR}/bin/Qca) +else() + set(QCA_FEATURE_INSTALL_DIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/Qca) + set(QCA_FEATURE_INSTALL_DIR_RELEASE ${CURRENT_PACKAGES_DIR}/lib/Qca) +endif() + # According to: # https://www.openssl.org/docs/faq.html#USER16 # it is up to developers or admins to maintain CAs. @@ -56,10 +59,11 @@ vcpkg_configure_cmake( -DBUILD_TOOLS=OFF -DQCA_SUFFIX=OFF -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features + -DOSX_FRAMEWORK=OFF OPTIONS_DEBUG - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca + -DQCA_PLUGINS_INSTALL_DIR=${QCA_FEATURE_INSTALL_DIR_DEBUG} OPTIONS_RELEASE - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca + -DQCA_PLUGINS_INSTALL_DIR=${QCA_FEATURE_INSTALL_DIR_RELEASE} ) vcpkg_install_cmake() @@ -94,5 +98,4 @@ file(REMOVE_RECURSE message(STATUS "Patching files done") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/qca/COPYING ${CURRENT_PACKAGES_DIR}/share/qca/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index e467247713e771..2684d4eb48824e 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1356,9 +1356,6 @@ python2:x64-uwp=fail python3:arm64-windows=fail python3:arm-uwp=fail python3:x64-uwp=fail -qca:x64-linux=fail -qca:x64-osx=fail -qca:x64-windows-static=fail qhull:x64-uwp=fail qhull:arm-uwp=fail qpid-proton:arm-uwp=fail