From 94f17db3aa999a66352b928d596b12441f39717b Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 14 Sep 2024 22:05:59 +0900 Subject: [PATCH 1/2] drogon: add version 1.9.7 --- recipes/drogon/all/conandata.yml | 13 ++++ recipes/drogon/all/conanfile.py | 5 +- .../1.9.7-0002-find-cci-packages.patch | 71 +++++++++++++++++++ .../1.9.7-0003-include-exception.patch | 13 ++++ recipes/drogon/config.yml | 2 + 5 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch create mode 100644 recipes/drogon/all/patches/1.9.7-0003-include-exception.patch diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index bca73571212af..18fac93c639ed 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.7": + url: "https://github.com/drogonframework/drogon/archive/v1.9.7.tar.gz" + sha256: "e54c5d604769a496b951e5af52a0f85e60eba584fae426d204eb5b2f02cfbf59" "1.9.6": url: "https://github.com/drogonframework/drogon/archive/v1.9.6.tar.gz" sha256: "a81d0ea0e87b0214aa56f7fa7bb851011efe606af67891a0945825104505a08a" @@ -24,6 +27,16 @@ sources: url: "https://github.com/drogonframework/drogon/archive/v1.8.7.tar.gz" sha256: "d2d80d35becd69bf80d74bf09b69425193f1b7be3926bd44f3ac7b951e54465d" patches: + "1.9.7": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.7-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" + - patch_file: "patches/1.9.7-0003-include-exception.patch" + patch_description: "include exception for exception_ptr" + patch_type: "conan" "1.9.6": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 1aa59c64d8206..88788705194dd 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -110,7 +110,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires boost on C++14") def requirements(self): - self.requires("trantor/1.5.19", transitive_headers=True, transitive_libs=True) + if Version(self.version) < "1.9.7": + self.requires("trantor/1.5.19", transitive_headers=True, transitive_libs=True) + else: + self.requires("trantor/1.5.21", transitive_headers=True, transitive_libs=True) self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch new file mode 100644 index 0000000000000..10aaaaa8d1cad --- /dev/null +++ b/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 91b9b9b..9a2773f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -185,9 +185,9 @@ endif() + + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -199,7 +199,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -437,7 +437,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -460,10 +460,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -483,10 +483,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -495,7 +495,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch b/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch new file mode 100644 index 0000000000000..8c99b4baf0dcc --- /dev/null +++ b/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch @@ -0,0 +1,13 @@ +diff --git a/lib/inc/drogon/RequestStream.h b/lib/inc/drogon/RequestStream.h +index 852f075..b72e39e 100644 +--- a/lib/inc/drogon/RequestStream.h ++++ b/lib/inc/drogon/RequestStream.h +@@ -16,7 +16,7 @@ + #include + #include + #include +- ++#include + namespace drogon + { + class HttpRequest; diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index 4fe7e87fc8cfb..b6e81018df502 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.7": + folder: "all" "1.9.6": folder: "all" "1.9.5": From 4e92f0241b0a35bc14dd0fadc1d982cedebde4aa Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 14 Sep 2024 23:06:25 +0900 Subject: [PATCH 2/2] add patch_source --- recipes/drogon/all/conandata.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 18fac93c639ed..fecd2ed6377de 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -36,7 +36,8 @@ patches: patch_type: "conan" - patch_file: "patches/1.9.7-0003-include-exception.patch" patch_description: "include exception for exception_ptr" - patch_type: "conan" + patch_type: "portability" + patch_source: "https://github.com/drogonframework/drogon/pull/2159" "1.9.6": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option"