[xmlsec] Update to version 1.3.6 (#41737)

Signed-off-by: Raul Metsma <raul@metsma.ee>
This commit is contained in:
Raul Metsma 2024-10-29 22:57:36 +02:00 committed by GitHub
parent 11faa3f168
commit e2edf52610
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 32 additions and 28 deletions

View File

@ -60,12 +60,13 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
add_library(xmlsec1 ${SOURCESXMLSEC}) add_library(xmlsec1 ${SOURCESXMLSEC})
add_library(xmlsec1-openssl ${SOURCESXMLSECOPENSSL}) add_library(xmlsec1-openssl ${SOURCESXMLSECOPENSSL})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBXML2_INCLUDE_DIRS}) target_include_directories(xmlsec1 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
target_link_libraries(xmlsec1 PRIVATE ${LIBXML2_LIBRARIES}) $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
target_link_libraries(xmlsec1-openssl PRIVATE $<INSTALL_INTERFACE:include>
${LIBXML2_LIBRARIES} OpenSSL::Crypto xmlsec1
) )
target_link_libraries(xmlsec1 PUBLIC LibXml2::LibXml2)
target_link_libraries(xmlsec1-openssl PUBLIC xmlsec1 OpenSSL::Crypto)
add_compile_definitions(inline=__inline) add_compile_definitions(inline=__inline)
add_compile_definitions(PACKAGE="xmlsec1") 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_MALLOC_H)
add_compile_definitions(HAVE_MEMORY_H) add_compile_definitions(HAVE_MEMORY_H)
add_compile_definitions(XMLSEC_DEFAULT_CRYPTO="openssl") 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(_UNICODE) add_compile_definitions(_UNICODE)
add_compile_definitions(_MBCS) 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_target_properties(xmlsec1 xmlsec1-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR})
set(XMLSEC_CORE_CFLAGS "")
if(NOT BUILD_SHARED_LIBS) if(NOT BUILD_SHARED_LIBS)
set(XMLSEC_CORE_CFLAGS "-DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING") set(XMLSEC_CORE_CFLAGS "-DLIBXML_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING")
set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS}) target_compile_definitions(xmlsec1 PUBLIC XMLSEC_STATIC XMLSEC_NO_CRYPTO_DYNAMIC_LOADING)
else()
set(XMLSEC_CORE_CFLAGS "-DXMLSEC_DL_WIN32")
set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS})
endif() endif()
set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS})
target_compile_definitions(xmlsec1 target_compile_definitions(xmlsec1
PRIVATE ${XMLSEC_CORE_CFLAGS} PRIVATE $<$<PLATFORM_ID:Windows>:XMLSEC_DL_WIN32>
PUBLIC XMLSEC_NO_XSLT XMLSEC_CRYPTO_OPENSSL 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 install(TARGETS xmlsec1 xmlsec1-openssl
EXPORT xmlsecExport EXPORT unofficial-xmlsec-targets
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
) )
install(EXPORT xmlsecExport install(EXPORT unofficial-xmlsec-targets
FILE unofficial-xmlsec-config.cmake
NAMESPACE unofficial::xmlsec:: NAMESPACE unofficial::xmlsec::
DESTINATION share/unofficial-xmlsec DESTINATION share/unofficial-xmlsec
) )
@ -116,7 +113,7 @@ if(INSTALL_HEADERS_TOOLS)
file(GLOB PUBLIC_HEADERS file(GLOB PUBLIC_HEADERS
include/xmlsec/*.h include/xmlsec/*.h
include/xmlsec/openssl/*.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) foreach(file IN LISTS PUBLIC_HEADERS)
get_filename_component(dir ${file} DIRECTORY) get_filename_component(dir ${file} DIRECTORY)
@ -137,16 +134,13 @@ if(INSTALL_HEADERS_TOOLS)
target_link_libraries(xmlsec PRIVATE crypt32.lib) target_link_libraries(xmlsec PRIVATE crypt32.lib)
endif() endif()
target_link_libraries(xmlsec PRIVATE target_link_libraries(xmlsec PRIVATE xmlsec1-openssl)
${LIBXML2_LIBRARIES} OpenSSL::SSL xmlsec1 xmlsec1-openssl
)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING) target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING)
else() else()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
target_compile_definitions(xmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC) target_link_libraries(xmlsec PUBLIC Threads::Threads)
target_link_libraries(xmlsec PUBLIC Threads::Threads)
endif() endif()
install(TARGETS xmlsec DESTINATION tools/xmlsec) install(TARGETS xmlsec DESTINATION tools/xmlsec)
endif() endif()
@ -159,7 +153,7 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
set(VERSION ${XMLSEC_VERSION}) set(VERSION ${XMLSEC_VERSION})
set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING}) 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_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl") set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1") set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")

View File

@ -5,7 +5,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO lsh123/xmlsec REPO lsh123/xmlsec
REF "${release_tag}" REF "${release_tag}"
SHA512 8574eca37c0be55126e50a76322f96171c9d82dbdd793fdbc26430526488e69db8b41351f136f77bd36f8a3ea238c350bc62dd99214b8348b65dd8055a1c6148 SHA512 6e41c35042e5a74e135cfb7468aa5c09b3c9ba684ab2431ecedce950f7c99c92fc8765c1c8c2ddfd87718bd00f4a287028227da1e987f2ef17ce2594356e81af
HEAD_REF master HEAD_REF master
PATCHES PATCHES
pkgconfig_fixes.patch pkgconfig_fixes.patch
@ -26,5 +26,6 @@ vcpkg_copy_pdbs()
# unofficial legacy usage # unofficial legacy usage
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/xmlsec-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") 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 "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -0,0 +1,4 @@
include(CMakeFindDependencyMacro)
find_dependency(LibXml2)
find_dependency(OpenSSL)
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-xmlsec-targets.cmake")

View File

@ -1,6 +1,6 @@
{ {
"name": "xmlsec", "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.", "description": "XML Security Library is a C library based on LibXML2. The library supports major XML security standards.",
"homepage": "https://www.aleksey.com/xmlsec/", "homepage": "https://www.aleksey.com/xmlsec/",
"license": "X11 AND MPL-1.1", "license": "X11 AND MPL-1.1",

View File

@ -9765,7 +9765,7 @@
"port-version": 0 "port-version": 0
}, },
"xmlsec": { "xmlsec": {
"baseline": "1.3.5", "baseline": "1.3.6",
"port-version": 0 "port-version": 0
}, },
"xnnpack": { "xnnpack": {

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "53a0926b6c125320e29773130a9992c43cfd9815",
"version": "1.3.6",
"port-version": 0
},
{ {
"git-tree": "64b88900914fd5e0330f124cf790e7aaf0a3c052", "git-tree": "64b88900914fd5e0330f124cf790e7aaf0a3c052",
"version": "1.3.5", "version": "1.3.5",