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

drogon: add version 1.9.7 #25264

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions recipes/drogon/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -24,6 +27,17 @@ 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: "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"
Expand Down
5 changes: 4 additions & 1 deletion recipes/drogon/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down
71 changes: 71 additions & 0 deletions recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch
Original file line number Diff line number Diff line change
@@ -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)
13 changes: 13 additions & 0 deletions recipes/drogon/all/patches/1.9.7-0003-include-exception.patch
Original file line number Diff line number Diff line change
@@ -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 <string>
#include <functional>
#include <memory>
-
+#include <exception>
Copy link
Member

Choose a reason for hiding this comment

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

My guess is that this will be approved, seems like a logical change

namespace drogon
{
class HttpRequest;
2 changes: 2 additions & 0 deletions recipes/drogon/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.9.7":
folder: "all"
"1.9.6":
folder: "all"
"1.9.5":
Expand Down
Loading