diff options
| author | JackBoosY <47264268+JackBoosY@users.noreply.github.com> | 2019-04-16 01:59:09 +0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-04-15 10:59:09 -0700 |
| commit | 88dd0e7ddd63528f81cdb71c60e07cd7352e1241 (patch) | |
| tree | bf38404d30003d1cc81673b2c4b9673d0a171f55 | |
| parent | f912e8fe10fc8de50da17283d46a3064a2c8b285 (diff) | |
| download | vcpkg-88dd0e7ddd63528f81cdb71c60e07cd7352e1241.tar.gz vcpkg-88dd0e7ddd63528f81cdb71c60e07cd7352e1241.zip | |
[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
| -rw-r--r-- | ports/azure-storage-cpp/CONTROL | 4 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/builtin-uuid-osx.patch | 40 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/portfile.cmake | 4 | ||||
| -rw-r--r-- | ports/azure-storage-cpp/pplx-do-while.patch | 52 | ||||
| -rw-r--r-- | ports/libuuid/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libuuid/portfile.cmake | 4 |
6 files changed, 50 insertions, 56 deletions
diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 320ff71a6..31628d64c 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -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/ diff --git a/ports/azure-storage-cpp/builtin-uuid-osx.patch b/ports/azure-storage-cpp/builtin-uuid-osx.patch new file mode 100644 index 000000000..1e2b918cc --- /dev/null +++ b/ports/azure-storage-cpp/builtin-uuid-osx.patch @@ -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)
diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 24d59281b..58c8a4fc4 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -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() diff --git a/ports/azure-storage-cpp/pplx-do-while.patch b/ports/azure-storage-cpp/pplx-do-while.patch deleted file mode 100644 index 0c2163442..000000000 --- a/ports/azure-storage-cpp/pplx-do-while.patch +++ /dev/null @@ -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))
diff --git a/ports/libuuid/CONTROL b/ports/libuuid/CONTROL index 04bfbe47b..265fdeebf 100644 --- a/ports/libuuid/CONTROL +++ b/ports/libuuid/CONTROL @@ -1,3 +1,3 @@ Source: libuuid -Version: 1.0.3-1 +Version: 1.0.3-2 Description: Universally unique id library diff --git a/ports/libuuid/portfile.cmake b/ports/libuuid/portfile.cmake index 7989e830d..c5cd287f6 100644 --- a/ports/libuuid/portfile.cmake +++ b/ports/libuuid/portfile.cmake @@ -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" |
