Dump drogon to v1.8.2 and trantor to v1.5.8 and c-ares to 1.18.1 (#1729)

* Dump drogon to v1.8.2 and trantor to v1.5.8

* Fix drogon patches checksum

* Dump c-ares to 1.18.1

* Fix trantor

* fix c-ares

* fix c-ares again

My apologies for my previous sloppiness: I pasted it straight from another branch (in my fork), but didn't get it right...

* fix c-ares again again

* fix trantor checksum
pull/1734/head
TES286 2 years ago committed by GitHub
parent 314103059e
commit 208a04158c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      packages/c/c-ares/patches/1.18.1/guard-imported-lib.patch
  2. 12
      packages/c/c-ares/patches/1.18.1/skip-docs.patch
  3. 17
      packages/c/c-ares/xmake.lua
  4. 12
      packages/d/drogon/patches/1.8.0/config.patch
  5. 62
      packages/d/drogon/patches/1.8.0/redis.patch
  6. 52
      packages/d/drogon/patches/1.8.0/resolv.patch
  7. 18
      packages/d/drogon/xmake.lua
  8. 40
      packages/t/trantor/patches/1.5.8/skip_doc.patch
  9. 7
      packages/t/trantor/xmake.lua

@ -0,0 +1,20 @@
diff --git a/c-ares-config.cmake.in b/c-ares-config.cmake.in
--- a/c-ares-config.cmake.in
+++ b/c-ares-config.cmake.in
@@ -8,12 +8,16 @@ include("${CMAKE_CURRENT_LIST_DIR}/c-ares-targets.cmake")
set(c-ares_LIBRARY c-ares::cares)
if(@CARES_SHARED@)
+ if(NOT TARGET c-ares::cares_shared)
add_library(c-ares::cares_shared INTERFACE IMPORTED)
set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
+ endif()
set(c-ares_SHARED_LIBRARY c-ares::cares_shared)
elseif(@CARES_STATIC@)
+ if(NOT TARGET c-ares::cares_static)
add_library(c-ares::cares_static INTERFACE IMPORTED)
set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
+ endif()
endif()
if(@CARES_STATIC@)

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -618,7 +618,7 @@ ADD_SUBDIRECTORY (include)
ADD_SUBDIRECTORY (src)
# Docs
-ADD_SUBDIRECTORY (docs)
+#ADD_SUBDIRECTORY (docs)
# Tests
IF (CARES_BUILD_TESTS OR CARES_BUILD_CONTAINER_TESTS)

@ -1,11 +1,22 @@
package("c-ares")
set_homepage("https://c-ares.haxx.se/")
set_homepage("https://c-ares.org/")
set_description("A C library for asynchronous DNS requests")
add_urls("https://c-ares.haxx.se/download/c-ares-$(version).tar.gz")
add_urls("https://c-ares.org/download/c-ares-$(version).tar.gz")
add_versions("1.16.1", "d08312d0ecc3bd48eee0a4cc0d2137c9f194e0a28de2028928c0f6cae85f86ce")
add_versions("1.17.0", "1cecd5dbe21306c7263f8649aa6e9a37aecb985995a3489f487d98df2b40757d")
add_versions("1.17.1", "d73dd0f6de824afd407ce10750ea081af47eba52b8a6cb307d220131ad93fc40")
add_versions("1.17.2", "4803c844ce20ce510ef0eb83f8ea41fa24ecaae9d280c468c582d2bb25b3913d")
add_versions("1.18.0", "71c19708ed52a60ec6f14a4a48527187619d136e6199683e77832c394b0b0af8")
add_versions("1.18.1", "1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf")
add_patches("1.18.1",
path.join(os.scriptdir(), "patches", "1.18.1", "guard-imported-lib.patch" ),
"3cb03453af9e1477cfe926b1c03b2e3fbb8200a72888b590439e69e2d4253609")
add_patches("1.18.1",
path.join(os.scriptdir(), "patches", "1.18.1", "skip-docs.patch" ),
"bbe389b4aab052c2e6845e87d1f56a8366bf18c944f5e5e6f05a2cf105dbe680")
if is_plat("macosx") then
add_syslinks("resolv")
@ -46,4 +57,4 @@ package("c-ares")
on_test(function (package)
assert(package:has_cfuncs("ares_library_init", {includes = "ares.h"}))
end)
end)

@ -0,0 +1,12 @@
diff --git a/cmake/templates/DrogonConfig.cmake.in b/cmake/templates/DrogonConfig.cmake.in
--- a/cmake/templates/DrogonConfig.cmake.in
+++ b/cmake/templates/DrogonConfig.cmake.in
@@ -19,7 +19,7 @@ find_dependency(UUID REQUIRED)
endif(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND NOT WIN32)
find_dependency(ZLIB REQUIRED)
if(@pg_FOUND@)
-find_dependency(pg)
+find_dependency(PostgreSQL)
endif()
if(@SQLite3_FOUND@)
find_dependency(SQLite3)

