From 784f3276e94f1515091dfdb4bf365726058c79ea Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 4 Aug 2026 08:55:21 +0900 Subject: [PATCH] [libosdp] update to 3.2.5 (#52875) --- ports/libosdp/fix-export-macros.patch | 27 +++++++++++++++++++++++++++ ports/libosdp/portfile.cmake | 13 ++++++++++++- ports/libosdp/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libosdp.json | 5 +++++ 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 ports/libosdp/fix-export-macros.patch diff --git a/ports/libosdp/fix-export-macros.patch b/ports/libosdp/fix-export-macros.patch new file mode 100644 index 0000000000..cd9e8fa50e --- /dev/null +++ b/ports/libosdp/fix-export-macros.patch @@ -0,0 +1,27 @@ +diff --git a/include/osdp_export.h b/include/osdp_export.h +index 9f50e8d..a9267d9 100644 +--- a/include/osdp_export.h ++++ b/include/osdp_export.h +@@ -22,7 +22,9 @@ + + /* ---------- Export / Import / Visibility ---------- */ + #if defined(_WIN32) || defined(__CYGWIN__) +- #if defined(BUILDING_API) ++ #if defined(OSDP_STATIC_DEFINE) ++ #define API_EXPORT ++ #elif defined(BUILDING_API) + #if defined(__GNUC__) + #define API_EXPORT __attribute__ ((dllexport)) + #else +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index da73539..1112a0a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -205,6 +205,7 @@ endif() + set(LIB_OSDP_UTILS_SRC ${LIB_OSDP_UTILS_SRC} PARENT_SCOPE) + + add_library(${LIB_OSDP_SHARED} SHARED ${LIB_OSDP_SOURCES} ${LIB_OSDP_UTILS_SRC}) ++target_compile_definitions(${LIB_OSDP_SHARED} PRIVATE BUILDING_API) + if (OpenSSL_FOUND) + target_link_libraries(${LIB_OSDP_SHARED} PUBLIC OpenSSL::Crypto) + elseif (MbedTLS_FOUND) diff --git a/ports/libosdp/portfile.cmake b/ports/libosdp/portfile.cmake index c7a6b0d060..54cee66223 100644 --- a/ports/libosdp/portfile.cmake +++ b/ports/libosdp/portfile.cmake @@ -2,8 +2,10 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO goToMain/libosdp REF "v${VERSION}" - SHA512 81c0e1c1cfdf8c9b283f557e1df7420788e0232eb53b9338c9106138b2838458f055f623dba9f269d5341e7d1bb100b877f74fafd617ffac124514a724b844ed + SHA512 7a3fba87b294f91f01593f2abd07ff088248598db873996d29798cdf7e7733d298547a7b4305593a26ff77eaa972e8d513ca92f6477b7fabc5f773051676f8d0 HEAD_REF master + PATCHES + fix-export-macros.patch ) # Download and extract the c-utils submodule at ${SOURCE_PATH}/utils as @@ -39,5 +41,14 @@ vcpkg_fixup_pkgconfig() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libosdp) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if(BUILD_STATIC) + # Bake the define OSDP_STATIC_DEFINE into the installed header to ensure consumers get it. + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libosdp/osdp_export.h" + "#define _OSDP_EXPORT_H_" + "#define _OSDP_EXPORT_H_\n\n#define OSDP_STATIC_DEFINE" + ) +endif() + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/libosdp/vcpkg.json b/ports/libosdp/vcpkg.json index 32af079585..be5e4d4c10 100644 --- a/ports/libosdp/vcpkg.json +++ b/ports/libosdp/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libosdp", - "version": "3.2.2", + "version": "3.2.5", "description": "An cross-platform open source implementation of IEC 60839-11-5 Open Supervised Device Protocol (OSDP)", "homepage": "https://github.com/goToMain/libosdp", "documentation": "https://libosdp.sidcha.dev", diff --git a/versions/baseline.json b/versions/baseline.json index 5311d752be..0664f97c51 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5485,7 +5485,7 @@ "port-version": 0 }, "libosdp": { - "baseline": "3.2.2", + "baseline": "3.2.5", "port-version": 0 }, "libosip2": { diff --git a/versions/l-/libosdp.json b/versions/l-/libosdp.json index 5bd0b9cb41..dc56ef3156 100644 --- a/versions/l-/libosdp.json +++ b/versions/l-/libosdp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "334ebaf3600e829206f7d9a5874ba0871b1b1a41", + "version": "3.2.5", + "port-version": 0 + }, { "git-tree": "2a70269353d752dd437c75efa383093c9444a79b", "version": "3.2.2",