From 8bdb351409087540eae6f5b8e82bd1bb72277c8b Mon Sep 17 00:00:00 2001 From: div72 Date: Sat, 7 Sep 2024 18:58:09 +0300 Subject: [PATCH] depends: bump libzip to 1.10.1 --- depends/packages/libzip.mk | 47 +++++++------------ depends/patches/libzip/compat.h.patch | 15 ------ .../patches/libzip/nonrandomopentest.c.patch | 14 ------ 3 files changed, 18 insertions(+), 58 deletions(-) delete mode 100644 depends/patches/libzip/compat.h.patch delete mode 100755 depends/patches/libzip/nonrandomopentest.c.patch diff --git a/depends/packages/libzip.mk b/depends/packages/libzip.mk index 507d768ad2..fc216b0934 100644 --- a/depends/packages/libzip.mk +++ b/depends/packages/libzip.mk @@ -1,40 +1,29 @@ package=libzip -$(package)_version=1.3.2 +$(package)_version=1.10.1 $(package)_download_path=https://libzip.org/download/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=ab4c34eb6c3a08b678cd0f2450a6c57a13e9618b1ba34ee45d00eb5327316457 -$(package)_dependencies=zlib bzip2 -$(package)_patches=nonrandomopentest.c.patch compat.h.patch - +$(package)_sha256_hash=9669ae5dfe3ac5b3897536dc8466a874c8cf2c0e3b1fdd08d75b273884299363 +$(package)_dependencies=zlib define $(package)_set_vars - $(package)_build_opts= CC="$($(package)_cc)" - $(package)_build_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC" - $(package)_build_opts+=RANLIB="$($(package)_ranlib)" - $(package)_build_opts+=AR="$($(package)_ar)" - $(package)_cxxflags_aarch64_linux = $(GCCFLAGS) - $(package)_cflags_aarch64_linux = $(GCCFLAGS) - $(package)_cxxflags_arm_linux = $(GCCFLAGS) - $(package)_cflags_arm_linux = $(GCCFLAGS) -endef - -ifeq ($(host),i686-pc-linux-gnu) - i686_cflag="$($(package)_cflags) $($(package)_cppflags) -fPIC -m32" -else - i686_cflag="$($(package)_cflags) $($(package)_cppflags) -fPIC" -endif - - -define $(package)_preprocess_cmds - sed -i.old 's/\# ifdef _WIN32/\# if defined _WIN32 \&\& defined ZIP_DLL/' lib/zip.h && \ - patch -p1 < $($(package)_patch_dir)/nonrandomopentest.c.patch && \ - patch -p1 < $($(package)_patch_dir)/compat.h.patch +$(package)_config_opts=-DENABLE_COMMONCRYPTO=OFF +$(package)_config_opts+=-DENABLE_GNUTLS=OFF +$(package)_config_opts+=-DENABLE_MBEDTLS=OFF +$(package)_config_opts+=-DENABLE_OPENSSL=OFF +$(package)_config_opts+=-DENABLE_WINDOWS_CRYPTO=OFF +$(package)_config_opts+=-DENABLE_BZIP2=OFF +$(package)_config_opts+=-DENABLE_LZMA=OFF +$(package)_config_opts+=-DENABLE_ZSTD=OFF +$(package)_config_opts+=-DENABLE_FDOPEN=OFF +$(package)_config_opts+=-DBUILD_TOOLS=OFF +$(package)_config_opts+=-DBUILD_REGRESS=OFF +$(package)_config_opts+=-DBUILD_OSSFUZZ=OFF +$(package)_config_opts+=-DBUILD_EXAMPLES=OFF +$(package)_config_opts+=-DBUILD_DOC=OFF endef define $(package)_config_cmds - $($(package)_build_opts) CFLAGS=$(i686_cflag) ./configure --host=$(host) \ - --prefix=$(host_prefix) --with-zlib=$(host_prefix) --with-bzip2=$(host_prefix) \ - --with-pic --enable-static --enable-shared=no --libdir=$($($(package)_type)_prefix)/lib + $($(package)_cmake) -S . -B . -DBUILD_SHARED_LIBS=OFF -DCMAKE_LIBRARY_PATH=$(host_prefix) endef define $(package)_build_cmds diff --git a/depends/patches/libzip/compat.h.patch b/depends/patches/libzip/compat.h.patch deleted file mode 100644 index cba2486369..0000000000 --- a/depends/patches/libzip/compat.h.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- old/lib/compat.h 2017-10-06 07:00:00.000000000 -0400 -+++ new/lib/compat.h 2021-03-28 00:19:50.891360075 -0400 -@@ -92,9 +92,9 @@ - #if defined(HAVE__OPEN) - #define open(a, b, c) _open((a), (b)) - #endif --#if defined(HAVE__SNPRINTF) --#define snprintf _snprintf --#endif -+//#if defined(HAVE__SNPRINTF) -+//#define snprintf _snprintf -+//#endif - #if defined(HAVE__STRDUP) - #if !defined(HAVE_STRDUP) || defined(_WIN32) - #undef strdup diff --git a/depends/patches/libzip/nonrandomopentest.c.patch b/depends/patches/libzip/nonrandomopentest.c.patch deleted file mode 100755 index 1c071a31aa..0000000000 --- a/depends/patches/libzip/nonrandomopentest.c.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- old/regress/nonrandomopentest.c 2017-10-09 10:53:39.000000000 -0400 -+++ new/regress/nonrandomopentest.c 2019-10-27 23:09:54.052006441 -0400 -@@ -48,7 +48,11 @@ - int fd, i; - char buf[10]; - -+ #ifdef _WIN32 -+ fd = open("/dev/urandom", O_RDONLY,); -+ #else - fd = open("/dev/urandom", O_RDONLY); -+ #endif - if (fd < 0) { - fprintf(stderr, "can't open /dev/urandom: %s\n", strerror(errno)); - exit(1);