Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aws refactor] aws-sdk-cpp: Review dependencies, add new version and remove old one #24924

Merged
merged 40 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b2abbba
[aws refactor] aws-sdk-cpp: Review dependencies, add new version and …
danimtb Aug 13, 2024
1f4a310
patches
danimtb Aug 14, 2024
11d6856
fix
danimtb Aug 14, 2024
71d6063
fix
danimtb Aug 14, 2024
888c2f6
fix
danimtb Aug 14, 2024
aa944b6
fix
danimtb Aug 14, 2024
b2517aa
Merge branch 'master' into fix/aws13
AbrilRBS Aug 19, 2024
faae21f
Merge branch 'master' into fix/aws13
AbrilRBS Aug 20, 2024
436f623
Add patches for new version
AbrilRBS Aug 20, 2024
a5ef8cb
Fix missing patch
AbrilRBS Aug 20, 2024
9d22c20
Fix crossbuildings, fix invalid macos invalidation, and dependant fil…
AbrilRBS Aug 21, 2024
feeb8fd
Reorder requirements to match upstream dependency declarations
AbrilRBS Aug 21, 2024
c43618f
Link Pulseaudio for Android
AbrilRBS Aug 21, 2024
e63180c
Add missing requires
AbrilRBS Aug 21, 2024
21de7d0
Cleanup
AbrilRBS Aug 23, 2024
fe8414c
Add missing requires
AbrilRBS Aug 28, 2024
0197c45
Fix component requires
AbrilRBS Sep 4, 2024
ddd9fd7
Reorder for better checking in new versions in the future
AbrilRBS Sep 4, 2024
90e7f69
Add zlib requirement, else compression fails when it finds it in the …
AbrilRBS Sep 4, 2024
2b5f128
Fix pulseaudio dependency in Android
AbrilRBS Sep 5, 2024
c08a148
aws-sdk-cpp: add missing transitive_headers=True
valgur Sep 3, 2024
d046db4
Fix pulseaudio for non linux systems
AbrilRBS Sep 5, 2024
8eb8a13
backport pulseaudio to old version
AbrilRBS Sep 5, 2024
1c8b6e7
Add AudioToolbox to text-to-speech frameworks
AbrilRBS Sep 5, 2024
e0e616a
Merge branch 'master' into fix/aws13
AbrilRBS Sep 12, 2024
cc6b5d6
Validate build issue out
AbrilRBS Sep 13, 2024
1d44a08
Merge branch 'fix/aws13' of github.com:danimtb/conan-center-index int…
AbrilRBS Sep 13, 2024
3d29cd9
Fix
AbrilRBS Sep 13, 2024
141ddd8
Cleanups
AbrilRBS Sep 23, 2024
6b3babd
Merge branch 'fix/aws13' of github.com:danimtb/conan-center-index int…
AbrilRBS Sep 23, 2024
26df3ef
TypO
AbrilRBS Sep 23, 2024
393abf8
Final improvements for aws-sdk-cpp, sdks are now defined per-version
AbrilRBS Sep 23, 2024
512d3ac
Merge branch 'master' into fix/aws13
AbrilRBS Sep 23, 2024
c86a614
Merge branch 'master' into fix/aws13
AbrilRBS Sep 24, 2024
306f15f
Back to validate()
AbrilRBS Sep 24, 2024
e86aa38
Merge branch 'fix/aws13' of github.com:danimtb/conan-center-index int…
AbrilRBS Sep 24, 2024
664f552
Merge branch 'master' into fix/aws13
AbrilRBS Sep 24, 2024
96483dd
Support Conan 1
AbrilRBS Sep 24, 2024
a048d38
Merge branch 'fix/aws13' of github.com:danimtb/conan-center-index int…
AbrilRBS Sep 24, 2024
b34f0ff
Back to validate_build()
AbrilRBS Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions recipes/aws-sdk-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
sources:
"1.11.352":
url: "https://github.com/aws/aws-sdk-cpp/archive/1.11.352.tar.gz"
sha256: "999583df108a5363ff33563f86ea23a528761ebea3577348867932ba7eeacae2"
"1.9.234":
url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.234.tar.gz"
sha256: "52e36cf568fe0b2a0fc82a9333c0b31ba843db16670f4ccbb7b9fd142f1b00a5"
patches:
"1.11.352":
- patch_file: patches/1.11.352-0001-pulseaudio.patch
patch_description: Use pulseaudio from conan
patch_type: conan
- patch_file: patches/1.11.352-0002-disable-sort-links.patch
- patch_file: patches/1.9.100-0002-aws-plugin-conf.patch
"1.9.234":
- patch_file: patches/1.9.234-0001-issue-1816.patch
- patch_file: patches/1.9.234-0002-disable-sort-links.patch
Expand Down
61 changes: 40 additions & 21 deletions recipes/aws-sdk-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ class AwsSdkCppConan(ConanFile):
}
default_options = {key: False for key in options.keys()}
default_options["fPIC"] = True
default_options["access-management"] = True
default_options["identity-management"] = True
default_options["monitoring"] = True
default_options["access-management"] = True
default_options["queues"] = True
default_options["s3-encryption"] = True
default_options["transfer"] = True
default_options["s3-encryption"] = True
default_options["text-to-speech"] = True
default_options["monitoring"] = True

short_paths = True

Expand Down Expand Up @@ -336,15 +336,21 @@ def layout(self):

def requirements(self):
if self.version == "1.11.352":
self.requires("aws-crt-cpp/0.26.9", transitive_headers=True)
self.requires("aws-c-auth/0.7.16")
self.requires("aws-c-cal/0.6.14")
self.requires("aws-c-common/0.9.15")
# self.requires("aws-c-compression/0.2.18")
self.requires("aws-c-event-stream/0.4.2")
self.requires("aws-checksums/0.1.18")
self.requires("aws-c-cal/0.6.14")
self.requires("aws-c-http/0.8.1")
self.requires("aws-c-io/0.14.7")
self.requires("aws-crt-cpp/0.26.9", transitive_headers=True)
self.requires("aws-c-mqtt/0.10.3")
if self.options.get_safe("s3-crt"):
self.requires("aws-c-s3/0.5.5")
# self.requires("aws-c-sdkutils/0.1.15")
self.requires("aws-checksums/0.1.18")
# missing aws-lc
# self.requires("s2n/1.4.16")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if self.version == "1.9.234":
self.requires("aws-c-common/0.6.11")
self.requires("aws-c-event-stream/0.2.7")
Expand All @@ -358,9 +364,19 @@ def requirements(self):
if self.settings.os != "Windows":
self.requires("openssl/[>=1.1 <4]")
self.requires("libcurl/[>=7.78.0 <9]")
if self.settings.os in ["Linux", "FreeBSD"]:
if self.settings.os in ["Linux", "FreeBSD", "Android"]:
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved
if self.options.get_safe("text-to-speech"):
self.requires("pulseaudio/14.2")
# zlib is used if ENABLE_ZLIB_REQUEST_COMPRESSION is enabled, set ot ON by default
self.requires("zlib/[>=1.2.11 <2]")

@property
def _settings_build(self):
return getattr(self, "settings_build", self.settings)

def validate_build(self):
if self._settings_build.os == "Windows" and self.settings.os == "Android":
raise ConanInvalidConfiguration("Cross-building from Windows to Android is not supported")

def validate(self):
if (self.options.shared
Expand All @@ -372,12 +388,6 @@ def validate(self):
)
if is_msvc(self) and is_msvc_static_runtime(self):
raise ConanInvalidConfiguration("Static runtime is not working for more recent releases")
else:
if self.settings.os == "Macos" and self.settings.arch == "armv8":
raise ConanInvalidConfiguration(
"This version doesn't support arm8. "
"See https://github.com/aws/aws-sdk-cpp/issues/1542"
)

def package_id(self):
for hl_comp in self._internal_requirements.keys():
Expand Down Expand Up @@ -444,15 +454,19 @@ def _res_folder(self):

