Skip to content

Commit

Permalink
[xmlsec] Update to version 1.3.6 (#41737)
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Oct 29, 2024
1 parent 11faa3f commit e2edf52
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 28 deletions.
44 changes: 19 additions & 25 deletions ports/xmlsec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
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")
Expand All @@ -76,38 +77,34 @@ 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)
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 $<$<PLATFORM_ID:Windows>: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
)
Expand All @@ -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)
Expand All @@ -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()
Expand All @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion ports/xmlsec/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
4 changes: 4 additions & 0 deletions ports/xmlsec/unofficial-xmlsec-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include(CMakeFindDependencyMacro)
find_dependency(LibXml2)
find_dependency(OpenSSL)
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-xmlsec-targets.cmake")
2 changes: 1 addition & 1 deletion ports/xmlsec/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -9765,7 +9765,7 @@
"port-version": 0
},
"xmlsec": {
"baseline": "1.3.5",
"baseline": "1.3.6",
"port-version": 0
},
"xnnpack": {
Expand Down
5 changes: 5 additions & 0 deletions versions/x-/xmlsec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "53a0926b6c125320e29773130a9992c43cfd9815",
"version": "1.3.6",
"port-version": 0
},
{
"git-tree": "64b88900914fd5e0330f124cf790e7aaf0a3c052",
"version": "1.3.5",
Expand Down

0 comments on commit e2edf52

Please sign in to comment.