@ -0,0 +1,62 @@
diff --git a/nosql_lib/redis/src/RedisClientImpl.cc b/nosql_lib/redis/src/RedisClientImpl.cc
--- a/nosql_lib/redis/src/RedisClientImpl.cc
+++ b/nosql_lib/redis/src/RedisClientImpl.cc
@@ -12,6 +12,7 @@
*
*/
+#include "RedisConnection.h"
#include "RedisClientImpl.h"
#include "RedisTransactionImpl.h"
#include "../../lib/src/TaskTimeoutFlag.h"
diff --git a/nosql_lib/redis/src/RedisClientImpl.h b/nosql_lib/redis/src/RedisClientImpl.h
--- a/nosql_lib/redis/src/RedisClientImpl.h
+++ b/nosql_lib/redis/src/RedisClientImpl.h
@@ -13,7 +13,6 @@
*/
#pragma once
-#include "RedisConnection.h"
#include <drogon/nosql/RedisClient.h>
#include <trantor/utils/NonCopyable.h>
#include <trantor/net/EventLoopThreadPool.h>
@@ -26,6 +25,8 @@ namespace drogon
{
namespace nosql
{
+class RedisConnection;
+using RedisConnectionPtr = std::shared_ptr<RedisConnection>;
class RedisClientImpl final
: public RedisClient,
public trantor::NonCopyable,
diff --git a/nosql_lib/redis/src/RedisClientLockFree.cc b/nosql_lib/redis/src/RedisClientLockFree.cc
--- a/nosql_lib/redis/src/RedisClientLockFree.cc
+++ b/nosql_lib/redis/src/RedisClientLockFree.cc
@@ -12,6 +12,7 @@
*
*/
+#include "RedisConnection.h"
#include "RedisClientLockFree.h"
#include "RedisTransactionImpl.h"
#include "../../lib/src/TaskTimeoutFlag.h"
diff --git a/nosql_lib/redis/src/RedisClientLockFree.h b/nosql_lib/redis/src/RedisClientLockFree.h
--- a/nosql_lib/redis/src/RedisClientLockFree.h
+++ b/nosql_lib/redis/src/RedisClientLockFree.h
@@ -13,7 +13,6 @@
*/
#pragma once
-#include "RedisConnection.h"
#include <drogon/nosql/RedisClient.h>
#include <trantor/utils/NonCopyable.h>
#include <trantor/net/EventLoopThreadPool.h>
@@ -26,6 +25,8 @@ namespace drogon
{
namespace nosql
{
+class RedisConnection;
+using RedisConnectionPtr = std::shared_ptr<RedisConnection>;
class RedisClientLockFree final
: public RedisClient,
public trantor::NonCopyable,

@ -0,0 +1,52 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,9 +120,9 @@ if (WIN32)
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party/mman-win32>)
endif (WIN32)
-add_subdirectory(trantor)
+find_package(Trantor CONFIG REQUIRED)
-target_link_libraries(${PROJECT_NAME} PUBLIC trantor)
+target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku")
target_link_libraries(${PROJECT_NAME} PRIVATE network)
@@ -316,11 +316,10 @@ endif (NOT WIN32)
if (BUILD_POSTGRESQL)
# find postgres
- find_package(pg)
- if (pg_FOUND)
- message(STATUS "libpq inc path:" ${PG_INCLUDE_DIRS})
- message(STATUS "libpq lib:" ${PG_LIBRARIES})
- target_link_libraries(${PROJECT_NAME} PRIVATE pg_lib)
+ find_package(PostgreSQL REQUIRED)
+ if(PostgreSQL_FOUND)
+ set(pg_FOUND true)
+ target_link_libraries(${PROJECT_NAME} PRIVATE PostgreSQL::PostgreSQL)
set(DROGON_SOURCES
${DROGON_SOURCES}
orm_lib/src/postgresql_impl/PostgreSQLResultImpl.cc)
@@ -348,7 +348,7 @@ if (BUILD_POSTGRESQL)
${private_headers}
orm_lib/src/postgresql_impl/PgConnection.h)
endif (libpq_supports_batch)
- endif (pg_FOUND)
+ endif (PostgreSQL_FOUND)
endif (BUILD_POSTGRESQL)
if (BUILD_MYSQL)
diff --git a/drogon_ctl/CMakeLists.txt b/drogon_ctl/CMakeLists.txt
--- a/drogon_ctl/CMakeLists.txt
+++ b/drogon_ctl/CMakeLists.txt
@@ -19,7 +19,7 @@ add_executable(_drogon_ctl
target_link_libraries(_drogon_ctl ${PROJECT_NAME})
if (WIN32 AND BUILD_SHARED_LIBS)
set(DROGON_FILE $<TARGET_FILE:drogon>)
- set(TRANTOR_FILE $<TARGET_FILE:trantor>)
+ set(TRANTOR_FILE $<TARGET_FILE:Trantor::Trantor>)
add_custom_command(TARGET _drogon_ctl POST_BUILD
COMMAND ${CMAKE_COMMAND}
-DCTL_FILE=${DROGON_FILE}

@ -1,7 +1,7 @@
package("drogon")
set_homepage("https://github.com/an-tao/drogon/")
set_description("Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows")
set_description("Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows")
set_license("MIT")
add_urls("https://github.com/an-tao/drogon/archive/refs/tags/$(version).tar.gz",
@ -11,15 +11,21 @@ package("drogon")
add_versions("v1.7.1", "a0bce1f32b6e1321486bb25c55ca7bd7a577cbd53f1e7be47367d0f9733730f1")
add_versions("v1.7.3", "36dc5a3acad3b8a32bb1364764b26cf01c687a4f62358de9632e055b156313a6")
add_versions("v1.7.5", "e2af7c55dcabafef16f26f5b3242692f5a2b54c19b7b626840bf9132d24766f6")
add_versions("v1.8.0", "bc6503cf213ed961d4a5e9fd7cb8e75b6b11045a67840ea2241e57321dd8711b")
add_versions("v1.8.1", "9665f001355cc72a5a9db941ae349cec50959d18bf44eb6c09311bf9c78336a4")
add_versions("v1.8.2", "1182cab00c33e400eac617c6dbf44fa2f358e1844990b6b8c5c87783024f9971")
add_patches("1.4.1", path.join(os.scriptdir(), "patches", "1.4.1", "trantor.patch"), "7f9034a27bb63de8dedb80dd9f246ea7aa7724c87f2c0d0054f4b6097ea2a862")
add_patches("1.4.1", path.join(os.scriptdir(), "patches", "1.4.1", "resolv.patch"), "a1054822bf91f5f06de8bca9b1bd8859233228159a8ff8014ce6329d6c000f26")
add_patches("1.4.1", path.join(os.scriptdir(), "patches", "1.4.1", "resolv.patch" ), "a1054822bf91f5f06de8bca9b1bd8859233228159a8ff8014ce6329d6c000f26")
add_patches("1.6.0", path.join(os.scriptdir(), "patches", "1.6.0", "trantor.patch"), "87e317bf5e45b3f3dfe781db8a0af9603ebdab057a6aedbc36d8aec9e0da58a7")
add_patches("1.6.0", path.join(os.scriptdir(), "patches", "1.6.0", "resolv.patch"), "dc144ff1cdcfee413efbcdc568fed587318289e8fa1bb0da9d2ea94a15588b25")
add_patches("1.6.0", path.join(os.scriptdir(), "patches", "1.6.0", "resolv.patch" ), "dc144ff1cdcfee413efbcdc568fed587318289e8fa1bb0da9d2ea94a15588b25")
add_patches("1.7.1", path.join(os.scriptdir(), "patches", "1.7.1", "trantor.patch"), "3f93a1e78ba45c8f1e85c28d4fdbbd3e7961078da8cf417a97d8797a91fa2167")
add_patches("1.7.1", path.join(os.scriptdir(), "patches", "1.7.1", "resolv.patch"), "75d3618374d15a5ec12681c8659e183f3e620acc43c77ae66e7bea21a25ca546")
add_patches(">=1.7.3", path.join(os.scriptdir(), "patches", "1.7.3", "trantor.patch"), "27e479dd0e3f8adc75c9c21fe895937f727c3102e5bfb21ac3289d6ad2795b7a")
add_patches(">=1.7.3", path.join(os.scriptdir(), "patches", "1.7.3", "resolv.patch"), "49694f090e169a5c0e524726e8b85ad0bac76c05ed633c60e986849c2e5adb85")
add_patches("1.7.1", path.join(os.scriptdir(), "patches", "1.7.1", "resolv.patch" ), "75d3618374d15a5ec12681c8659e183f3e620acc43c77ae66e7bea21a25ca546")
add_patches(">=1.7.3 <1.8.0", path.join(os.scriptdir(), "patches", "1.7.3", "trantor.patch"), "27e479dd0e3f8adc75c9c21fe895937f727c3102e5bfb21ac3289d6ad2795b7a")
add_patches(">=1.7.3 <1.8.0", path.join(os.scriptdir(), "patches", "1.7.3", "resolv.patch" ), "49694f090e169a5c0e524726e8b85ad0bac76c05ed633c60e986849c2e5adb85")
add_patches("1.8.0", path.join(os.scriptdir(), "patches", "1.8.0", "redis.patch" ), "cf09beb4f07fd970ef4ad8911eec71ce7c94609ad9fbf1626b5ca8fcd070e09e")
add_patches(">=1.8.0", path.join(os.scriptdir(), "patches", "1.8.0", "resolv.patch"), "e9b6b320c70d17024931be8481f7b6413681216113466b5d6699431bb98d50e2")
add_patches(">=1.8.0", path.join(os.scriptdir(), "patches", "1.8.0", "config.patch"), "67a921899a24c1646be6097943cc2ed8228c40f177493451f011539c6df0ed76")
add_configs("c_ares", {description = "Enable async DNS query support.", default = false, type = "boolean"})
add_configs("mysql", {description = "Enable mysql support.", default = false, type = "boolean"})

@ -0,0 +1,40 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -282,36 +282,3 @@ install(EXPORT TrantorTargets
DESTINATION "${INSTALL_TRANTOR_CMAKE_DIR}"
NAMESPACE Trantor::
COMPONENT dev)
-
-# Doxygen documentation
-find_package(Doxygen OPTIONAL_COMPONENTS dot dia)
-if(DOXYGEN_FOUND)
- set(DOXYGEN_PROJECT_BRIEF "Non-blocking I/O cross-platform TCP network library, using C++14")
- set(DOXYGEN_OUTPUT_DIRECTORY docs/${PROJECT_NAME})
- set(DOXYGEN_GENERATE_LATEX NO)
- set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
- set(DOXYGEN_USE_MDFILE_AS_MAINPAGE README.md)
- set(DOXYGEN_STRIP_FROM_INC_PATH ${PROJECT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/exports)
- if (WIN32)
- set(DOXYGEN_PREDEFINED _WIN32)
- endif(WIN32)
- doxygen_add_docs(doc_${PROJECT_NAME}
- README.md
- ChangeLog.md
- ${public_net_headers}
- ${public_utils_headers}
- COMMENT "Generate documentation")
- if(NOT TARGET doc)
- add_custom_target(doc)
- endif()
- add_dependencies(doc doc_${PROJECT_NAME})
- if (BUILD_DOC)
- add_dependencies(${PROJECT_NAME} doc_${PROJECT_NAME})
- # Don't install twice, so limit to Debug (assume developer)
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs/${PROJECT_NAME}
- TYPE DOC
- CONFIGURATIONS Debug)
- endif(BUILD_DOC)
-endif(DOXYGEN_FOUND)
-

@ -3,14 +3,19 @@ package("trantor")
set_homepage("https://github.com/an-tao/trantor/")
set_description("a non-blocking I/O tcp network lib based on c++14/17")
set_license("BSD-3-Clause")
add_urls("https://github.com/an-tao/trantor/archive/refs/tags/$(version).tar.gz",
"https://github.com/an-tao/trantor.git")
add_versions("v1.3.0", "524589dc9258e1ace3b2f887b835cfbeccab3c5efc4ba94963c59f3528248d9b")
add_versions("v1.4.1", "aa3f4dddfd3fd1a6e04f79744e69f23bb6472c314724eaa3051872a2a03bbda9")
add_versions("v1.5.0", "8704df75b783089d7e5361174054e0e46a09cc315b851dbc2ab6736e631b090b")
add_versions("v1.5.2", "6ccd781b3a2703b94689d7da579a38a78bc5c89616cce18ec27fcb6bc0b1620f")
add_versions("v1.5.5", "5a549c6efebe7ecba73a944cfba4a9713130704d4ccc82af534a2e108b9a0e71")
add_versions("v1.5.6", "827aca30e120244a8ede9d07446481328d9a3869228f01fc4978b19301d66e65")
add_versions("v1.5.7", "42576563afbf1e58c7d68f758cf3fca4d193496d4e3f82c80069d8389a7839d5")
add_versions("v1.5.8", "705ec0176681be5c99fcc7af37416ece9d65ff4d907bca764cb11471b104fbf8")
add_patches("v1.5.8", path.join(os.scriptdir(), "patches", "1.5.8", "skip_doc.patch" ),"4124f3cc1e486ad75bc5ec2fa454ea5319d68287d0b1d8cfa3b5ab865f8ca5fd")
add_deps("cmake")
add_deps("openssl", "c-ares", {optional = true})

Loading…
Cancel
Save