From 85cab47ea46f255dd6c3528e309191ed7c3fd2ff Mon Sep 17 00:00:00 2001 From: sdcb Date: Sat, 4 Feb 2017 11:18:04 +0800 Subject: [PATCH] [aws-sdk-cpp] upgrade to 1.0.61 1. upgrade to 1.0.61 2. disable warning as error temply(fix https://github.com/Microsoft/vcpkg/issues/629 before https://github.com/aws/aws-sdk-cpp/issues/438) 3. using cmake file(append) instead of patch to define #define USE_IMPORT_EXPORT in SDKConfig.h (simplified code) --- ports/aws-sdk-cpp/disable_warning_as_error.patch | 13 +++++++++++++ ports/aws-sdk-cpp/portfile.cmake | 15 ++++++--------- ports/aws-sdk-cpp/shared_define.patch | 10 ---------- 3 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 ports/aws-sdk-cpp/disable_warning_as_error.patch delete mode 100644 ports/aws-sdk-cpp/shared_define.patch diff --git a/ports/aws-sdk-cpp/disable_warning_as_error.patch b/ports/aws-sdk-cpp/disable_warning_as_error.patch new file mode 100644 index 0000000000..ec5587eb86 --- /dev/null +++ b/ports/aws-sdk-cpp/disable_warning_as_error.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake +index 36795a2..77334ee 100644 +--- a/cmake/compiler_settings.cmake ++++ b/cmake/compiler_settings.cmake +@@ -57,7 +57,7 @@ endif() + if(MSVC) + # warnings as errors, max warning level (4) + if(NOT CMAKE_CXX_FLAGS MATCHES "/WX") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") ++ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + endif() + + # taken from http://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 5313e85b76..21219c3c99 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.47) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.61) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.47.tar.gz" - FILENAME "aws-sdk-cpp-1.0.47.tar.gz" - SHA512 ce7471bafe2763f1c382eed8afeaf6422058599a3aa11ae52909da668c45d12827fcd06b9b3ce34e3c2fa33297fd2e09421b8a89833d581efaf62b7108232acf + URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.61.tar.gz" + FILENAME "aws-sdk-cpp-1.0.61.tar.gz" + SHA512 aef0a85a32db24dc4fba0fc49c2533074580f3df628e787ff0808f03deea5dac42e19b1edc966706784e98cfed17a350c3eff4f222df7cc756065be56d1fc6a6 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -11,6 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/drop_git.patch + ${CMAKE_CURRENT_LIST_DIR}/disable_warning_as_error.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) @@ -44,11 +45,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) - vcpkg_apply_patches( #define USE_IMPORT_EXPORT in SDKConfig.h - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/shared_define.patch - ) + file(APPEND ${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h "#define USE_IMPORT_EXPORT") endif() # Handle copyright diff --git a/ports/aws-sdk-cpp/shared_define.patch b/ports/aws-sdk-cpp/shared_define.patch deleted file mode 100644 index 96657b33ea..0000000000 --- a/ports/aws-sdk-cpp/shared_define.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/aws/core/SDKConfig.h b/aws/core/SDKConfig.h -index 130c9dd..66b2630 100644 ---- a/aws/core/SDKConfig.h -+++ b/aws/core/SDKConfig.h -@@ -17,3 +17,4 @@ - - #define JSON_USE_EXCEPTION 0 - -+#define USE_IMPORT_EXPORT -\ No newline at end of file