Skip to content

Commit

Permalink
Revert "Update the AWS SDK to version 1.11.160. (#4214)"
Browse files Browse the repository at this point in the history
This reverts commit c524631.
  • Loading branch information
teo-tsirpanis committed Jan 10, 2024
1 parent f6dd42e commit 6ebc1e5
Show file tree
Hide file tree
Showing 55 changed files with 1,725 additions and 1,957 deletions.
22 changes: 16 additions & 6 deletions cmake/Modules/FindAWSSDK_EP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ if (NOT AWSSDK_FOUND)
message(STATUS "Adding AWSSDK as an external project")

set(DEPENDS)
if (NOT WIN32 AND TARGET ep_curl)
if (TARGET ep_curl)
list(APPEND DEPENDS ep_curl)
endif()
if (NOT WIN32 AND TARGET ep_openssl)
if (TARGET ep_openssl)
list(APPEND DEPENDS ep_openssl)
endif()
if (TARGET ep_zlib)
Expand Down Expand Up @@ -121,6 +121,16 @@ if (NOT AWSSDK_FOUND)
set(CMAKE_GENERATOR_PLATFORM "")
endif()

if (WIN32)
find_package(Git REQUIRED)
set(CONDITIONAL_PATCH cd ${CMAKE_SOURCE_DIR} && ${GIT_EXECUTABLE} apply --ignore-whitespace -p1 --unsafe-paths --verbose --directory=${TILEDB_EP_SOURCE_DIR}/ep_awssdk < ${TILEDB_CMAKE_INPUTS_DIR}/patches/ep_awssdk/awsccommon.patch &&
${GIT_EXECUTABLE} apply --ignore-whitespace -p1 --unsafe-paths --verbose --directory=${TILEDB_EP_SOURCE_DIR}/ep_awssdk < ${TILEDB_CMAKE_INPUTS_DIR}/patches/ep_awssdk/awsconfig_cmake_3.22.patch &&
${GIT_EXECUTABLE} apply --ignore-whitespace -p1 --unsafe-paths --verbose --directory=${TILEDB_EP_SOURCE_DIR}/ep_awssdk < ${TILEDB_CMAKE_INPUTS_DIR}/patches/ep_awssdk/disable-werror.patch)
else()
set(CONDITIONAL_PATCH patch -N -p1 < ${TILEDB_CMAKE_INPUTS_DIR}/patches/ep_awssdk/awsccommon.patch &&
patch -N -p1 < ${TILEDB_CMAKE_INPUTS_DIR}/patches/ep_awssdk/awsconfig_cmake_3.22.patch &&
patch -N -p1 < ${TILEDB_CMAKE_INPUTS_DIR}/patches/ep_awssdk/disable-werror.patch)
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR NOT WIN32)
set(CONDITIONAL_CXX_FLAGS "-DCMAKE_CXX_FLAGS=-Wno-nonnull -Wno-error=deprecated-declarations")
endif()
Expand All @@ -129,13 +139,13 @@ if (NOT AWSSDK_FOUND)
PREFIX "externals"
# Set download name to avoid collisions with only the version number in the filename
DOWNLOAD_NAME ep_awssdk.zip
# We download with git clone because the repository has submodules
GIT_REPOSITORY "https://github.com/aws/aws-sdk-cpp.git"
GIT_TAG "1.11.160"
URL "https://github.com/aws/aws-sdk-cpp/archive/1.8.84.zip"
URL_HASH SHA1=e32a53a01c75ca7fdfe9feed9c5bbcedd98708e3
PATCH_COMMAND
${CONDITIONAL_PATCH}
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${AWS_CMAKE_BUILD_TYPE}
-DENABLE_TESTING=OFF
-DAWS_SDK_WARNINGS_ARE_ERRORS=OFF
-DBUILD_ONLY=s3\\$<SEMICOLON>core\\$<SEMICOLON>identity-management\\$<SEMICOLON>sts
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_INSTALL_BINDIR=lib
Expand Down
13 changes: 13 additions & 0 deletions cmake/inputs/patches/ep_awssdk/awsccommon.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index b4cf1be2..64f10d43 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -15,7 +15,7 @@ set(AWS_DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build" CACHE PATH "Dependencies buil
set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependencies download directory.")

set(AWS_C_COMMON_URL "https://github.com/awslabs/aws-c-common.git")
-set(AWS_C_COMMON_TAG "v0.4.42")
+set(AWS_C_COMMON_TAG "v0.6.2")
include(BuildAwsCCommon)

set(AWS_CHECKSUMS_URL "https://github.com/awslabs/aws-checksums.git")
23 changes: 23 additions & 0 deletions cmake/inputs/patches/ep_awssdk/awsconfig_cmake_3.22.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/cmake/AWSSDKConfig.cmake b/cmake/AWSSDKConfig.cmake
index 83eac0b3b4..c1bf32066d 100644
--- a/cmake/AWSSDKConfig.cmake
+++ b/cmake/AWSSDKConfig.cmake
@@ -129,11 +129,13 @@ endif()
get_filename_component(TEMP_PATH "${AWSSDK_CORE_LIB_FILE}" PATH)
get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)

