aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fersch <christian.fersch@ptvgroup.com>2021-09-29 18:04:29 +0200
committerGitHub <noreply@github.com>2021-09-29 09:04:29 -0700
commit9b6135efafdc26c77f35a8dc4e6db18a8174e662 (patch)
tree2fa07bc5351cbce359a9c81a42eda806a30ac49a
parentf819f66b4c2a639e18233bc30deb98531a386f78 (diff)
downloadvcpkg-9b6135efafdc26c77f35a8dc4e6db18a8174e662.tar.gz
vcpkg-9b6135efafdc26c77f35a8dc4e6db18a8174e662.zip
[minizip-ng] Make dependencies optional (#20324)
* [minizip-ng] Make dependencies optional * minor changes from review * improve implementation of crypto feature * x-add-version * split crypto into 3 features * properly forward features
-rw-r--r--ports/minizip-ng/portfile.cmake20
-rw-r--r--ports/minizip-ng/vcpkg.json79
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/m-/minizip-ng.json5
4 files changed, 94 insertions, 12 deletions
diff --git a/ports/minizip-ng/portfile.cmake b/ports/minizip-ng/portfile.cmake
index 69ccb97af..9faecfc48 100644
--- a/ports/minizip-ng/portfile.cmake
+++ b/ports/minizip-ng/portfile.cmake
@@ -8,11 +8,25 @@ vcpkg_from_github(
Modify-header-file-path.patch
)
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ pkcrypt MZ_PKCRYPT
+ signing MZ_SIGNING
+ wzaes MZ_WZAES
+ openssl MZ_OPENSSL
+ bzip2 MZ_BZIP2
+ lzma MZ_LZMA
+ zlib MZ_ZLIB
+ zstd MZ_ZSTD
+)
+
vcpkg_cmake_configure(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
+ SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
+ ${FEATURE_OPTIONS}
+ -DMZ_FETCH_LIBS=OFF
-DMZ_PROJECT_SUFFIX:STRING=-ng
)
@@ -25,4 +39,4 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
-configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/minizip-ng/copyright" COPYONLY)
+configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
diff --git a/ports/minizip-ng/vcpkg.json b/ports/minizip-ng/vcpkg.json
index 33f77dd29..eeab4ef8e 100644
--- a/ports/minizip-ng/vcpkg.json
+++ b/ports/minizip-ng/vcpkg.json
@@ -1,16 +1,11 @@
{
"name": "minizip-ng",
"version": "3.0.2",
+ "port-version": 1,
"description": "minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.",
"homepage": "https://github.com/zlib-ng/minizip-ng",
"supports": "!uwp",
"dependencies": [
- "bzip2",
- "liblzma",
- {
- "name": "openssl",
- "platform": "linux"
- },
{
"name": "vcpkg-cmake",
"host": true
@@ -18,8 +13,76 @@
{
"name": "vcpkg-cmake-config",
"host": true
- },
+ }
+ ],
+ "default-features": [
+ "bzip2",
+ "lzma",
+ "pkcrypt",
+ "signing",
+ "wzaes",
"zlib",
"zstd"
- ]
+ ],
+ "features": {
+ "bzip2": {
+ "description": "Enables BZIP2 compression",
+ "dependencies": [
+ "bzip2"
+ ]
+ },
+ "lzma": {
+ "description": "Enables LZMA compression",
+ "dependencies": [
+ "liblzma"
+ ]
+ },
+ "openssl": {
+ "description": "Enables OpenSSL for encryption",
+ "dependencies": [
+ "openssl"
+ ]
+ },
+ "pkcrypt": {
+ "description": "Enables PKWARE traditional encryption"
+ },
+ "signing": {
+ "description": "Enables zip signing support",
+ "dependencies": [
+ {
+ "name": "minizip-ng",
+ "default-features": false,
+ "features": [
+ "openssl"
+ ],
+ "platform": "!windows & !osx"
+ }
+ ]
+ },
+ "wzaes": {
+ "description": "Enables WinZIP AES encryption",
+ "dependencies": [
+ {
+ "name": "minizip-ng",
+ "default-features": false,
+ "features": [
+ "openssl"
+ ],
+ "platform": "!windows & !osx"
+ }
+ ]
+ },
+ "zlib": {
+ "description": "Enables ZLIB compression",
+ "dependencies": [
+ "zlib"
+ ]
+ },
+ "zstd": {
+ "description": "Enables ZSTD compression",
+ "dependencies": [
+ "zstd"
+ ]
+ }
+ }
}
diff --git a/versions/baseline.json b/versions/baseline.json
index 5bc10b05b..854de77eb 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4298,7 +4298,7 @@
},
"minizip-ng": {
"baseline": "3.0.2",
- "port-version": 0
+ "port-version": 1
},
"mio": {
"baseline": "2019-02-10",
diff --git a/versions/m-/minizip-ng.json b/versions/m-/minizip-ng.json
index 7230ce31c..e71ee7e33 100644
--- a/versions/m-/minizip-ng.json
+++ b/versions/m-/minizip-ng.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "4a8de7f8609b758c48eea13b67d47c22efc832a3",
+ "version": "3.0.2",
+ "port-version": 1
+ },
+ {
"git-tree": "9c49a3f4d6bb3e5173cf17e1539b439dcf4bf6ea",
"version": "3.0.2",
"port-version": 0