[drogon, trantor] Bump drogon to 1.9.2 and trantor to 1.5.16 (#36249)

* Bump drogon to 1.9.2 and trantor to 1.5.16

* Fix uwp compilation
This commit is contained in:
An Tao 2024-01-23 03:01:15 +08:00 committed by GitHub
parent 803802bb28
commit 9f803fd068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 60 additions and 14 deletions

View File

@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO an-tao/drogon
REF "v${VERSION}"
SHA512 05666166e0b03a6f349a3811ea1014f6e7d8a42a5e749e478502461722a647c6170f5538a4cba9820c3135551d577276094cd96eb0997946c3a37787b531ac49
SHA512 54565dac787795cd297206f6222e260abc012790c4b662834864ec31f5b00735b89b7134f317f2b01f0377abd4222ee445631ee1f3cd1f50c918e6d3645582df
HEAD_REF master
PATCHES
0001-vcpkg.patch

View File

@ -1,7 +1,6 @@
{
"name": "drogon",
"version-semver": "1.9.1",
"port-version": 1,
"version-semver": "1.9.2",
"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/",

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ec5461..eca26c6 100755
index 22d9115..da6edaf 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -212,7 +212,7 @@ endif(HAVE_SPDLOG)
@@ -220,7 +220,7 @@ endif(HAVE_SPDLOG)
set(HAVE_C-ARES NO)
if (BUILD_C-ARES)
@ -11,10 +11,10 @@ index 4ec5461..eca26c6 100755
if(c-ares_FOUND)
message(STATUS "c-ares found!")
set(HAVE_C-ARES TRUE)
@@ -220,7 +220,7 @@ if (BUILD_C-ARES)
endif ()
if(HAVE_C-ARES)
@@ -231,7 +231,7 @@ if(HAVE_C-ARES)
if (NOT BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE CARES_STATICLIB)
endif ()
- target_link_libraries(${PROJECT_NAME} PRIVATE c-ares_lib)
+ target_link_libraries(${PROJECT_NAME} PRIVATE c-ares::cares)
set(TRANTOR_SOURCES

View File

@ -0,0 +1,36 @@
diff --git a/trantor/net/inner/FileBufferNodeWin.cc b/trantor/net/inner/FileBufferNodeWin.cc
index eb9fcbd..a0b9791 100644
--- a/trantor/net/inner/FileBufferNodeWin.cc
+++ b/trantor/net/inner/FileBufferNodeWin.cc
@@ -1,5 +1,11 @@
#include <trantor/net/inner/BufferNode.h>
#include <windows.h>
+#include <fileapi.h>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+#define UWP 1
+#else
+#define UWP 0
+#endif
namespace trantor
{
@@ -9,6 +15,11 @@ class FileBufferNode : public BufferNode
public:
FileBufferNode(const wchar_t *fileName, long long offset, long long length)
{
+#if UWP
+ sendHandle_ = CreateFile2(
+ fileName, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, nullptr);
+
+#else
sendHandle_ = CreateFileW(fileName,
GENERIC_READ,
FILE_SHARE_READ,
@@ -16,6 +27,7 @@ class FileBufferNode : public BufferNode
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
nullptr);
+#endif
if (sendHandle_ == INVALID_HANDLE_VALUE)
{
LOG_SYSERR << fileName << " open error";

View File

@ -2,10 +2,11 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO an-tao/trantor
REF "v${VERSION}"
SHA512 f08bba448229d8121534cade55b74ac0d9cf5deb1c1116794c21fee37f8f8c3b3d5e6618d0806942a9bcf5eb30c87879ddaf1104417fb3fe14de0827670e03e8
SHA512 14380d3781dabaff22041c4b9abcbfc591640bbb30a08badc9724ccc6ba817ab895774e37f24311f83b1bd139ad50d232d9eab510a4ede20bf2dff89cd308728
HEAD_REF master
PATCHES
000-fix-deps.patch
001-uwp.patch
)
vcpkg_cmake_configure(

View File

@ -1,6 +1,6 @@
{
"name": "trantor",
"version-semver": "1.5.15",
"version-semver": "1.5.16",
"description": "A non-blocking I/O cross-platform TCP network library, using C++14",
"homepage": "https://github.com/an-tao/trantor",
"license": "BSD-2-Clause",

View File

@ -2293,8 +2293,8 @@
"port-version": 0
},
"drogon": {
"baseline": "1.9.1",
"port-version": 1
"baseline": "1.9.2",
"port-version": 0
},
"dstorage": {
"baseline": "1.2.2",
@ -8641,7 +8641,7 @@
"port-version": 0
},
"trantor": {
"baseline": "1.5.15",
"baseline": "1.5.16",
"port-version": 0
},
"tre": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "881a2d3fe8ed95836190c20c36471e47168954c5",
"version-semver": "1.9.2",
"port-version": 0
},
{
"git-tree": "2258c21d158a9c39a058f30d88d6a8a9e8172e5b",
"version-semver": "1.9.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "87607f8f4115c05d79fdcb63b060c0cf4cba7ece",
"version-semver": "1.5.16",
"port-version": 0
},
{
"git-tree": "47ee2615e8883f1daf13ffd3a32964782cf9b1c0",
"version-semver": "1.5.15",