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

[libmariadb] add zstd to option list #26931

Merged
merged 6 commits into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 4 additions & 1 deletion ports/libmariadb/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ vcpkg_from_github(
pkgconfig.patch
fix-openssl.patch
fix-CMakeLists.patch
zstd.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
iconv WITH_ICONV
mariadbclient VCPKG_MARIADBCLIENT
zstd WITH_ZSTD
)

if("openssl" IN_LIST FEATURES)
Expand All @@ -49,7 +51,8 @@ vcpkg_cmake_configure(
-DWITH_SSL=${WITH_SSL}
-DREMOTEIO_PLUGIN_TYPE=OFF
-DAUTH_GSSAPI_PLUGIN_TYPE=OFF
MAYBE_UNUSED_VARIABLES
-DWITH_ZSTD=${WITH_ZSTD}
MAYBE_UNUSED_VARIABLES
Copy link
Contributor

Choose a reason for hiding this comment

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

Please restore the indentation of the MAYBE_UNUSED_VARIABLES keyword.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I didn't noticed that it was a keyword.

AUTH_GSSAPI_PLUGIN_TYPE
)

Expand Down
8 changes: 7 additions & 1 deletion ports/libmariadb/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libmariadb",
"version-semver": "3.3.1",
"port-version": 1,
"port-version": 2,
"description": "MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases",
"homepage": "https://github.com/MariaDB/mariadb-connector-c",
"license": "LGPL-2.1-or-later",
Expand Down Expand Up @@ -63,6 +63,12 @@
},
"zlib": {
"description": "Obsolete. zlib is always used. This feature is left for compatibility."
},
"zstd": {
"description": "Build zstd compression plugin.",
"dependencies": [
"zstd"
]
}
}
}
13 changes: 13 additions & 0 deletions ports/libmariadb/zstd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/plugins/compress/CMakeLists.txt b/plugins/compress/CMakeLists.txt
index f6dab85..0bbdf47 100644
--- a/plugins/compress/CMakeLists.txt
+++ b/plugins/compress/CMakeLists.txt
@@ -12,7 +12,7 @@ REGISTER_PLUGIN(TARGET zlib
SOURCES ${COMPRESS_PLUGIN_DIR}/c_zlib.c)

#zstd compression
-IF(${ZSTD_FOUND})
+IF(${WITH_ZSTD})
INCLUDE_DIRECTORIES(${ZSTD_INCLUDE_DIRS})
REGISTER_PLUGIN(TARGET zstd
TYPE MARIADB_CLIENT_COMPRESSION_PLUGIN
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3878,7 +3878,7 @@
},
"libmariadb": {
"baseline": "3.3.1",
"port-version": 1
"port-version": 2
},
"libmaxminddb": {
"baseline": "1.4.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libmariadb.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cad5111b4d89bc651d523a21d5a4607ff3665dc4",
"version-semver": "3.3.1",
"port-version": 2
},
{
"git-tree": "34106302d34bd62e9298357aa8b47b2c3aabf204",
"version-semver": "3.3.1",
Expand Down