mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:28:00 +08:00
[libuuid]Add warning to non-unix platform when building. (#5844)
* [libuuid]Add warning to non-unix platform when building. * [azure-storage-cpp] Don't rely on vcpkg install of libuuid on OSX in favor of the built in version * [azure-storage-cpp] Remove old patch
This commit is contained in:
parent
f912e8fe10
commit
88dd0e7ddd
@ -1,5 +1,5 @@
|
||||
Source: azure-storage-cpp
|
||||
Version: 6.0.0
|
||||
Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp)
|
||||
Version: 6.0.0-3
|
||||
Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp&!osx), gettext
|
||||
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/
|
||||
|
40
ports/azure-storage-cpp/builtin-uuid-osx.patch
Normal file
40
ports/azure-storage-cpp/builtin-uuid-osx.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake
|
||||
index 9171f8c..b2c7b93 100644
|
||||
--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake
|
||||
+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake
|
||||
@@ -13,6 +13,11 @@
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
+if (APPLE)
|
||||
+ set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/)
|
||||
+ set(CMAKE_OSX_FRAMEWORK_HEADERS ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks/Kernel.framework/Headers)
|
||||
+ set(UUID_LIBRARY "")
|
||||
+endif()
|
||||
|
||||
if (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
@@ -39,6 +44,7 @@ else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
|
||||
/opt/include
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||
/usr/freeware/include
|
||||
+ ${CMAKE_OSX_FRAMEWORK_HEADERS}
|
||||
)
|
||||
|
||||
find_library(UUID_LIBRARY
|
||||
@@ -88,13 +94,13 @@ else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
|
||||
set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
|
||||
set(UUID_LIBRARIES ${UUID_LIBRARY})
|
||||
|
||||
- if (UUID_INCLUDE_DIRS AND UUID_LIBRARIES)
|
||||
+ if (UUID_INCLUDE_DIRS AND (UUID_LIBRARIES OR APPLE))
|
||||
set(UUID_FOUND TRUE)
|
||||
endif (UUID_INCLUDE_DIRS AND UUID_LIBRARIES)
|
||||
|
||||
if (UUID_FOUND)
|
||||
if (NOT UUID_FIND_QUIETLY)
|
||||
- message(STATUS "Found UUID : ${UUID_LIBRARIES}")
|
||||
+ message(STATUS "Found UUID : ${UUID_INCLUDE_DIRS} ${UUID_LIBRARIES}")
|
||||
endif (NOT UUID_FIND_QUIETLY)
|
||||
else (UUID_FOUND)
|
||||
if (UUID_FIND_REQUIRED)
|
@ -11,7 +11,8 @@ vcpkg_from_github(
|
||||
SHA512 e568c3c3fd10a688b4d2491987998b1e133e54853fbf94a238a0cc3955dfd4d68bedf79a0e30bb5f30e8dd3c2bf41999d7c8658571b7dca9a4058140258ca314
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/pplx-do-while.patch
|
||||
# on osx use the uuid.h that is part of the osx sdk
|
||||
builtin-uuid-osx.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -20,6 +21,7 @@ vcpkg_configure_cmake(
|
||||
-DCMAKE_FIND_FRAMEWORK=LAST
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_SAMPLES=OFF
|
||||
-DGETTEXT_LIB_DIR=${CURRENT_INSTALLED_DIR}/include
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
@ -1,52 +0,0 @@
|
||||
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))
|
@ -1,3 +1,3 @@
|
||||
Source: libuuid
|
||||
Version: 1.0.3-1
|
||||
Version: 1.0.3-2
|
||||
Description: Universally unique id library
|
||||
|
@ -1,5 +1,9 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if (NOT ((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")))
|
||||
message(FATAL_ERROR "libuuid currently only supports unix platforms.")
|
||||
endif()
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libuuid-1.0.3)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz"
|
||||
|
Loading…
x
Reference in New Issue
Block a user