-while (NOT TEMP_NAME STREQUAL ${LIB_SEARCH_PREFIX})
- set(TEMP_PLATFORM_PREFIX "${TEMP_NAME}/${TEMP_PLATFORM_PREFIX}")
- get_filename_component(TEMP_PATH "${TEMP_PATH}" PATH)
- get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)
-endwhile()
+if(LIB_SEARCH_PREFIX)
+ while (NOT TEMP_NAME STREQUAL "${LIB_SEARCH_PREFIX}")
+ set(TEMP_PLATFORM_PREFIX "${TEMP_NAME}/${TEMP_PLATFORM_PREFIX}")
+ get_filename_component(TEMP_PATH "${TEMP_PATH}" PATH)
+ get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)
+ endwhile()
+endif()

set(AWSSDK_PLATFORM_PREFIX "${TEMP_PLATFORM_PREFIX}")

14 changes: 14 additions & 0 deletions cmake/inputs/patches/ep_awssdk/disable-werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake
index c92652cc5..e2fa5e27a 100644
--- a/cmake/compiler_settings.cmake
+++ b/cmake/compiler_settings.cmake
@@ -53,7 +53,7 @@ macro(set_gcc_flags)
endmacro()

macro(set_gcc_warnings)
- list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")
+ list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-pedantic" "-Wextra")
if(COMPILER_CLANG)
if(PLATFORM_ANDROID)
# when using clang with libc and API lower than 21 we need to include Android support headers and ignore the gnu-include-next warning.

32 changes: 0 additions & 32 deletions ports/aws-c-auth/portfile.cmake

This file was deleted.

25 changes: 0 additions & 25 deletions ports/aws-c-auth/vcpkg.json

This file was deleted.

28 changes: 28 additions & 0 deletions ports/aws-c-cal/fix-cmake-target-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6039819..b74b65c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,7 +158,7 @@ else()
endif()

install(EXPORT "${PROJECT_NAME}-targets"
- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/"
+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/"
NAMESPACE AWS::
COMPONENT Development)

diff --git a/cmake/aws-c-cal-config.cmake b/cmake/aws-c-cal-config.cmake
index 73e7311..e87c43a 100644
--- a/cmake/aws-c-cal-config.cmake
+++ b/cmake/aws-c-cal-config.cmake
@@ -7,9 +7,5 @@ if (NOT BYO_CRYPTO AND NOT WIN32 AND NOT APPLE)
find_dependency(LibCrypto)
endif()

-if (BUILD_SHARED_LIBS)
- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake)
-else()
- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake)
-endif()
+include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake)

31 changes: 19 additions & 12 deletions ports/aws-c-cal/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO awslabs/aws-c-cal
REF "v${VERSION}"
SHA512 deee106b366522e6781974c92b1aa06542b7857b91a8d4cb59eb0e17247ce7fc3ffacb044c032ff7f2a0f9baca807d4c2d9a14934d4576966f48bfc0661e5edb
REF c4c5b175e05f2affe5e3f0203ca6c8bc5cdd8f51 # v0.5.12
SHA512 25dd1d7f207f1324aed418555dda1c3d4ec64baf76431c9efd88fd3c34b163a2e5a6778192d2c0caf937f3efd31b2f21e6a0d0f7230684d176164da0e8bcc92e
HEAD_REF master
PATCHES remove-libcrypto-messages.patch
PATCHES fix-cmake-target-path.patch
remove-libcrypto-messages.patch
)

vcpkg_cmake_configure(
Expand All @@ -16,18 +17,24 @@ vcpkg_cmake_configure(

vcpkg_cmake_install()

string(REPLACE "dynamic" "shared" subdir "${VCPKG_LIBRARY_LINKAGE}")
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/${PORT}/cmake/${subdir}" DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/${PORT}/cmake")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake" [[/${type}/]] "/")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-cal/cmake)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
endif()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/lib/${PORT}"
)
"${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-cal"
"${CURRENT_PACKAGES_DIR}/lib/aws-c-cal"
)

vcpkg_copy_pdbs()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
24 changes: 12 additions & 12 deletions ports/aws-c-cal/remove-libcrypto-messages.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
diff --git a/cmake/modules/Findcrypto.cmake b/cmake/modules/Findcrypto.cmake
index fed83bb..9c1ae28 100644
--- a/cmake/modules/Findcrypto.cmake
+++ b/cmake/modules/Findcrypto.cmake
@@ -105,9 +105,6 @@ else()
set(CRYPTO_FOUND true)
set(crypto_FOUND true)
diff --git a/cmake/modules/FindLibCrypto.cmake b/cmake/modules/FindLibCrypto.cmake
index 564ba97..f748212 100644
--- a/cmake/modules/FindLibCrypto.cmake
+++ b/cmake/modules/FindLibCrypto.cmake
@@ -89,9 +89,6 @@ else()
set(LIBCRYPTO_FOUND true)
set(LibCrypto_FOUND true)

