[drogon] Added database support features (#18711)

* [drogon] Added database access features

* Replaced CONTROL with vcpkg.json manifest file

* Patched finding brotli libraries for static triplets (brotlicommon-static.lib and co.)

* Added features for database access, disabled by default.

* [drogon] Fixed vcpkg.json version

* update vcpkg.json format

* update version

* Added new feature redis

* update vcpkg.json format

* update version

* delete redis dependence

* update version

* fix request feature

* update version

Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
Greisberger Christophe 2021-07-26 19:54:38 +02:00 committed by GitHub
parent 56a33d86b3
commit 8af28e0dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 115 additions and 11 deletions

View File

@ -1,9 +0,0 @@
Source: drogon
Version: 1.7.1
Homepage: https://github.com/an-tao/drogon
Description:Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows
Build-Depends: trantor, zlib, jsoncpp, libmariadb (!osx), libmariadb[iconv] (osx), libpq, sqlite3, brotli, libuuid (!windows)
Default-Features: ctl
Feature: ctl
Description: Build drogon_ctl tool.

View File

@ -8,12 +8,19 @@ vcpkg_from_github(
vcpkg.patch
resolv.patch
drogon_config.patch
static-brotli.patch
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
ctl BUILD_CTL
mysql BUILD_MYSQL
orm BUILD_ORM
postgres BUILD_POSTGRESQL
postgres LIBPQ_BATCH_MODE
redis BUILD_REDIS
sqlite3 BUILD_SQLITE
)
vcpkg_configure_cmake(

View File

@ -0,0 +1,17 @@
diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake
index da5b6d2..6b631ab 100755
--- a/cmake_modules/FindBrotli.cmake
+++ b/cmake_modules/FindBrotli.cmake
@@ -23,9 +23,9 @@ include(FindPackageHandleStandardArgs)
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
-find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
-find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
-find_library(BROTLIENC_LIBRARY NAMES brotlienc)
+find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon brotlicommon-static)
+find_library(BROTLIDEC_LIBRARY NAMES brotlidec brotlidec-static)
+find_library(BROTLIENC_LIBRARY NAMES brotlienc brotlienc-static)
find_package_handle_standard_args(Brotli
REQUIRED_VARS

84
ports/drogon/vcpkg.json Normal file
View File

@ -0,0 +1,84 @@
{
"name": "drogon",
"version-semver": "1.7.1",
"port-version": 1,
"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/",
"license": "MIT",
"dependencies": [
"brotli",
"jsoncpp",
{
"name": "libuuid",
"platform": "!windows"
},
"trantor",
"zlib"
],
"features": {
"ctl": {
"description": "Build drogon_ctl tool."
},
"mysql": {
"description": "Support reading and writing from/to MySQL databases.",
"dependencies": [
{
"name": "drogon",
"features": [
"orm"
]
},
{
"name": "libmariadb",
"features": [
"iconv"
],
"platform": "osx"
},
{
"name": "libmariadb",
"platform": "!osx"
}
]
},
"orm": {
"description": "Build with Object-relational mapping support."
},
"postgres": {
"description": "Support reading and writing from/to Postgres databases.",
"dependencies": [
{
"name": "drogon",
"features": [
"orm"
]
},
"libpq"
]
},
"redis": {
"description": "Support reading and writing from/to Redis databases.",
"dependencies": [
{
"name": "drogon",
"features": [
"orm"
]
}
]
},
"sqlite3": {
"description": "Support reading and writing from/to Sqlite databases.",
"dependencies": [
{
"name": "drogon",
"features": [
"orm"
]
},
"sqlite3"
]
}
}
}

View File

@ -1766,7 +1766,7 @@
},
"drogon": {
"baseline": "1.7.1",
"port-version": 0
"port-version": 1
},
"dtl": {
"baseline": "1.19",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6293f8fcc884c9ed56a4a3138722401451ff445d",
"version-semver": "1.7.1",
"port-version": 1
},
{
"git-tree": "a325c34025250341e3f721353d5d3dfa66017e2b",
"version-string": "1.7.1",