diff options
| author | Alexander Saprykin <xelfium@gmail.com> | 2018-05-26 13:27:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-26 13:27:14 +0200 |
| commit | 4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch) | |
| tree | d95c9490352eb73f078d34a33bc4bb44ac9fa48b /ports/azure-storage-cpp | |
| parent | fb689bd13dd6ba563a885d71fff1dd2b32a615db (diff) | |
| parent | 2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff) | |
| download | vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip | |
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'ports/azure-storage-cpp')
| -rw-r--r-- | ports/azure-storage-cpp/CONTROL | 6 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/cmake.patch | 64 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/portfile.cmake | 17 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/pplx-do-while.patch | 52 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/static-builds.patch | 13 |
5 files changed, 116 insertions, 36 deletions
diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 94126a366..eec7c8fcd 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.0.0-2 -Build-Depends: cpprestsdk, atlmfc +Version: 4.0.0 +Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp) Description: 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/
\ No newline at end of file + 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch index 96fdace2d..04f6b5ade 100644 --- a/ports/azure-storage-cpp/cmake.patch +++ b/ports/azure-storage-cpp/cmake.patch @@ -1,8 +1,32 @@ diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 07878c2..8d1c47e 100644 +index a23b93f..e471b86 100644 --- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -51,20 +51,25 @@ if(UNIX) +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(azurestorage) + + enable_testing() +@@ -21,8 +21,6 @@ if(UNIX) + + # Prefer the latest (make the latest one first) + list(REVERSE OPENSSL_ROOT_DIR) +- +- + if(NOT GETTEXT_LIB_DIR) + message(WARNING "No GETTEXT_LIB_DIR specified, assuming: /usr/local/opt/gettext/lib") + set(GETTEXT_LIB_DIR "/usr/local/opt/gettext/lib") +@@ -40,6 +38,7 @@ if(UNIX) + find_package(OpenSSL 1.0.0 REQUIRED) + + ++ + find_package(UUID REQUIRED) + find_package(Casablanca REQUIRED) + find_package(LibXML2 REQUIRED) +@@ -48,20 +47,25 @@ if(UNIX) find_package(UnitTest++ REQUIRED) endif() @@ -36,7 +60,7 @@ index 07878c2..8d1c47e 100644 message("-- Setting gcc options") set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") -@@ -81,22 +86,29 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +@@ -78,22 +82,31 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") add_definitions(-DBOOST_LOG_DYN_LINK) endif() add_definitions(-D_TURN_OFF_PLATFORM_STRING) @@ -75,23 +99,39 @@ index 07878c2..8d1c47e 100644 + add_compile_options(/MP) + if(BUILD_SHARED_LIBS) + add_definitions(-DWASTORAGE_DLL -D_USRDLL) ++ else() ++ add_definitions(-D_NO_WASTORAGE_API) + endif() else() message("-- Unknown compiler, success is doubtful.") endif() -@@ -109,7 +121,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +@@ -106,7 +119,6 @@ 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_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) + 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_LIBRARY azurestorage) - set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) + set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARIES}) diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index 5c1df3c..da66eb4 100644 +index 5c1df3c..40e1767 100644 --- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -27,6 +27,7 @@ find_path(CASABLANCA_INCLUDE_DIR +@@ -23,10 +23,21 @@ find_path(CASABLANCA_INCLUDE_DIR + include + ) + ++find_package(cpprestsdk) ++ ++if(cpprestsdk_FOUND) ++ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) ++ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) ++ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) ++ libfind_process(CASABLANCA) ++ return() ++endif() ++ + # Library find_library(CASABLANCA_LIBRARY NAMES cpprest @@ -100,7 +140,7 @@ index 5c1df3c..da66eb4 100644 ${CASABLANCA_PKGCONF_LIBRARY_DIRS} ${CASABLANCA_DIR} diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -index b08111f..74ba2fb 100644 +index 59fedac..3737eeb 100644 --- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) @@ -110,9 +150,9 @@ index b08111f..74ba2fb 100644 -if(UNIX) +if(UNIX OR WIN32) set(SOURCES + xml_wrapper.cpp xmlhelpers.cpp - response_parsers.cpp -@@ -64,24 +64,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") +@@ -65,24 +65,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif() if (APPLE) @@ -139,7 +179,7 @@ index b08111f..74ba2fb 100644 target_link_libraries(${AZURESTORAGE_LIBRARIES}) +if(WIN32) -+ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) ++ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) +endif() # Portions specific to azure storage binary versioning and installation. diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 150c4aafc..99c388208 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -1,23 +1,24 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.0.0 - SHA512 45d0d7f8cc350a16cff0371cdd442e851912c89061acfec559482e8f79cebafffd8681b32a30b878e329235cd3aaad5d2ff797d1148302e3109cf5111df14b97 + REF v4.0.0 + SHA512 5ca264e014685852eb52b5b732d352e3eaaca3358d4bdf78ac2a571fd3b18f2d967583ce4ec64105fb87f0ef182a84671248f3f6a62c4886ff05dfa10c773605 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch + ${CMAKE_CURRENT_LIST_DIR}/pplx-do-while.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Microsoft.WindowsAzure.Storage OPTIONS + -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF ) @@ -27,7 +28,7 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-storage-cpp RENAME copyright) -file(REMOVE_RECURSE +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() diff --git a/ports/azure-storage-cpp/pplx-do-while.patch b/ports/azure-storage-cpp/pplx-do-while.patch new file mode 100644 index 000000000..0c2163442 --- /dev/null +++ b/ports/azure-storage-cpp/pplx-do-while.patch @@ -0,0 +1,52 @@ +diff --git a/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h b/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h
+index 756163d..6fbfd44 100644
+--- a/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h
++++ b/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h
+@@ -366,7 +366,7 @@ namespace azure { namespace storage { namespace core {
+ // TODO: Reduce usage of auto variable types
+
+ auto instance = std::make_shared<executor_impl>(command, options, context);
+- return pplx::details::do_while([instance]() -> pplx::task<bool>
++ return details::_do_while([instance]() -> pplx::task<bool>
+ {
+ // 0. Begin request
+ instance->validate_location_mode();
+diff --git a/Microsoft.WindowsAzure.Storage/includes/wascore/util.h b/Microsoft.WindowsAzure.Storage/includes/wascore/util.h
+index f3401f2..6a6aa48 100644
+--- a/Microsoft.WindowsAzure.Storage/includes/wascore/util.h
++++ b/Microsoft.WindowsAzure.Storage/includes/wascore/util.h
+@@ -127,6 +127,21 @@ namespace azure { namespace storage { namespace core {
+ };
+ #endif
+
++ namespace details
++ {
++ template<class F, class T = bool>
++ pplx::task<T> _do_while(F func)
++ {
++ pplx::task<T> first = func();
++ return first.then([=](bool guard) -> pplx::task<T> {
++ if (guard)
++ return azure::storage::core::details::_do_while<F,T>(func);
++ else
++ return first;
++ });
++ }
++ }
++
+ }}} // namespace azure::storage::core
+
+ #pragma pop_macro("max")
+diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp
+index dd2250a..b8d1341 100644
+--- a/Microsoft.WindowsAzure.Storage/src/util.cpp
++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp
+@@ -98,7 +98,7 @@ namespace azure { namespace storage { namespace core {
+ auto obuffer = ostream.streambuf();
+ auto length_ptr = (length != std::numeric_limits<utility::size64_t>::max()) ? std::make_shared<utility::size64_t>(length) : nullptr;
+ auto total_ptr = std::make_shared<utility::size64_t>(0);
+- return pplx::details::do_while([istream, obuffer, buffer_size, length_ptr, total_ptr, max_length] () -> pplx::task<bool>
++ return azure::storage::core::details::_do_while([istream, obuffer, buffer_size, length_ptr, total_ptr, max_length] () -> pplx::task<bool>
+ {
+ size_t read_length = buffer_size;
+ if ((length_ptr != nullptr) && (*length_ptr < read_length))
diff --git a/ports/azure-storage-cpp/static-builds.patch b/ports/azure-storage-cpp/static-builds.patch deleted file mode 100644 index 09b2f1077..000000000 --- a/ports/azure-storage-cpp/static-builds.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 8d1c47e..3b4d1c0 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -108,6 +108,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - add_compile_options(/MP) - if(BUILD_SHARED_LIBS) - add_definitions(-DWASTORAGE_DLL -D_USRDLL) -+ else() -+ add_definitions(-D_NO_WASTORAGE_API) - endif() - else() - message("-- Unknown compiler, success is doubtful.") |
