diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/oatpp-ssdp | |
Diffstat (limited to 'vcpkg/ports/oatpp-ssdp')
| -rw-r--r-- | vcpkg/ports/oatpp-ssdp/fix_String_to_string.patch | 20 | ||||
| -rw-r--r-- | vcpkg/ports/oatpp-ssdp/fix_win_close.patch | 20 | ||||
| -rw-r--r-- | vcpkg/ports/oatpp-ssdp/portfile.cmake | 27 | ||||
| -rw-r--r-- | vcpkg/ports/oatpp-ssdp/vcpkg.json | 19 |
4 files changed, 86 insertions, 0 deletions
diff --git a/vcpkg/ports/oatpp-ssdp/fix_String_to_string.patch b/vcpkg/ports/oatpp-ssdp/fix_String_to_string.patch new file mode 100644 index 0000000..28c506a --- /dev/null +++ b/vcpkg/ports/oatpp-ssdp/fix_String_to_string.patch @@ -0,0 +1,20 @@ +diff --git i/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp w/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp +index d351c1e..7c430e9 100644 +--- i/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp ++++ w/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp +@@ -106,7 +106,7 @@ v_io_handle SimpleUdpStreamProvider::instantiateServer() { + hints.ai_flags = AI_PASSIVE; + auto portStr = oatpp::utils::conversion::int32ToStr(m_port); + +- ret = getaddrinfo(NULL, (const char*)portStr->getData(), &hints, &result); ++ ret = getaddrinfo(NULL, (const char*)portStr->c_str(), &hints, &result); + if (ret != 0) { + OATPP_LOGE("[oatpp::ssdp::SimpleUdpStreamProvider::instantiateServer()]", "Error. Call to getaddrinfo() failed with result=%d: %s", ret, strerror(errno)); + throw std::runtime_error("[oatpp::ssdp::SimpleUdpStreamProvider::instantiateServer()]: Error. Call to getaddrinfo() failed."); +@@ -233,4 +233,4 @@ provider::ResourceHandle<data::stream::IOStream> SimpleUdpStreamProvider::get() + ); + } + +-}} +\ No newline at end of file ++}} diff --git a/vcpkg/ports/oatpp-ssdp/fix_win_close.patch b/vcpkg/ports/oatpp-ssdp/fix_win_close.patch new file mode 100644 index 0000000..c641018 --- /dev/null +++ b/vcpkg/ports/oatpp-ssdp/fix_win_close.patch @@ -0,0 +1,20 @@ +diff --git i/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp w/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp +index d351c1e..f5774bd 100644 +--- i/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp ++++ w/src/oatpp-ssdp/SimpleUdpStreamProvider.cpp +@@ -129,7 +129,7 @@ v_io_handle SimpleUdpStreamProvider::instantiateServer() { + + ret = bind(serverHandle, result->ai_addr, (int)result->ai_addrlen); + if (ret != 0) { +- ::close(serverHandle); ++ ::_close(serverHandle); + OATPP_LOGE("[oatpp::ssdp::SimpleUdpStreamProvider::instantiateServer()]", "Error. Failed to bind port %d: %s", m_port, strerror(errno)); + throw std::runtime_error("[oatpp::ssdp::SimpleUdpStreamProvider::instantiateServer()]: Error. Can't bind to address: %s"); + } +@@ -233,4 +233,4 @@ provider::ResourceHandle<data::stream::IOStream> SimpleUdpStreamProvider::get() + ); + } + +-}} +\ No newline at end of file ++}} diff --git a/vcpkg/ports/oatpp-ssdp/portfile.cmake b/vcpkg/ports/oatpp-ssdp/portfile.cmake new file mode 100644 index 0000000..3523504 --- /dev/null +++ b/vcpkg/ports/oatpp-ssdp/portfile.cmake @@ -0,0 +1,27 @@ +set(OATPP_VERSION "1.3.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-ssdp + REF ${OATPP_VERSION} + SHA512 ab6f10bb79cb058eb7ce4115327e2f2d85133753d02dc2b4339505cc2ed4ef8b6284b5e832d0e190de17b8ae70e0b9a99b1b074d0691ca9a613873e8d4e1ace8 + HEAD_REF master + PATCHES + fix_String_to_string.patch + fix_win_close.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME oatpp-ssdp CONFIG_PATH lib/cmake/oatpp-ssdp-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/oatpp-ssdp/vcpkg.json b/vcpkg/ports/oatpp-ssdp/vcpkg.json new file mode 100644 index 0000000..8a7496d --- /dev/null +++ b/vcpkg/ports/oatpp-ssdp/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "oatpp-ssdp", + "version": "1.3.0", + "port-version": 1, + "description": "Oat++ SSDP (Simple Service Discovery Protocol) submodule.", + "homepage": "https://github.com/oatpp/oatpp-ssdp", + "license": "Apache-2.0", + "dependencies": [ + "oatpp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |