Skip to content

Commit

Permalink
(#8402) aws-crt-cpp: add version 0.17.12 with update dependencies
Browse files Browse the repository at this point in the history
* aws-crt-cpp: add version 0.17.12 with update dependencies

* add endline

* update aws-checksums

* revert set_property()

* revert required version

Co-authored-by: SpaceIm <[email protected]>

* remove with_openssl

Co-authored-by: SpaceIm <[email protected]>

* remove with_openssl

Co-authored-by: SpaceIm <[email protected]>

* remove with_openssl

Co-authored-by: SpaceIm <[email protected]>

* use export_sources()

* moved export_sources position and used absolute names.

Co-authored-by: SpaceIm <[email protected]>
  • Loading branch information
toge and SpaceIm authored Dec 20, 2021
1 parent 5f6cf2c commit b80d738
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 11 deletions.
7 changes: 7 additions & 0 deletions recipes/aws-crt-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
sources:
"0.17.12":
url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.12.tar.gz"
sha256: "acdd8b83198c5a471f92702bc4101828fe55361005764143704c39acd6f80ffc"
"0.14.3":
url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.14.3.tar.gz"
sha256: "3ea16c43e691bab0c373ba1ad072f6535390c516ebda658dfaf4d074d920e0fb"
patches:
"0.17.12":
- base_path: "source_subfolder"
patch_file: "patches/0.17.12-fix-cast-error.patch"
27 changes: 17 additions & 10 deletions recipes/aws-crt-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
from conans import CMake, ConanFile, tools
import os

required_conan_version = ">=1.33.0"
required_conan_version = ">=1.43.0"

class AwsCrtCpp(ConanFile):
name = "aws-crt-cpp"
description = "C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++."
topics = ("conan", "aws")
topics = ("aws", "amazon", "cloud", "wrapper")
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/awslabs/aws-crt-cpp"
license = "Apache-2.0",
exports_sources = "CMakeLists.txt"
generators = "cmake", "cmake_find_package"
settings = "os", "arch", "compiler", "build_type"
options = {
Expand All @@ -28,6 +27,11 @@ class AwsCrtCpp(ConanFile):
def _source_subfolder(self):
return "source_subfolder"

def export_sources(self):
self.copy("CMakeLists.txt")
for patch in self.conan_data.get("patches", {}).get(self.version, []):
self.copy(patch["patch_file"])

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand All @@ -42,13 +46,13 @@ def validate(self):

def requirements(self):
self.requires("aws-c-event-stream/0.2.7")
self.requires("aws-c-common/0.6.9")
self.requires("aws-c-io/0.10.9")
self.requires("aws-c-http/0.6.7")
self.requires("aws-c-auth/0.6.4")
self.requires("aws-c-mqtt/0.7.6")
self.requires("aws-c-s3/0.1.19")
self.requires("aws-checksums/0.1.11")
self.requires("aws-c-common/0.6.15")
self.requires("aws-c-io/0.10.13")
self.requires("aws-c-http/0.6.10")
self.requires("aws-c-auth/0.6.8")
self.requires("aws-c-mqtt/0.7.9")
self.requires("aws-c-s3/0.1.29")
self.requires("aws-checksums/0.1.12")

def source(self):
tools.get(**self.conan_data["sources"][self.version],
Expand Down Expand Up @@ -76,6 +80,9 @@ def package(self):
tools.rmdir(os.path.join(self.package_folder, "lib", "aws-crt-cpp"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "aws-crt-cpp")
self.cpp_info.set_property("cmake_target_name", "AWS::aws-crt-cpp")

self.cpp_info.filenames["cmake_find_package"] = "aws-crt-cpp"
self.cpp_info.filenames["cmake_find_package_multi"] = "aws-crt-cpp"
self.cpp_info.names["cmake_find_package"] = "AWS"
Expand Down
13 changes: 13 additions & 0 deletions recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp
index 9f9f8cf..e9913ef 100644
--- a/source/io/TlsOptions.cpp
+++ b/source/io/TlsOptions.cpp
@@ -216,7 +216,7 @@ namespace Aws

if (m_slotId)
{
- options.slot_id = &(*m_slotId);
+ options.slot_id = const_cast<uint64_t*>(&(*m_slotId));
}

if (m_userPin)
2 changes: 1 addition & 1 deletion recipes/aws-crt-cpp/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8)
project(test_package CXX)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGET)
conan_basic_setup(TARGETS)

find_package(aws-crt-cpp REQUIRED CONFIG)

Expand Down
2 changes: 2 additions & 0 deletions recipes/aws-crt-cpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.17.12":
folder: all
"0.14.3":
folder: all

0 comments on commit b80d738

Please sign in to comment.