diff --git a/community/aws-crt-cpp/APKBUILD b/community/aws-crt-cpp/APKBUILD index b4dd710a99c2c0d77a3a6cd4c51580eb162a92e6..9f2aa2bd8cb9eea58cf81444531466641d56b68f 100644 --- a/community/aws-crt-cpp/APKBUILD +++ b/community/aws-crt-cpp/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Holger Jaekel <holger.jaekel@gmx.de> maintainer="fossdd <fossdd@pwned.life>" pkgname=aws-crt-cpp -pkgver=0.29.10 +pkgver=0.30.1 pkgrel=0 pkgdesc="C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++" url="https://github.com/awslabs/aws-crt-cpp" @@ -29,10 +29,7 @@ makedepends=" samurai " subpackages="$pkgname-dev" -source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-crt-cpp/archive/refs/tags/v$pkgver.tar.gz - cmake.patch - aws-c-mqtt-0.12.1.patch - " +source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-crt-cpp/archive/refs/tags/v$pkgver.tar.gz" options="net" build() { @@ -64,7 +61,5 @@ package() { } sha512sums=" -bfececa4ae13490234ac6af5252e56bb96bc06a9d369458bc59d1bca4a8620d15aac729c68ef4dbba52e6b0068bc40c8631849f7b61b595d3eeb9c096b752a2c aws-crt-cpp-0.29.10.tar.gz -a4192afaffb9b8d0f12937591cd3968b498ff2541d7cf36fcd2639b1dc234822f18993f06a4b31b6d152ba6ee260bc0a51b6afb8ac189903774e257eb8a83e07 cmake.patch -a9d43e92f947b9477a04616af0c057ff968fff320c9ffa15f57f4f5b443b218562b559d31711342e0ea4ac339e4959d4028af2e97aa2e1af27be1c9ce17d71c2 aws-c-mqtt-0.12.1.patch +cac79199015d685173ddaffe68c29b9255a6e50865a9d92024bf3b0e3184c92f055f38e00d8b7d5c5f6eacdddd4da24fff7d4ab7faed62a790fb25f2dc8cad32 aws-crt-cpp-0.30.1.tar.gz " diff --git a/community/aws-crt-cpp/aws-c-mqtt-0.12.1.patch b/community/aws-crt-cpp/aws-c-mqtt-0.12.1.patch deleted file mode 100644 index abe4eab8110a3216a1e0a80927968fd18743ccbf..0000000000000000000000000000000000000000 --- a/community/aws-crt-cpp/aws-c-mqtt-0.12.1.patch +++ /dev/null @@ -1,163 +0,0 @@ -diff --git a/include/aws/iot/MqttRequestResponseClient.h b/include/aws/iot/MqttRequestResponseClient.h -index 805db22..35123d6 100644 ---- a/include/aws/iot/MqttRequestResponseClient.h -+++ b/include/aws/iot/MqttRequestResponseClient.h -@@ -121,12 +121,28 @@ namespace Aws - /** - * Default constructor - */ -- IncomingPublishEvent() : m_payload() { AWS_ZERO_STRUCT(m_payload); } -+ IncomingPublishEvent() : m_topic(), m_payload() -+ { -+ AWS_ZERO_STRUCT(m_topic); -+ AWS_ZERO_STRUCT(m_payload); -+ } -+ -+ /** -+ * Sets the message response topic associated with this event. The event does not own this topic. -+ * -+ * @param topic the message response topic associated with this event -+ * @return reference to this -+ */ -+ IncomingPublishEvent &WithTopic(Aws::Crt::ByteCursor topic) -+ { -+ m_topic = topic; -+ return *this; -+ } - - /** - * Sets the message payload associated with this event. The event does not own this payload. - * -- * @param payload he message payload associated with this event -+ * @param payload the message payload associated with this event - * @return reference to this - */ - IncomingPublishEvent &WithPayload(Aws::Crt::ByteCursor payload) -@@ -135,6 +151,13 @@ namespace Aws - return *this; - } - -+ /** -+ * Gets the message response topic associated with this event. -+ * -+ * @return the message response topic associated with this event -+ */ -+ Aws::Crt::ByteCursor GetTopic() const { return m_topic; } -+ - /** - * Gets the message payload associated with this event. - * -@@ -143,6 +166,7 @@ namespace Aws - Aws::Crt::ByteCursor GetPayload() const { return m_payload; } - - private: -+ Aws::Crt::ByteCursor m_topic; - Aws::Crt::ByteCursor m_payload; - }; - -diff --git a/source/iot/MqttRequestResponseClient.cpp b/source/iot/MqttRequestResponseClient.cpp -index 2bdcb96..cb14279 100644 ---- a/source/iot/MqttRequestResponseClient.cpp -+++ b/source/iot/MqttRequestResponseClient.cpp -@@ -89,7 +89,10 @@ namespace Aws - int error_code, - void *user_data); - -- static void OnIncomingPublishCallback(struct aws_byte_cursor payload, void *user_data); -+ static void OnIncomingPublishCallback( -+ struct aws_byte_cursor payload, -+ struct aws_byte_cursor topic, -+ void *user_data); - - static void OnTerminatedCallback(void *user_data); - -@@ -187,7 +190,10 @@ namespace Aws - } - } - -- void StreamingOperationImpl::OnIncomingPublishCallback(struct aws_byte_cursor payload, void *user_data) -+ void StreamingOperationImpl::OnIncomingPublishCallback( -+ struct aws_byte_cursor payload, -+ struct aws_byte_cursor topic, -+ void *user_data) - { - auto *handle = static_cast<StreamingOperationImplHandle *>(user_data); - StreamingOperationImpl *impl = handle->m_impl.get(); -@@ -198,7 +204,7 @@ namespace Aws - if (!impl->m_closed && impl->m_config.incomingPublishEventHandler) - { - IncomingPublishEvent event; -- event.WithPayload(payload); -+ event.WithTopic(topic).WithPayload(payload); - - impl->m_config.incomingPublishEventHandler(std::move(event)); - } -diff --git a/tests/MqttRequestResponse.cpp b/tests/MqttRequestResponse.cpp -index f701d20..0658713 100644 ---- a/tests/MqttRequestResponse.cpp -+++ b/tests/MqttRequestResponse.cpp -@@ -40,6 +40,12 @@ struct ResponseTracker - bool complete; - }; - -+struct TestPublishEvent -+{ -+ Aws::Crt::String topic; -+ Aws::Crt::String payload; -+}; -+ - struct TestState - { - TestState(Aws::Crt::Allocator *allocator) : allocator(allocator) {} -@@ -54,7 +60,7 @@ struct TestState - Aws::Crt::Vector<std::shared_ptr<ResponseTracker>> responseTrackers; - - Aws::Crt::Vector<Aws::Iot::RequestResponse::SubscriptionStatusEvent> subscriptionStatusEvents; -- Aws::Crt::Vector<Aws::Crt::String> incomingPublishEvents; -+ Aws::Crt::Vector<TestPublishEvent> incomingPublishEvents; - }; - - static void s_waitForConnected(struct TestState *state) -@@ -168,17 +174,20 @@ static void s_onIncomingPublishEvent(Aws::Iot::RequestResponse::IncomingPublishE - { - std::unique_lock<std::mutex> lock(state->lock); - -+ auto topicCursor = event.GetTopic(); -+ Aws::Crt::String topicAsString((const char *)topicCursor.ptr, topicCursor.len); -+ - auto payloadCursor = event.GetPayload(); - Aws::Crt::String payloadAsString((const char *)payloadCursor.ptr, payloadCursor.len); - -- state->incomingPublishEvents.push_back(payloadAsString); -+ state->incomingPublishEvents.push_back({std::move(topicAsString), std::move(payloadAsString)}); - } - state->signal.notify_one(); - } - - static void s_waitForIncomingPublishWithPredicate( - TestState *state, -- const std::function<bool(const Aws::Crt::String &)> &predicate) -+ const std::function<bool(const TestPublishEvent &)> &predicate) - { - { - std::unique_lock<std::mutex> lock(state->lock); -@@ -189,7 +198,7 @@ static void s_waitForIncomingPublishWithPredicate( - return std::any_of( - state->incomingPublishEvents.cbegin(), - state->incomingPublishEvents.cend(), -- [=](const Aws::Crt::String &payload) { return predicate(payload); }); -+ [=](const TestPublishEvent &publishEvent) { return predicate(publishEvent); }); - }); - } - } -@@ -1077,7 +1086,9 @@ static int s_doShadowUpdatedStreamIncomingPublishTest(Aws::Crt::Allocator *alloc - s_publishToProtocolClient(context, uuid, s_publishPayload, allocator); - - s_waitForIncomingPublishWithPredicate( -- &state, [](const Aws::Crt::String &payload) { return payload == Aws::Crt::String(s_publishPayload); }); -+ &state, -+ [&uuid](const TestPublishEvent &publishEvent) -+ { return publishEvent.topic == uuid && publishEvent.payload == Aws::Crt::String(s_publishPayload); }); - - return AWS_OP_SUCCESS; - } diff --git a/community/aws-crt-cpp/cmake.patch b/community/aws-crt-cpp/cmake.patch deleted file mode 100644 index 1f640de4e5b7ecfb0424923e0de267d4b3688fa2..0000000000000000000000000000000000000000 --- a/community/aws-crt-cpp/cmake.patch +++ /dev/null @@ -1,264 +0,0 @@ -Patch-Source: https://github.com/awslabs/aws-crt-cpp/pull/702 -(with submodules updates removed) ---- -From 1927b13a5041b37ae75b146358d00025ad0b9c96 Mon Sep 17 00:00:00 2001 -From: Michael Graeb <graebm@amazon.com> -Date: Fri, 20 Dec 2024 10:56:09 -0800 -Subject: [PATCH 1/5] Fix long-standing issues in CMakeLists.txt - ---- - CMakeLists.txt | 54 +++++++++++-------------------- - bin/elasticurl_cpp/CMakeLists.txt | 4 +-- - bin/mqtt5_app/CMakeLists.txt | 4 +-- - bin/mqtt5_canary/CMakeLists.txt | 4 +-- - crt/aws-c-auth | 2 +- - crt/aws-c-cal | 2 +- - crt/aws-c-common | 2 +- - crt/aws-c-compression | 2 +- - crt/aws-c-event-stream | 2 +- - crt/aws-c-http | 2 +- - crt/aws-c-io | 2 +- - crt/aws-c-mqtt | 2 +- - crt/aws-c-s3 | 2 +- - crt/aws-c-sdkutils | 2 +- - crt/aws-checksums | 2 +- - 15 files changed, 33 insertions(+), 55 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4127d0714..56c8fccb0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 3.9) -+cmake_minimum_required(VERSION 3.9...3.31) - - if(POLICY CMP0077) - cmake_policy(SET CMP0077 NEW) -@@ -31,19 +31,7 @@ project("aws-crt-cpp" - - include(CTest) - --if(DEFINED CMAKE_PREFIX_PATH) -- file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) --endif() -- --if(DEFINED CMAKE_INSTALL_PREFIX) -- file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) --endif() -- --if(UNIX AND NOT APPLE) -- include(GNUInstallDirs) --elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) -- set(CMAKE_INSTALL_LIBDIR "lib") --endif() -+include(GNUInstallDirs) - - if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64") - set(FIND_LIBRARY_USE_LIB64_PATHS true) -@@ -65,13 +53,6 @@ set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") - set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/crt/Config.h") - configure_file(include/aws/crt/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) - --# This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH --set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake") --string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}") -- --# Append that generated list to the module search path --list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH}) -- - if(BUILD_DEPS) - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/crt/aws-c-common/cmake") - -@@ -132,6 +113,9 @@ if(BUILD_DEPS) - add_subdirectory(crt/aws-c-s3) - set(BUILD_TESTING ${BUILD_TESTING_PREV}) - else() -+ # this is required so we can use aws-c-common's CMake modules -+ find_package(aws-c-common REQUIRED) -+ - include(AwsFindPackage) - set(IN_SOURCE_BUILD OFF) - endif() -@@ -356,23 +340,23 @@ aws_add_sanitizers(${PROJECT_NAME}) - - target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS}) - --install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development) --install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development) --install(FILES ${AWS_CRT_CHECKSUM_HEADERS} DESTINATION "include/aws/crt/checksum" COMPONENT Development) --install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development) --install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development) --install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development) --install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development) --install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development) --install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "include/aws/crt/endpoints" COMPONENT Development) --install(FILES ${AWS_CRT_CBOR_HEADERS} DESTINATION "include/aws/crt/cbor" COMPONENT Development) -+install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development) -+install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development) -+install(FILES ${AWS_CRT_CHECKSUM_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/checksum" COMPONENT Development) -+install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development) -+install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development) -+install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development) -+install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development) -+install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development) -+install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/endpoints" COMPONENT Development) -+install(FILES ${AWS_CRT_CBOR_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/cbor" COMPONENT Development) - - install( - TARGETS ${PROJECT_NAME} - EXPORT ${PROJECT_NAME}-targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development -- RUNTIME DESTINATION bin COMPONENT Runtime -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime - ) - - if(BUILD_SHARED_LIBS) -@@ -382,7 +366,7 @@ else() - endif() - - install(EXPORT "${PROJECT_NAME}-targets" -- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}" -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${TARGET_DIR}" - NAMESPACE AWS:: - COMPONENT Development) - -@@ -398,11 +382,11 @@ write_basic_package_version_file( - ) - - install(FILES "${GENERATED_ROOT_DIR}/${PROJECT_NAME}-config.cmake" -- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/" - COMPONENT Development) - - install(FILES "${GENERATED_ROOT_DIR}/${PROJECT_NAME}-config-version.cmake" -- DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/" - COMPONENT Development) - - if(NOT CMAKE_CROSSCOMPILING) -diff --git a/bin/elasticurl_cpp/CMakeLists.txt b/bin/elasticurl_cpp/CMakeLists.txt -index 36185c15c..a96f94e8b 100644 ---- a/bin/elasticurl_cpp/CMakeLists.txt -+++ b/bin/elasticurl_cpp/CMakeLists.txt -@@ -1,7 +1,5 @@ - project(elasticurl_cpp CXX) - --list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/lib/cmake") -- - file(GLOB ELASTICURL_CPP_SRC - "*.cpp" - ) -@@ -43,5 +41,5 @@ install(TARGETS ${ELASTICURL_CPP_PROJECT_NAME} - EXPORT ${ELASTICURL_CPP_PROJECT_NAME}-targets - COMPONENT Runtime - RUNTIME -- DESTINATION bin -+ DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT Runtime) -diff --git a/bin/mqtt5_app/CMakeLists.txt b/bin/mqtt5_app/CMakeLists.txt -index e4637d6d1..931e07e7c 100644 ---- a/bin/mqtt5_app/CMakeLists.txt -+++ b/bin/mqtt5_app/CMakeLists.txt -@@ -1,7 +1,5 @@ - project(mqtt5_app CXX) - --list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/lib/cmake") -- - file(GLOB MQTT5_APP_SRC - "*.cpp" - ) -@@ -43,5 +41,5 @@ install(TARGETS ${MQTT5_APP_PROJECT_NAME} - EXPORT ${MQTT5_APP_PROJECT_NAME}-targets - COMPONENT Runtime - RUNTIME -- DESTINATION bin -+ DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT Runtime) -diff --git a/bin/mqtt5_canary/CMakeLists.txt b/bin/mqtt5_canary/CMakeLists.txt -index 87c594cc5..4426053d4 100644 ---- a/bin/mqtt5_canary/CMakeLists.txt -+++ b/bin/mqtt5_canary/CMakeLists.txt -@@ -1,7 +1,5 @@ - project(mqtt5_canary CXX) - --list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/lib/cmake") -- - file(GLOB MQTT5_CANARY_SRC - "*.cpp" - ) -@@ -43,5 +41,5 @@ install(TARGETS ${MQTT5_CANARY_PROJECT_NAME} - EXPORT ${MQTT5_CANARY_PROJECT_NAME}-targets - COMPONENT Runtime - RUNTIME -- DESTINATION bin -+ DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT Runtime) - -From 9cfdc499b508282c00764598e13f85ddc44cbad0 Mon Sep 17 00:00:00 2001 -From: Michael Graeb <graebm@amazon.com> -Date: Fri, 20 Dec 2024 12:01:10 -0800 -Subject: [PATCH 2/5] cmake policy CMP0077 NEW is implied by - cmake_minimum_required range - ---- - CMakeLists.txt | 4 ---- - crt/aws-c-cal | 2 +- - crt/aws-c-common | 2 +- - 3 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 56c8fccb0..48c12a9d8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,9 +1,5 @@ - cmake_minimum_required(VERSION 3.9...3.31) - --if(POLICY CMP0077) -- cmake_policy(SET CMP0077 NEW) --endif() -- - option(BUILD_DEPS "Builds aws common runtime dependencies as part of build. Turn off if you want to control your dependency chain." ON) - option(BYO_CRYPTO "Don't build a tls implementation or link against a crypto interface. This feature is only for unix builds currently" OFF) - option(USE_OPENSSL "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto" OFF) - -From 9d4eb82eecf7f748e3421007adb0e92a3a735ca3 Mon Sep 17 00:00:00 2001 -From: Michael Graeb <graebm@amazon.com> -Date: Fri, 20 Dec 2024 17:52:22 -0800 -Subject: [PATCH 3/5] knock it off with this FIND_LIBRARY_USE_LIB64_PATHS - nonsense. further comments here: - https://github.com/awslabs/aws-c-common/pull/1178/commits/82dc7af9b67ff2b554614d6f28275d6673739734 - ---- - CMakeLists.txt | 5 ----- - crt/aws-c-auth | 2 +- - crt/aws-c-cal | 2 +- - crt/aws-c-common | 2 +- - crt/aws-c-compression | 2 +- - crt/aws-c-event-stream | 2 +- - crt/aws-c-http | 2 +- - crt/aws-c-io | 2 +- - crt/aws-c-mqtt | 2 +- - crt/aws-c-s3 | 2 +- - crt/aws-c-sdkutils | 2 +- - crt/aws-checksums | 2 +- - 12 files changed, 11 insertions(+), 16 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 48c12a9d8..b0409fc9e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -26,13 +26,8 @@ project("aws-crt-cpp" - VERSION ${SIMPLE_VERSION}) - - include(CTest) -- - include(GNUInstallDirs) - --if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64") -- set(FIND_LIBRARY_USE_LIB64_PATHS true) --endif() -- - if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 11) - endif()