[libosdp] update to 3.2.5 (#52875)

This commit is contained in:
toge 2026-08-04 08:55:21 +09:00 committed by GitHub
parent 7eaada27f0
commit 784f3276e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 3 deletions

View File

@ -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)

View File

@ -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}")

View File

@ -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",

View File

@ -5485,7 +5485,7 @@
"port-version": 0
},
"libosdp": {
"baseline": "3.2.2",
"baseline": "3.2.5",
"port-version": 0
},
"libosip2": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "334ebaf3600e829206f7d9a5874ba0871b1b1a41",
"version": "3.2.5",
"port-version": 0
},
{
"git-tree": "2a70269353d752dd437c75efa383093c9444a79b",
"version": "3.2.2",