def _create_project_cmake_module(self):
# package files needed to build other components (e.g. aws-cdi-sdk) with this SDK
for file in [
dependant_files = [
"cmake/compiler_settings.cmake",
"cmake/initialize_project_version.cmake",
"cmake/utilities.cmake",
"cmake/sdk_plugin_conf.cmake",
"toolchains/cmakeProjectConfig.cmake",
"toolchains/pkg-config.pc.in",
"aws-cpp-sdk-core/include/aws/core/VersionConfig.h"
]:
"toolchains/pkg-config.pc.in"
]
if Version(self.version) >= "1.11.352":
dependant_files.append("src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h")
else:
dependant_files.append("aws-cpp-sdk-core/include/aws/core/VersionConfig.h")
for file in dependant_files:
copy(self, file, src=self.source_folder, dst=os.path.join(self.package_folder, self._res_folder))
replace_in_file(
self, os.path.join(self.package_folder, self._res_folder, file),
Expand Down Expand Up @@ -492,16 +506,21 @@ def package_info(self):
self.cpp_info.components["core"].set_property("pkg_config_name", "aws-sdk-cpp-core")
self.cpp_info.components["core"].libs = ["aws-cpp-sdk-core"]
self.cpp_info.components["core"].requires = [
"zlib::zlib",
"aws-c-common::aws-c-common",
"aws-c-event-stream::aws-c-event-stream",
"aws-checksums::aws-checksums",
]
self.cpp_info.components["core"].requires.extend([
"aws-c-cal::aws-c-cal",
"aws-c-http::aws-c-http",
"aws-c-io::aws-c-io",
"aws-crt-cpp::aws-crt-cpp",
])
]

if Version(self.version) >= "1.11.352":
self.cpp_info.components["core"].requires.extend([
"aws-c-auth::aws-c-auth",
"aws-c-mqtt::aws-c-mqtt"
])

# other components
enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)]
Expand Down Expand Up @@ -540,7 +559,7 @@ def package_info(self):
else:
self.cpp_info.components["core"].requires.extend(["libcurl::curl", "openssl::openssl"])

if self.settings.os in ["Linux", "FreeBSD"]:
if self.settings.os in ["Linux", "FreeBSD", "Android"]:
self.cpp_info.components["core"].system_libs.append("atomic")
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved
if self.options.get_safe("text-to-speech"):
self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio")
Expand Down
30 changes: 30 additions & 0 deletions recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt b/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt
index 5a40f1906..73a954c3f 100644
--- a/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt
+++ b/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt
@@ -9,8 +9,6 @@ file( GLOB TEXT_TO_SPEECH_HEADERS "include/aws/text-to-speech/*.h" )

set(PLATFORM_LIBS "")

-check_include_files("pulse/simple.h" HAVE_PULSE)
-
if(PLATFORM_WINDOWS)
file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/windows/*.h" )
file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/windows/*.cpp" )
@@ -20,13 +18,14 @@ if(PLATFORM_WINDOWS)
endif()

if (PLATFORM_LINUX)
- if(HAVE_PULSE)
+ find_package(pulseaudio)
+ if(1)
file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/linux/*.h" )
file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/linux/*.cpp" )

message(STATUS "Pulse audio header files have been detected, included pulse audio as a possible sound driver implementation.")
add_definitions("-DPULSE")
- set(PLATFORM_LIBS ${PLATFORM_LIBS} pulse pulse-simple)
+ set(PLATFORM_LIBS ${PLATFORM_LIBS} "pulseaudio::pulseaudio")
else()
message(WARNING "We've detected that you are building on linux, but the header files for pulseaudio are not available.\
If you are providing your own audio implementation or you will not be using the text-to-speech library, this is fine.\
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake
index 1b1ada7fc..606f5db18 100644
--- a/cmake/sdks.cmake
+++ b/cmake/sdks.cmake
@@ -271,7 +271,7 @@ function(add_sdks)

# the catch-all config needs to list all the targets in a dependency-sorted order
include(dependencies)
- sort_links(EXPORTS)
+ #sort_links(EXPORTS)

# make an everything config by just including all the individual configs
file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "")
2 changes: 2 additions & 0 deletions recipes/aws-sdk-cpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"1.11.352":
folder: "all"
"1.9.234":
folder: "all"
Loading