aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2021-04-30 06:54:14 +0800
committerGitHub <noreply@github.com>2021-04-29 15:54:14 -0700
commit4d57adb52eab756b08ab4c6cb622b0a764bcf64b (patch)
tree6216b4351eac370d1831e8d42343f3ccace9ad80
parent76a5e426abc84d65818f13b643562325a7a20ab2 (diff)
downloadvcpkg-4d57adb52eab756b08ab4c6cb622b0a764bcf64b.tar.gz
vcpkg-4d57adb52eab756b08ab4c6cb622b0a764bcf64b.zip
[libzip] fix dependency in libzip-config.cmake.in (#17282)
* [libzip] fix dependency in libzip-config.cmake.in * Update version files
-rw-r--r--ports/libzip/CONTROL33
-rw-r--r--ports/libzip/fix-dependency.patch24
-rw-r--r--ports/libzip/portfile.cmake6
-rw-r--r--ports/libzip/vcpkg.json75
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/l-/libzip.json5
6 files changed, 109 insertions, 36 deletions
diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL
deleted file mode 100644
index cb192aa10..000000000
--- a/ports/libzip/CONTROL
+++ /dev/null
@@ -1,33 +0,0 @@
-Source: libzip
-Version: 1.7.3
-Port-Version: 1
-Homepage: https://github.com/nih-at/libzip
-Build-Depends: zlib
-Default-Features: bzip2,default-aes
-Description: A library for reading, creating, and modifying zip archives
-
-Feature: bzip2
-Build-Depends: bzip2
-Description: Support bzip2-compressed zip archives
-
-Feature: liblzma
-Build-Depends: liblzma
-Description: Support XZ compressed zip archives using liblzma
-
-Feature: default-aes
-Build-Depends: libzip[core,openssl](!(windows|osx)),libzip[core,wincrypto](windows),libzip[core,commoncrypto](osx)
-Description: Use default AES
-
-Feature: openssl
-Build-Depends: openssl
-Description: AES (encryption) support using OpenSSL
-
-Feature: wincrypto
-Description: AES (encryption) support using Windows Crypto API
-
-Feature: commoncrypto
-Description: AES( encryption) support using Apple's Common Crypto API
-
-Feature: mbedtls
-Build-Depends: mbedtls
-Description: AES (encryption) support using mbedtls \ No newline at end of file
diff --git a/ports/libzip/fix-dependency.patch b/ports/libzip/fix-dependency.patch
new file mode 100644
index 000000000..e04d27138
--- /dev/null
+++ b/ports/libzip/fix-dependency.patch
@@ -0,0 +1,24 @@
+diff --git a/libzip-config.cmake.in b/libzip-config.cmake.in
+index 5b9aa55..0723f3c 100644
+--- a/libzip-config.cmake.in
++++ b/libzip-config.cmake.in
+@@ -1,8 +1,17 @@
+ @PACKAGE_INIT@
+
+ # only needed for static library, and doesn't work as-is
+-#include(CMakeFindDependencyMacro)
+-#find_dependency(ZLIB::ZLIB)
++include(CMakeFindDependencyMacro)
++if(@ENABLE_BZIP2@)
++ find_dependency(BZip2)
++endif()
++if(@ENABLE_LZMA@)
++ find_dependency(LibLZMA)
++endif()
++if(@ENABLE_OPENSSL@)
++ find_dependency(OpenSSL)
++endif()
++find_dependency(ZLIB)
+ # how to handle the optional dependencies?
+ # Provide all our library targets to users.
+ include("${CMAKE_CURRENT_LIST_DIR}/libzip-targets.cmake")
diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake
index 7432d4e17..23155a5e0 100644
--- a/ports/libzip/portfile.cmake
+++ b/ports/libzip/portfile.cmake
@@ -4,7 +4,9 @@ vcpkg_from_github(
REF 66e496489bdae81bfda8b0088172871d8fda0032 #v1.7.3
SHA512 ae0cda3e9decf5a71bf1e0907a2a21b2c0d83e6e576faf4d9401d6954707ae298c1c09febbc5339f457ace3577fdd405a790c819ef24778990ca6bf1e9516d54
HEAD_REF v1.7.3
- PATCHES fix-findpackage.patch
+ PATCHES
+ fix-findpackage.patch
+ fix-dependency.patch
)
vcpkg_check_features(
@@ -32,7 +34,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/libzip)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/ports/libzip/vcpkg.json b/ports/libzip/vcpkg.json
new file mode 100644
index 000000000..eb56141f8
--- /dev/null
+++ b/ports/libzip/vcpkg.json
@@ -0,0 +1,75 @@
+{
+ "name": "libzip",
+ "version-semver": "1.7.3",
+ "port-version": 2,
+ "description": "A library for reading, creating, and modifying zip archives.",
+ "homepage": "https://github.com/nih-at/libzip",
+ "dependencies": [
+ "zlib"
+ ],
+ "default-features": [
+ "bzip2",
+ "default-aes"
+ ],
+ "features": {
+ "bzip2": {
+ "description": "Support bzip2-compressed zip archives",
+ "dependencies": [
+ "bzip2"
+ ]
+ },
+ "commoncrypto": {
+ "description": "AES( encryption) support using Apple's Common Crypto API"
+ },
+ "default-aes": {
+ "description": "Use default AES",
+ "dependencies": [
+ {
+ "name": "libzip",
+ "default-features": false,
+ "features": [
+ "commoncrypto"
+ ],
+ "platform": "osx"
+ },
+ {
+ "name": "libzip",
+ "default-features": false,
+ "features": [
+ "wincrypto"
+ ],
+ "platform": "windows"
+ },
+ {
+ "name": "libzip",
+ "default-features": false,
+ "features": [
+ "openssl"
+ ],
+ "platform": "!(windows | osx)"
+ }
+ ]
+ },
+ "liblzma": {
+ "description": "Support XZ compressed zip archives using liblzma",
+ "dependencies": [
+ "liblzma"
+ ]
+ },
+ "mbedtls": {
+ "description": "AES (encryption) support using mbedtls",
+ "dependencies": [
+ "mbedtls"
+ ]
+ },
+ "openssl": {
+ "description": "AES (encryption) support using OpenSSL",
+ "dependencies": [
+ "openssl"
+ ]
+ },
+ "wincrypto": {
+ "description": "AES (encryption) support using Windows Crypto API"
+ }
+ }
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index ee4259ce1..d17d0629b 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3674,7 +3674,7 @@
},
"libzip": {
"baseline": "1.7.3",
- "port-version": 1
+ "port-version": 2
},
"libzippp": {
"baseline": "4.0-1.7.3",
diff --git a/versions/l-/libzip.json b/versions/l-/libzip.json
index 8d957e4f4..1d40ee093 100644
--- a/versions/l-/libzip.json
+++ b/versions/l-/libzip.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "519b00c1db73782b3527816055dffbcbdde805a0",
+ "version-semver": "1.7.3",
+ "port-version": 2
+ },
+ {
"git-tree": "03badcbd43bb29fa3475d0aa990fc999dab91460",
"version-string": "1.7.3",
"port-version": 1