From 5713b64c0baec28be64e49b22698e6345472a39a Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 3 Jun 2019 23:42:15 -0700 Subject: [PATCH 1/3] [aws-c-common]Upgrade version to 0.3.11 --- ports/aws-c-common/CONTROL | 2 +- ports/aws-c-common/portfile.cmake | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ports/aws-c-common/CONTROL b/ports/aws-c-common/CONTROL index 702ff2aa3f8b22..d80e9909120a23 100644 --- a/ports/aws-c-common/CONTROL +++ b/ports/aws-c-common/CONTROL @@ -1,3 +1,3 @@ Source: aws-c-common -Version: 0.3.0 +Version: 0.3.11 Description: AWS common library for C \ No newline at end of file diff --git a/ports/aws-c-common/portfile.cmake b/ports/aws-c-common/portfile.cmake index 68196479177a38..f9ce0892e049c3 100644 --- a/ports/aws-c-common/portfile.cmake +++ b/ports/aws-c-common/portfile.cmake @@ -3,14 +3,21 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO awslabs/aws-c-common - REF v0.3.0 - SHA512 604b4289f19be662f15dc5ba80c20b78856975332b485796f979580e45f8d778eb8ce0cc2c02dcbaf27bc1159f473e02676cd951b674b7c8478ed26438a04541 + REF v0.3.11 + SHA512 da845f748aecfff61209f542f4eac8d46738af52ce980d5c8315397f859429dfd9e4bf989ddf2fbe938d1efb33dce9c531c92cbe53388b1d1082d5caa97e8750 HEAD_REF master ) +if (${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + set(USE_STATIC ON) +else() + set(USE_STATIC OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DSTATIC_CRT=${USE_STATIC} ) vcpkg_install_cmake() From 2ebc7092f2f95b18a1e89ecf277f8ce7cc74b88d Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 5 Jun 2019 01:44:21 -0700 Subject: [PATCH 2/3] [aws-c-common]Fix dependency port build error. --- .../aws-c-common/fix-dependencey-build-error.patch | 13 +++++++++++++ ports/aws-c-common/portfile.cmake | 1 + 2 files changed, 14 insertions(+) create mode 100644 ports/aws-c-common/fix-dependencey-build-error.patch diff --git a/ports/aws-c-common/fix-dependencey-build-error.patch b/ports/aws-c-common/fix-dependencey-build-error.patch new file mode 100644 index 00000000000000..cfbf2611c967c5 --- /dev/null +++ b/ports/aws-c-common/fix-dependencey-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/include/aws/common/byte_buf.h b/include/aws/common/byte_buf.h +index 545b06d..c579c82 100644 +--- a/include/aws/common/byte_buf.h ++++ b/include/aws/common/byte_buf.h +@@ -21,6 +21,8 @@ + + #include + ++#pragma warning(disable: 4068) ++ + /** + * Represents a length-delimited binary string or buffer. If byte buffer points + * to constant memory or memory that should otherwise not be freed by this diff --git a/ports/aws-c-common/portfile.cmake b/ports/aws-c-common/portfile.cmake index f9ce0892e049c3..8b292b5f09f1bf 100644 --- a/ports/aws-c-common/portfile.cmake +++ b/ports/aws-c-common/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( REF v0.3.11 SHA512 da845f748aecfff61209f542f4eac8d46738af52ce980d5c8315397f859429dfd9e4bf989ddf2fbe938d1efb33dce9c531c92cbe53388b1d1082d5caa97e8750 HEAD_REF master + PATCHES fix-dependencey-build-error.patch # This patch fixes dependency port compilation failure ) if (${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") From d3cf830d21608ecfe12a2094e99893934d2f2c98 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 5 Jun 2019 23:13:32 -0700 Subject: [PATCH 3/3] [aws-c-common]Disable internal crt option because vcpkg contains crt processing flow --- .../disable-internal-crt-option.patch | 20 +++++++++++++++++++ ports/aws-c-common/portfile.cmake | 11 +++------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 ports/aws-c-common/disable-internal-crt-option.patch diff --git a/ports/aws-c-common/disable-internal-crt-option.patch b/ports/aws-c-common/disable-internal-crt-option.patch new file mode 100644 index 00000000000000..d82a00aaabed68 --- /dev/null +++ b/ports/aws-c-common/disable-internal-crt-option.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake +index 5ceb11c..9d0aa12 100644 +--- a/cmake/AwsCFlags.cmake ++++ b/cmake/AwsCFlags.cmake +@@ -38,15 +38,6 @@ function(aws_set_common_properties target) + # Disable unknown pragma warnings + list(APPEND AWS_C_FLAGS /wd4068) + +- string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE) +- if(STATIC_CRT) +- string(REPLACE "/MD" "/MT" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}") +- else() +- string(REPLACE "/MT" "/MD" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}") +- endif() +- string(REPLACE " " ";" _FLAGS "${_FLAGS}") +- list(APPEND AWS_C_FLAGS "${_FLAGS}") +- + else() + list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes) + diff --git a/ports/aws-c-common/portfile.cmake b/ports/aws-c-common/portfile.cmake index 8b292b5f09f1bf..609d7269d0a814 100644 --- a/ports/aws-c-common/portfile.cmake +++ b/ports/aws-c-common/portfile.cmake @@ -6,19 +6,14 @@ vcpkg_from_github( REF v0.3.11 SHA512 da845f748aecfff61209f542f4eac8d46738af52ce980d5c8315397f859429dfd9e4bf989ddf2fbe938d1efb33dce9c531c92cbe53388b1d1082d5caa97e8750 HEAD_REF master - PATCHES fix-dependencey-build-error.patch # This patch fixes dependency port compilation failure + PATCHES + fix-dependencey-build-error.patch # This patch fixes dependency port compilation failure + disable-internal-crt-option.patch # Disable internal crt option because vcpkg contains crt processing flow ) -if (${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") - set(USE_STATIC ON) -else() - set(USE_STATIC OFF) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DSTATIC_CRT=${USE_STATIC} ) vcpkg_install_cmake()