Skip to content

Commit

Permalink
[drogon] Update to 1.8.0 (microsoft#26639)
Browse files Browse the repository at this point in the history
* [drogon] Update to 1.8.0

* fix a confilict with hiredis
  • Loading branch information
an-tao authored Sep 6, 2022
1 parent 6de11d5 commit 33cd8da
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 56 deletions.
9 changes: 4 additions & 5 deletions ports/drogon/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO an-tao/drogon
REF v1.7.5
SHA512 8be77961026d13b55dbfcc2e43972b4fb8f1cd9a6bfb8098d5bdfc8b60ff67c2d3ede4bdb5815614a8233dc184cbf3aa363a9d33eed96b9f748544e20b15f2c7
REF v1.8.0
SHA512 a834d937e3719059223d9bf19d777dbc92eaf09c5c9c44b5a742bfefcbcd95a146a6568cef8c058050fb87e330f221434ffe784dfa29a49de12b031f86ab1a33
HEAD_REF master
PATCHES
vcpkg.patch
drogon_config.patch
static-brotli.patch
use-libmariadb.patch
redis.patch
)

vcpkg_check_features(
Expand All @@ -29,7 +28,7 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_DROGON_SHARED=${BUILD_DROGON_SHARED}
-DBUILD_SHARED_LIBS=${BUILD_DROGON_SHARED}
-DBUILD_EXAMPLES=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
${FEATURE_OPTIONS}
Expand Down
66 changes: 66 additions & 0 deletions ports/drogon/redis.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/nosql_lib/redis/src/RedisClientImpl.cc b/nosql_lib/redis/src/RedisClientImpl.cc
index 15fa74b..b2f9ac1 100644
--- 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
index d84cfab..e7c8fab 100644
--- 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
index 2f27b64..fe225b2 100644
--- 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
index 00bc6c1..136f315 100644
--- 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,
17 changes: 0 additions & 17 deletions ports/drogon/static-brotli.patch

This file was deleted.

31 changes: 0 additions & 31 deletions ports/drogon/use-libmariadb.patch

This file was deleted.

2 changes: 1 addition & 1 deletion ports/drogon/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drogon",
"version-semver": "1.7.5",
"version-semver": "1.8.0",
"description": "A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows",
"homepage": "https://github.com/an-tao/drogon",
"documentation": "https://drogon.docsforge.com/master/overview/",
Expand Down
3 changes: 2 additions & 1 deletion ports/drogon/vcpkg.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt

if (BUILD_MYSQL)
diff --git a/drogon_ctl/CMakeLists.txt b/drogon_ctl/CMakeLists.txt
index 9f2f1e7..09871f8 100755
--- 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_DROGON_SHARED)
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>)
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@
"port-version": 0
},
"drogon": {
"baseline": "1.7.5",
"baseline": "1.8.0",
"port-version": 0
},
"dstorage": {
Expand Down
5 changes: 5 additions & 0 deletions versions/d-/drogon.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "27ee8227ae9871ffc307380b209f9dbe04de8801",
"version-semver": "1.8.0",
"port-version": 0
},
{
"git-tree": "a66c2bb4632ab86589f1cabed26607d510ae2eba",
"version-semver": "1.7.5",
Expand Down

0 comments on commit 33cd8da

Please sign in to comment.