[libzip] Update to 1.10.1 (#35167)

* [libzip] Update to 1.10.1

* update version

* update patch

* update version
This commit is contained in:
Lily Wang 2023-11-29 01:19:13 -08:00 committed by GitHub
parent f5531da251
commit 4fd5934584
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 83 deletions

View File

@ -1,62 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d00a4f9f..cf85fc4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -197,7 +197,7 @@ if(ENABLE_LZMA)
endif(ENABLE_LZMA)
if(ENABLE_ZSTD)
- find_package(Zstd 1.3.6)
+ find_package(Zstd NAMES zstd 1.3.6)
if(Zstd_FOUND)
set(HAVE_LIBZSTD 1)
else()
@@ -301,7 +301,7 @@ foreach(LIB ${LIBS_PRIVATE})
endforeach()
string(REGEX REPLACE "-lBZip2::BZip2" "-lbz2" LIBS ${LIBS})
string(REGEX REPLACE "-lLibLZMA::LibLZMA" "-llzma" LIBS ${LIBS})
-string(REGEX REPLACE "-lZstd::Zstd" "-lzstd" LIBS ${LIBS})
+string(REGEX REPLACE "-l$<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>" "-lzstd" LIBS ${LIBS})
string(REGEX REPLACE "-lOpenSSL::Crypto" "-lssl -lcrypto" LIBS ${LIBS})
string(REGEX REPLACE "-lZLIB::ZLIB" "-lz" LIBS ${LIBS})
string(REGEX REPLACE "-lGnuTLS::GnuTLS" "-lgnutls" LIBS ${LIBS})
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 1213fa0a..b6446cbd 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -147,7 +147,7 @@ endif()
if(HAVE_LIBZSTD)
target_sources(zip PRIVATE zip_algorithm_zstd.c)
- target_link_libraries(zip PRIVATE Zstd::Zstd)
+ target_link_libraries(zip PRIVATE $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
endif()
if(HAVE_COMMONCRYPTO)
diff --git a/libzip-config.cmake.in b/libzip-config.cmake.in
index 5b9aa558..f9adc538 100644
index 8061530..81a38bb 100644
--- a/libzip-config.cmake.in
+++ b/libzip-config.cmake.in
@@ -1,8 +1,20 @@
@PACKAGE_INIT@
@@ -2,7 +2,7 @@
# 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_ZSTD@)
+ find_dependency(zstd)
+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")
# We need to supply transitive dependencies if this config is for a static library
set(IS_SHARED @BUILD_SHARED_LIBS@)
-if (NOT IS_SHARED)
+if (1)
include(CMakeFindDependencyMacro)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/modules")

View File

@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nih-at/libzip
REF 5532f9baa0c44cc5435ad135686a4ea009075b9a #v1.9.2
SHA512 1105bc48c8a554a7fce84028197427b02ff53508592889b37e81cc419eb208d91112b98df2bf2d6f5629887e4418230ee36e3bf03c9ae39cdc39cfa90e7e3e7f
REF "v${VERSION}"
SHA512 1b0bffe579de5d2c52b23075f5351a5670e9f7a364c14a876ca3c490a85c0c9b1ebd9a97e729c5c7e71d496a3a0a8f28505bfadd7d8423954d3547a9a8f63841
HEAD_REF master
PATCHES
fix-dependency.patch
@ -46,4 +46,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/libzip" "${CURRENT_PACKAGES_DIR
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Copy copright information
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf85fc4b7..90615fec9 100644
index b2e7724..0af7929 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,12 +41,14 @@ endif()
@@ -43,12 +43,14 @@ endif()
if(ENABLE_GNUTLS)
find_package(Nettle 3.0)
find_package(GnuTLS)
@ -17,16 +17,15 @@ index cf85fc4b7..90615fec9 100644
endif()
if(WIN32)
if(ENABLE_WINDOWS_CRYPTO)
@@ -177,7 +179,7 @@ int main(int argc, char *argv[]) { }" HAVE_NULLABLE)
@@ -191,6 +193,7 @@ int main(int argc, char *argv[]) { }" HAVE_NULLABLE)
test_big_endian(WORDS_BIGENDIAN)
find_package(ZLIB 1.1.2 REQUIRED)
-
+list(APPEND REQUIRES zlib)
if(ENABLE_BZIP2)
find_package(BZip2)
if(BZIP2_FOUND)
@@ -185,6 +187,7 @@ if(ENABLE_BZIP2)
# so developers on systems where zlib is named differently (Windows, sometimes)
# can override the name used in the pkg-config file
if (NOT ZLIB_LINK_LIBRARY_NAME)
@@ -227,6 +230,7 @@ if(ENABLE_BZIP2)
else()
message(WARNING "-- bzip2 library not found; bzip2 support disabled")
endif(BZIP2_FOUND)
@ -34,7 +33,7 @@ index cf85fc4b7..90615fec9 100644
endif(ENABLE_BZIP2)
if(ENABLE_LZMA)
@@ -194,6 +197,7 @@ if(ENABLE_LZMA)
@@ -236,6 +240,7 @@ if(ENABLE_LZMA)
else()
message(WARNING "-- lzma library not found; lzma/xz support disabled")
endif(LIBLZMA_FOUND)
@ -42,26 +41,28 @@ index cf85fc4b7..90615fec9 100644
endif(ENABLE_LZMA)
if(ENABLE_ZSTD)
@@ -203,6 +207,7 @@ if(ENABLE_ZSTD)
@@ -250,6 +255,7 @@ if(ENABLE_ZSTD)
else()
message(WARNING "-- zstd library not found; zstandard support disabled")
endif(Zstd_FOUND)
endif(zstd_FOUND)
+ list(APPEND REQUIRES libzstd)
endif(ENABLE_ZSTD)
if (COMMONCRYPTO_FOUND)
@@ -299,13 +304,14 @@ foreach(LIB ${LIBS_PRIVATE})
endif()
@@ -347,15 +353,16 @@ foreach(LIB ${LIBS_PRIVATE})
set(LIBS "${LIBS} -l${LIB}")
endforeach()
STRING(CONCAT zlib_link_name "-l" ${ZLIB_LINK_LIBRARY_NAME})
-string(REGEX REPLACE "-lBZip2::BZip2" "-lbz2" LIBS ${LIBS})
-string(REGEX REPLACE "-lLibLZMA::LibLZMA" "-llzma" LIBS ${LIBS})
-string(REGEX REPLACE "-l$<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>" "-lzstd" LIBS ${LIBS})
-string(REGEX REPLACE "-lOpenSSL::Crypto" "-lssl -lcrypto" LIBS ${LIBS})
-string(REGEX REPLACE "-lZLIB::ZLIB" "-lz" LIBS ${LIBS})
+string(REGEX REPLACE "-lBZip2::BZip2" "" LIBS ${LIBS})
+string(REGEX REPLACE "-lLibLZMA::LibLZMA" "" LIBS ${LIBS})
+string(REGEX REPLACE "-l$<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>" "" LIBS ${LIBS})
if(ENABLE_ZSTD)
- string(REGEX REPLACE "-l${zstd_TARGET}" "-lzstd" LIBS ${LIBS})
+ string(REGEX REPLACE "-l${zstd_TARGET}" "" LIBS ${LIBS})
endif()
-string(REGEX REPLACE "-lOpenSSL::Crypto" "-lssl -lcrypto" LIBS ${LIBS})
-string(REGEX REPLACE "-lZLIB::ZLIB" ${zlib_link_name} LIBS ${LIBS})
+string(REGEX REPLACE "-lOpenSSL::Crypto" "" LIBS ${LIBS})
+string(REGEX REPLACE "-lZLIB::ZLIB" "" LIBS ${LIBS})
string(REGEX REPLACE "-lGnuTLS::GnuTLS" "-lgnutls" LIBS ${LIBS})
@ -71,7 +72,7 @@ index cf85fc4b7..90615fec9 100644
if(LIBZIP_DO_INSTALL)
install(FILES ${PROJECT_BINARY_DIR}/libzip.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/libzip.pc.in b/libzip.pc.in
index d51b0ab63..755685c03 100644
index d51b0ab..07b3b50 100644
--- a/libzip.pc.in
+++ b/libzip.pc.in
@@ -9,6 +9,7 @@ zipcmp=${bindir}/zipcmp

View File

@ -1,7 +1,6 @@
{
"name": "libzip",
"version": "1.9.2",
"port-version": 2,
"version": "1.10.1",
"description": "A library for reading, creating, and modifying zip archives.",
"homepage": "https://github.com/nih-at/libzip",
"license": "BSD-3-Clause",

View File

@ -5169,8 +5169,8 @@
"port-version": 2
},
"libzip": {
"baseline": "1.9.2",
"port-version": 2
"baseline": "1.10.1",
"port-version": 0
},
"libzippp": {
"baseline": "7.0-1.10.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7f4b7231355f6774a5b6915dace3826173b76cee",
"version": "1.10.1",
"port-version": 0
},
{
"git-tree": "59242c6974f6245813fa69d09f9c6df6c501b895",
"version": "1.9.2",