Update libzip to 1.5.2 (#5656)

* Update libzip to 1.5.2

* Remove reference to patch in portfile

* Add patch to fix compilation on windows

* Prefer ninja and fix indentation
This commit is contained in:
Lars Ivar Hatledal 2019-03-13 18:06:49 +01:00 committed by Phil Christensen
parent 94218ff782
commit 7609de8497
4 changed files with 35 additions and 27 deletions

View File

@ -1,9 +1,13 @@
Source: libzip
Version: rel-1-5-1-vcpkg2
Version: rel-1-5-2
Build-Depends: zlib
Default-Features: openssl
Default-Features: openssl, bzip2
Description: A library for reading, creating, and modifying zip archives.
Feature: bzip2
Build-Depends: bzip2
Description: Support bzip2-compressed zip archives
Feature: openssl
Build-Depends: openssl
Description: AES (encryption) support using OpenSSL

View File

@ -0,0 +1,13 @@
diff --git a/lib/zip_source_winzip_aes_encode.c b/lib/zip_source_winzip_aes_encode.c
--- a/lib/zip_source_winzip_aes_encode.c
+++ b/lib/zip_source_winzip_aes_encode.c
@@ -163,7 +163,7 @@ winzip_aes_encrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t length,
/* TODO: return partial read? */
return -1;
}
- buffer_n += _zip_buffer_read(ctx->buffer, data + ret, length - (zip_uint64_t)ret);
+ buffer_n += _zip_buffer_read(ctx->buffer, (zip_uint8_t *)data + ret, length - (zip_uint64_t)ret);
}
return (zip_int64_t)(buffer_n + (zip_uint64_t)ret);

View File

@ -1,19 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69cdb8b..4c985fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,10 +149,10 @@ ENABLE_TESTING()
# Targets
ADD_SUBDIRECTORY(lib)
-ADD_SUBDIRECTORY(man)
-ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(regress)
-ADD_SUBDIRECTORY(examples)
+#ADD_SUBDIRECTORY(man)
+#ADD_SUBDIRECTORY(src)
+#ADD_SUBDIRECTORY(regress)
+#ADD_SUBDIRECTORY(examples)
# pkgconfig file
SET(prefix ${CMAKE_INSTALL_PREFIX})

View File

@ -2,10 +2,10 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nih-at/libzip
REF rel-1-5-1
SHA512 778f438f6354f030656baa5497b3154ad8fb764011d2a6925136f32e06dc0dcd1ed93fe05dbf7be619004a68cdabe5e34a83b988c1501ed67e9cfa4fa540350f
REF rel-1-5-2
SHA512 5ba765c5d4ab47dff24bfa5e73b798046126fcc88b29d5d9ce9d77d035499ae91d90cc526f1f73bbefa07b7b68ff6cf77e912e5793859f801caaf2061cb20aee
HEAD_REF master
PATCHES cmake_dont_build_more_than_needed.patch
PATCHES avoid_computation_on_void_pointer.patch
)
# AES encryption
@ -14,12 +14,22 @@ if("openssl" IN_LIST FEATURES)
set(USE_OPENSSL ON)
endif()
set(USE_BZIP2 OFF)
if("bzip2" IN_LIST FEATURES)
set(USE_BZIP2 ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
# see https://github.com/nih-at/libzip/blob/rel-1-5-1/INSTALL.md
-DENABLE_OPENSSL=${USE_OPENSSL}
OPTIONS
-DBUILD_DOC=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_REGRESS=OFF
-DBUILD_TOOLS=OFF
# see https://github.com/nih-at/libzip/blob/rel-1-5-2/INSTALL.md
-DENABLE_OPENSSL=${USE_OPENSSL}
-DENABLE_BZIP2=${USE_BZIP2}
)
vcpkg_install_cmake()