mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[libzip] update to rel-1-6-1 (#10784)
* Libzip updated to rel-1-6-1 * [libzip] Add windows_crypto feature The new BCrypt/CNG-based crypto uses BCryptDeriveKeyPBKDF2 which is only available since WinNT 6.1. It is important to me as a consumer of libzip through vcpkg to be able to turn this off. * Additional options added. * Common Crypto supported as an option for encryption backend. Co-authored-by: Michał Janiszewski <janisozaur+signed@gmail.com>
This commit is contained in:
parent
6717e1b9d0
commit
242897b046
@ -1,14 +1,32 @@
|
|||||||
Source: libzip
|
Source: libzip
|
||||||
Version: rel-1-5-2--1
|
Version: rel-1-6-1
|
||||||
Homepage: https://github.com/nih-at/libzip
|
Homepage: https://github.com/nih-at/libzip
|
||||||
Build-Depends: zlib
|
Build-Depends: zlib
|
||||||
Default-Features: openssl, bzip2
|
Default-Features: bzip2,default-aes
|
||||||
Description: A library for reading, creating, and modifying zip archives.
|
Description: A library for reading, creating, and modifying zip archives
|
||||||
|
|
||||||
Feature: bzip2
|
Feature: bzip2
|
||||||
Build-Depends: bzip2
|
Build-Depends: bzip2
|
||||||
Description: Support bzip2-compressed zip archives
|
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
|
Feature: openssl
|
||||||
Build-Depends: openssl
|
Build-Depends: openssl
|
||||||
Description: AES (encryption) support using 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
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/lib/zip_source_winzip_aes_encode.c b/lib/zip_source_winzip_aes_encode.c
|
|
||||||
index c428c9a..4e5f753 100644
|
|
||||||
--- 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);
|
|
@ -1,34 +1,31 @@
|
|||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO nih-at/libzip
|
REPO nih-at/libzip
|
||||||
REF rel-1-5-2
|
REF rel-1-6-1
|
||||||
SHA512 5ba765c5d4ab47dff24bfa5e73b798046126fcc88b29d5d9ce9d77d035499ae91d90cc526f1f73bbefa07b7b68ff6cf77e912e5793859f801caaf2061cb20aee
|
SHA512 7ee414c063f9f76bec7d96ff9dadbc4be8d37a7b907b977882bf40f8ab66f0e46d3b8f70083c7bd272cc298d855d0d72b494b5772f26e1f4ff7ffeefe780adaf
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES avoid_computation_on_void_pointer.patch
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# AES encryption
|
vcpkg_check_features(
|
||||||
set(USE_OPENSSL OFF)
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
if("openssl" IN_LIST FEATURES)
|
bzip2 ENABLE_BZIP2
|
||||||
set(USE_OPENSSL ON)
|
liblzma ENABLE_LZMA
|
||||||
endif()
|
openssl ENABLE_OPENSSL
|
||||||
|
wincrypto ENABLE_WINDOWS_CRYPTO
|
||||||
set(USE_BZIP2 OFF)
|
commoncrypto ENABLE_COMMONCRYPTO
|
||||||
if("bzip2" IN_LIST FEATURES)
|
mbedtls ENABLE_MBEDTLS
|
||||||
set(USE_BZIP2 ON)
|
)
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
${FEATURE_OPTIONS}
|
||||||
-DBUILD_DOC=OFF
|
-DBUILD_DOC=OFF
|
||||||
-DBUILD_EXAMPLES=OFF
|
-DBUILD_EXAMPLES=OFF
|
||||||
-DBUILD_REGRESS=OFF
|
-DBUILD_REGRESS=OFF
|
||||||
-DBUILD_TOOLS=OFF
|
-DBUILD_TOOLS=OFF
|
||||||
# see https://github.com/nih-at/libzip/blob/rel-1-5-2/INSTALL.md
|
-DENABLE_GNUTLS=OFF
|
||||||
-DENABLE_OPENSSL=${USE_OPENSSL}
|
|
||||||
-DENABLE_BZIP2=${USE_BZIP2}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user