From e2edf52610d2c94d2038fe30b247ea5a26964e1b Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 29 Oct 2024 22:57:36 +0200 Subject: [PATCH] [xmlsec] Update to version 1.3.6 (#41737) Signed-off-by: Raul Metsma --- ports/xmlsec/CMakeLists.txt | 44 +++++++++------------ ports/xmlsec/portfile.cmake | 3 +- ports/xmlsec/unofficial-xmlsec-config.cmake | 4 ++ ports/xmlsec/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/x-/xmlsec.json | 5 +++ 6 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 ports/xmlsec/unofficial-xmlsec-config.cmake diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt index 536d085b7b..bbd9ea9d2c 100644 --- a/ports/xmlsec/CMakeLists.txt +++ b/ports/xmlsec/CMakeLists.txt @@ -60,12 +60,13 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") add_library(xmlsec1 ${SOURCESXMLSEC}) add_library(xmlsec1-openssl ${SOURCESXMLSECOPENSSL}) -include_directories(${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBXML2_INCLUDE_DIRS}) - -target_link_libraries(xmlsec1 PRIVATE ${LIBXML2_LIBRARIES}) -target_link_libraries(xmlsec1-openssl PRIVATE - ${LIBXML2_LIBRARIES} OpenSSL::Crypto xmlsec1 +target_include_directories(xmlsec1 PUBLIC + $ + $ + $ ) +target_link_libraries(xmlsec1 PUBLIC LibXml2::LibXml2) +target_link_libraries(xmlsec1-openssl PUBLIC xmlsec1 OpenSSL::Crypto) add_compile_definitions(inline=__inline) add_compile_definitions(PACKAGE="xmlsec1") @@ -76,8 +77,6 @@ add_compile_definitions(HAVE_CTYPE_H) add_compile_definitions(HAVE_MALLOC_H) add_compile_definitions(HAVE_MEMORY_H) add_compile_definitions(XMLSEC_DEFAULT_CRYPTO="openssl") -add_compile_definitions(XMLSEC_NO_GOST) -add_compile_definitions(XMLSEC_NO_GOST2012) add_compile_definitions(UNICODE) add_compile_definitions(_UNICODE) add_compile_definitions(_MBCS) @@ -85,29 +84,27 @@ add_compile_definitions(_REENTRANT) set_target_properties(xmlsec1 xmlsec1-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) +set(XMLSEC_CORE_CFLAGS "") if(NOT BUILD_SHARED_LIBS) - set(XMLSEC_CORE_CFLAGS "-DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING") - set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS}) -else() - set(XMLSEC_CORE_CFLAGS "-DXMLSEC_DL_WIN32") - set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS}) + set(XMLSEC_CORE_CFLAGS "-DLIBXML_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING") + target_compile_definitions(xmlsec1 PUBLIC XMLSEC_STATIC XMLSEC_NO_CRYPTO_DYNAMIC_LOADING) endif() +set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS}) target_compile_definitions(xmlsec1 - PRIVATE ${XMLSEC_CORE_CFLAGS} + PRIVATE $<$:XMLSEC_DL_WIN32> PUBLIC XMLSEC_NO_XSLT XMLSEC_CRYPTO_OPENSSL ) -target_compile_definitions(xmlsec1-openssl PRIVATE ${XMLSEC_OPENSSL_CFLAGS}) +target_compile_definitions(xmlsec1-openssl PUBLIC XMLSEC_NO_GOST XMLSEC_NO_GOST2012) install(TARGETS xmlsec1 xmlsec1-openssl - EXPORT xmlsecExport + EXPORT unofficial-xmlsec-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(EXPORT xmlsecExport - FILE unofficial-xmlsec-config.cmake +install(EXPORT unofficial-xmlsec-targets NAMESPACE unofficial::xmlsec:: DESTINATION share/unofficial-xmlsec ) @@ -116,7 +113,7 @@ if(INSTALL_HEADERS_TOOLS) file(GLOB PUBLIC_HEADERS include/xmlsec/*.h include/xmlsec/openssl/*.h) - list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "exports\\.h$") + list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "exports\\.h$") foreach(file IN LISTS PUBLIC_HEADERS) get_filename_component(dir ${file} DIRECTORY) @@ -137,16 +134,13 @@ if(INSTALL_HEADERS_TOOLS) target_link_libraries(xmlsec PRIVATE crypt32.lib) endif() - target_link_libraries(xmlsec PRIVATE - ${LIBXML2_LIBRARIES} OpenSSL::SSL xmlsec1 xmlsec1-openssl - ) + target_link_libraries(xmlsec PRIVATE xmlsec1-openssl) if(BUILD_SHARED_LIBS) target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING) else() - find_package(Threads REQUIRED) - target_compile_definitions(xmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC) - target_link_libraries(xmlsec PUBLIC Threads::Threads) + find_package(Threads REQUIRED) + target_link_libraries(xmlsec PUBLIC Threads::Threads) endif() install(TARGETS xmlsec DESTINATION tools/xmlsec) endif() @@ -159,7 +153,7 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR}) set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) set(VERSION ${XMLSEC_VERSION}) set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING}) -set(OPENSSL_LIBS "-lssl -lcrypto") +set(OPENSSL_LIBS "-lcrypto") set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1") set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl") set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1") diff --git a/ports/xmlsec/portfile.cmake b/ports/xmlsec/portfile.cmake index 28e4e178c1..5410e3da63 100644 --- a/ports/xmlsec/portfile.cmake +++ b/ports/xmlsec/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lsh123/xmlsec REF "${release_tag}" - SHA512 8574eca37c0be55126e50a76322f96171c9d82dbdd793fdbc26430526488e69db8b41351f136f77bd36f8a3ea238c350bc62dd99214b8348b65dd8055a1c6148 + SHA512 6e41c35042e5a74e135cfb7468aa5c09b3c9ba684ab2431ecedce950f7c99c92fc8765c1c8c2ddfd87718bd00f4a287028227da1e987f2ef17ce2594356e81af HEAD_REF master PATCHES pkgconfig_fixes.patch @@ -26,5 +26,6 @@ vcpkg_copy_pdbs() # unofficial legacy usage file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/xmlsec-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-xmlsec-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-xmlsec") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/xmlsec/unofficial-xmlsec-config.cmake b/ports/xmlsec/unofficial-xmlsec-config.cmake new file mode 100644 index 0000000000..3a2b0c9523 --- /dev/null +++ b/ports/xmlsec/unofficial-xmlsec-config.cmake @@ -0,0 +1,4 @@ +include(CMakeFindDependencyMacro) +find_dependency(LibXml2) +find_dependency(OpenSSL) +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-xmlsec-targets.cmake") diff --git a/ports/xmlsec/vcpkg.json b/ports/xmlsec/vcpkg.json index 8525d1249d..c504e7733c 100644 --- a/ports/xmlsec/vcpkg.json +++ b/ports/xmlsec/vcpkg.json @@ -1,6 +1,6 @@ { "name": "xmlsec", - "version": "1.3.5", + "version": "1.3.6", "description": "XML Security Library is a C library based on LibXML2. The library supports major XML security standards.", "homepage": "https://www.aleksey.com/xmlsec/", "license": "X11 AND MPL-1.1", diff --git a/versions/baseline.json b/versions/baseline.json index 159c112790..fb28e06355 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9765,7 +9765,7 @@ "port-version": 0 }, "xmlsec": { - "baseline": "1.3.5", + "baseline": "1.3.6", "port-version": 0 }, "xnnpack": { diff --git a/versions/x-/xmlsec.json b/versions/x-/xmlsec.json index a78fb1029d..0ad0e95569 100644 --- a/versions/x-/xmlsec.json +++ b/versions/x-/xmlsec.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "53a0926b6c125320e29773130a9992c43cfd9815", + "version": "1.3.6", + "port-version": 0 + }, { "git-tree": "64b88900914fd5e0330f124cf790e7aaf0a3c052", "version": "1.3.5",