- message(STATUS "LibCrypto Include Dir: ${crypto_INCLUDE_DIR}")
- message(STATUS "LibCrypto Shared Lib: ${crypto_SHARED_LIBRARY}")
- message(STATUS "LibCrypto Static Lib: ${crypto_STATIC_LIBRARY}")
if (NOT TARGET AWS::crypto AND
(EXISTS "${crypto_LIBRARY}")
- message(STATUS "LibCrypto Include Dir: ${LibCrypto_INCLUDE_DIR}")
- message(STATUS "LibCrypto Shared Lib: ${LibCrypto_SHARED_LIBRARY}")
- message(STATUS "LibCrypto Static Lib: ${LibCrypto_STATIC_LIBRARY}")
if (NOT TARGET crypto AND
(EXISTS "${LibCrypto_LIBRARY}")
)
4 changes: 2 additions & 2 deletions ports/aws-c-cal/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "aws-c-cal",
"version": "0.6.9",
"version": "0.5.12",
"port-version": 2,
"description": "C99 wrapper for cryptography primitives.",
"homepage": "https://github.com/awslabs/aws-c-cal",
"license": "Apache-2.0",
"supports": "!(windows & arm) & !uwp",
"dependencies": [
"aws-c-common",
Expand Down
16 changes: 8 additions & 8 deletions ports/aws-c-common/disable-internal-crt-option.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake
index 470f6db..537536b 100644
index 249b7d5..41a31e2 100644
--- a/cmake/AwsCFlags.cmake
+++ b/cmake/AwsCFlags.cmake
@@ -82,15 +82,6 @@ function(aws_set_common_properties target)
@@ -38,15 +38,6 @@ function(aws_set_common_properties target)
list(APPEND AWS_C_FLAGS /DAWS_SUPPORT_WIN7=1)
endif()

- # Set MSVC runtime libary.
- # Note: there are other ways of doing this if we bump our CMake minimum to 3.14+
- # See: https://cmake.org/cmake/help/latest/policy/CMP0091.html
- if (AWS_STATIC_MSVC_RUNTIME_LIBRARY OR STATIC_CRT)
- list(APPEND AWS_C_FLAGS "/MT$<$<CONFIG:Debug>:d>")
- string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE)
- if(STATIC_CRT)
- string(REPLACE "/MD" "/MT" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}")
- else()
- list(APPEND AWS_C_FLAGS "/MD$<$<CONFIG:Debug>:d>")
- 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 -Wstrict-prototypes)
Expand Down
28 changes: 28 additions & 0 deletions ports/aws-c-common/fix-cmake-target-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b01f56..3cc541d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -239,7 +239,7 @@ else()
endif()

install(EXPORT "${PROJECT_NAME}-targets"
- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}"
+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake"
NAMESPACE AWS::
COMPONENT Development)

diff --git a/cmake/aws-c-common-config.cmake b/cmake/aws-c-common-config.cmake
index e495210..b7676c2 100644
--- a/cmake/aws-c-common-config.cmake
+++ b/cmake/aws-c-common-config.cmake
@@ -4,9 +4,5 @@ if(WIN32 OR UNIX OR APPLE)
find_package(Threads REQUIRED)
endif()

-if (BUILD_SHARED_LIBS)
- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake)
-else()
- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake)
-endif()
+include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake)

25 changes: 12 additions & 13 deletions ports/aws-c-common/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO awslabs/aws-c-common
REF "v${VERSION}"
SHA512 f04bdc01d52b5ad191d320d352a13dd4cb9675127596c2c2229657211bc5fa3cddf05a3b395a0dc0ac5ce2f09cecf54c04b9cfacb08299e24a16a47684560f11
REF 68f28f8df258390744f3c5b460250f8809161041 # v0.6.20
SHA512 a8be405e0e1586a06db038a0068df2c9277772ff7b8df2c542d18d2aae4b2bc0fd89de668ab10d84476446834390e4e27383b68d86c7d9f0d0749b57802866f1
HEAD_REF master
PATCHES
disable-internal-crt-option.patch # Disable internal crt option because vcpkg contains crt processing flow
fix-cmake-target-path.patch # Shared libraries and static libraries are not built at the same time
)

vcpkg_cmake_configure(
Expand All @@ -16,20 +17,18 @@ vcpkg_cmake_configure(

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) # central macros
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

string(REPLACE "dynamic" "shared" subdir "${VCPKG_LIBRARY_LINKAGE}")
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/${PORT}/cmake/${subdir}" DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/${PORT}/cmake")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake" [[/${type}/]] "/")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-c-common/cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}"
"${CURRENT_PACKAGES_DIR}/lib/${PORT}"
)
"${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-common"
"${CURRENT_PACKAGES_DIR}/lib/aws-c-common"
)

vcpkg_copy_pdbs()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
3 changes: 1 addition & 2 deletions ports/aws-c-common/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "aws-c-common",
"version": "0.9.10",
"version": "0.6.20",
"description": "AWS common library for C",
"homepage": "https://github.com/awslabs/aws-c-common",
"license": "Apache-2.0",
"supports": "!(windows & arm) & !uwp",
"dependencies": [
{
Expand Down
Loading

0 comments on commit 6ebc1e5

Please sign in to comment.