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/azure-storage-cpp | |
Diffstat (limited to 'vcpkg/ports/azure-storage-cpp')
| -rw-r--r-- | vcpkg/ports/azure-storage-cpp/cmake.diff | 37 | ||||
| -rw-r--r-- | vcpkg/ports/azure-storage-cpp/fix-asio-error.patch | 52 | ||||
| -rw-r--r-- | vcpkg/ports/azure-storage-cpp/portfile.cmake | 27 | ||||
| -rw-r--r-- | vcpkg/ports/azure-storage-cpp/vcpkg.json | 45 |
4 files changed, 161 insertions, 0 deletions
diff --git a/vcpkg/ports/azure-storage-cpp/cmake.diff b/vcpkg/ports/azure-storage-cpp/cmake.diff new file mode 100644 index 0000000..f849539 --- /dev/null +++ b/vcpkg/ports/azure-storage-cpp/cmake.diff @@ -0,0 +1,37 @@ +diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +index ac9e65d..5827dec 100644 +--- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt ++++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +@@ -21,7 +21,7 @@ option(BUILD_SAMPLES "Build sample codes" OFF) + if(UNIX) + find_package(Boost REQUIRED COMPONENTS log log_setup random system thread locale regex filesystem chrono date_time) + find_package(Threads REQUIRED) +- if(APPLE AND NOT OPENSSL_ROOT_DIR) ++ if(0) + # Prefer a homebrew version of OpenSSL over the one in /usr/lib + file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl/*) + +@@ -135,6 +135,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + else() + message("-- Unknown compiler, success is doubtful.") + endif() ++if(NOT WIN32) ++ add_definitions(-D_NO_WASTORAGE_API) # no dllimport ++endif() + + # Reconfigure final output directory + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +@@ -142,11 +145,11 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) + + set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) +-set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LibXML2_INCLUDE_DIR}) ++set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS}) + + + set(AZURESTORAGE_LIBRARY azurestorage) +-set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) ++set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LIBXML2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) + + # Set version numbers centralized + set (AZURESTORAGE_VERSION_MAJOR 7) diff --git a/vcpkg/ports/azure-storage-cpp/fix-asio-error.patch b/vcpkg/ports/azure-storage-cpp/fix-asio-error.patch new file mode 100644 index 0000000..5cc3af8 --- /dev/null +++ b/vcpkg/ports/azure-storage-cpp/fix-asio-error.patch @@ -0,0 +1,52 @@ +diff --git a/Microsoft.WindowsAzure.Storage/includes/wascore/util.h b/Microsoft.WindowsAzure.Storage/includes/wascore/util.h +index fcd86cd..5f02120 100644 +--- a/Microsoft.WindowsAzure.Storage/includes/wascore/util.h ++++ b/Microsoft.WindowsAzure.Storage/includes/wascore/util.h +@@ -125,7 +125,7 @@ namespace azure { namespace storage { namespace core { + WASTORAGE_API static std::shared_ptr<web::http::client::http_client> get_http_client(const web::uri& uri, const web::http::client::http_client_config& config); + + private: +- static const boost::asio::io_service& s_service; ++ static const boost::asio::io_context& s_service; + WASTORAGE_API static std::map<utility::string_t, std::shared_ptr<web::http::client::http_client>> s_http_clients; + WASTORAGE_API static std::mutex s_mutex; + }; +diff --git a/Microsoft.WindowsAzure.Storage/src/cloud_common.cpp b/Microsoft.WindowsAzure.Storage/src/cloud_common.cpp +index 7dfcfeb..0749252 100644 +--- a/Microsoft.WindowsAzure.Storage/src/cloud_common.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/cloud_common.cpp +@@ -71,7 +71,7 @@ namespace azure { namespace storage { + throw std::invalid_argument(protocol::error_invalid_ip_address); + #else + boost::system::error_code error; +- auto addr = boost::asio::ip::address::from_string(address, error); ++ auto addr = boost::asio::ip::make_address(address, error); + if (error.value() == 0) + { + if (addr.is_v4()) +diff --git a/Microsoft.WindowsAzure.Storage/src/timer_handler.cpp b/Microsoft.WindowsAzure.Storage/src/timer_handler.cpp +index f33d183..fc5e50d 100644 +--- a/Microsoft.WindowsAzure.Storage/src/timer_handler.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/timer_handler.cpp +@@ -86,7 +86,7 @@ namespace azure { namespace storage { namespace core { + pplx::task<void> timer_handler::timeout_after(const std::chrono::milliseconds& time) + { + m_timer = std::make_shared<boost::asio::basic_waitable_timer<std::chrono::steady_clock>>(crossplat::threadpool::shared_instance().service()); +- m_timer->expires_from_now(std::chrono::duration_cast<std::chrono::steady_clock::duration>(time)); ++ m_timer->expires_after(std::chrono::duration_cast<std::chrono::steady_clock::duration>(time)); + std::weak_ptr<timer_handler> weak_this_pointer = shared_from_this(); + auto callback = [weak_this_pointer](const boost::system::error_code& ec) + { +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index cf0a311..8f321de 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -440,7 +440,7 @@ namespace azure { namespace storage { namespace core { + } + + #ifndef _WIN32 +- const boost::asio::io_service& http_client_reusable::s_service = crossplat::threadpool::shared_instance().service(); ++ const boost::asio::io_context& http_client_reusable::s_service = crossplat::threadpool::shared_instance().service(); + std::map<utility::string_t, std::shared_ptr<web::http::client::http_client>> http_client_reusable::s_http_clients; + std::mutex http_client_reusable::s_mutex; + diff --git a/vcpkg/ports/azure-storage-cpp/portfile.cmake b/vcpkg/ports/azure-storage-cpp/portfile.cmake new file mode 100644 index 0000000..dccb725 --- /dev/null +++ b/vcpkg/ports/azure-storage-cpp/portfile.cmake @@ -0,0 +1,27 @@ +message(WARNING "azure-storage-cpp is no longer actively developed. Instead, users should migrate to the new sdk:azure-core-cpp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-storage-cpp + REF v7.5.0 + SHA512 83eabcaf2114c8af1cabbc96b6ef2b57c934a06f68e7a870adf336feaa19edd57aedaf8507d5c40500e46d4e77f5059f9286e319fe7cadeb9ffc8fa018fb030c + HEAD_REF master + PATCHES + cmake.diff + fix-asio-error.patch +) +file(REMOVE_RECURSE "${SOURCE_PATH}/Microsoft.WindowsAzure.Storage/cmake/Modules/FindLibXML2.cmake") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/Microsoft.WindowsAzure.Storage" + OPTIONS + -DCMAKE_FIND_FRAMEWORK=LAST + -DBUILD_TESTS=OFF + -DBUILD_SAMPLES=OFF +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/vcpkg/ports/azure-storage-cpp/vcpkg.json b/vcpkg/ports/azure-storage-cpp/vcpkg.json new file mode 100644 index 0000000..d10b5fa --- /dev/null +++ b/vcpkg/ports/azure-storage-cpp/vcpkg.json @@ -0,0 +1,45 @@ +{ + "name": "azure-storage-cpp", + "version": "7.5.0", + "port-version": 8, + "description": [ + "[legacy] Microsoft Azure Storage Client SDK for C++", + "A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client." + ], + "homepage": "https://blogs.msdn.com/b/windowsazurestorage/", + "supports": "!uwp", + "dependencies": [ + { + "name": "atlmfc", + "platform": "windows" + }, + { + "name": "boost-locale", + "platform": "!windows & !uwp" + }, + { + "name": "boost-log", + "platform": "!windows & !uwp" + }, + { + "name": "cpprestsdk", + "default-features": false + }, + { + "name": "libuuid", + "platform": "!windows & !uwp & !osx" + }, + { + "name": "libxml2", + "platform": "!windows & !uwp" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |