diff --git a/libs/minizip/Makefile b/libs/minizip/Makefile index 039a80fa4..58e6d3865 100644 --- a/libs/minizip/Makefile +++ b/libs/minizip/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=minizip PKG_VERSION:=2.9.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/nmoinvaz/minizip/archive/ @@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_PARALLEL:=1 -CMAKE_OPTIONS:=-DINSTALL_INC_DIR=/usr/include/minizip -DMZ_BZIP2=OFF -DBUILD_SHARED_LIBS=ON +CMAKE_OPTIONS:=-DINSTALL_INC_DIR=/usr/include/minizip -DMZ_BZIP2=OFF -DBUILD_SHARED_LIBS=ON -DMZ_LIBBSD=OFF include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/libs/minizip/patches/010-disable-libbsd.patch b/libs/minizip/patches/010-disable-libbsd.patch new file mode 100644 index 000000000..caa481843 --- /dev/null +++ b/libs/minizip/patches/010-disable-libbsd.patch @@ -0,0 +1,55 @@ +From 3d94e052f987bc35452592acf9f6fcb0d4ee4db4 Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 10 Jun 2020 11:39:17 +0100 +Subject: [PATCH] Allow libbsd to be explicitly disabled + +When building for a minimal environment like OpenWRT we want to avoid the +dependency on libbsd even if it did happen to be built and available in +the buildroot at the time minizip is compiled. + +https://github.com/openwrt/packages/issues/12471 +--- + CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0de10cf..217359a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,7 @@ option(MZ_PKCRYPT "Enables PKWARE traditional encryption" ON) + option(MZ_WZAES "Enables WinZIP AES encryption" ON) + option(MZ_LIBCOMP "Enables Apple compression" OFF) + option(MZ_OPENSSL "Enables OpenSSL for encryption" OFF) ++option(MZ_LIBBSD "Enable libbsd random functionality" ON) + option(MZ_BRG "Enables Brian Gladman's encryption library" OFF) + option(MZ_SIGNING "Enables zip signing support" ON) + option(MZ_COMPRESS_ONLY "Only support compression" OFF) +@@ -275,7 +276,7 @@ if(UNIX) + endif() + endif() + +- if(NOT HAVE_ARC4RANDOM_BUF) ++ if(MZ_LIBBSD AND NOT HAVE_ARC4RANDOM_BUF) + find_package(PkgConfig REQUIRED) + + pkg_check_modules(LIBBSD libbsd) +@@ -288,6 +289,8 @@ if(UNIX) + list(APPEND MINIZIP_INC ${LIBBSD_INCLUDE_DIRS}) + link_directories(${LIBBSD_LIBRARY_DIRS}) + endif() ++ else() ++ set(MZ_LIBBSD FALSE) + endif() + endif() + endif() +@@ -935,6 +938,7 @@ add_feature_info(MZ_PKCRYPT MZ_PKCRYPT "Enables PKWARE traditional encryption") + add_feature_info(MZ_WZAES MZ_WZAES "Enables WinZIP AES encryption") + add_feature_info(MZ_LIBCOMP MZ_LIBCOMP "Enables Apple compression") + add_feature_info(MZ_OPENSSL MZ_OPENSSL "Enables OpenSSL for encryption") ++add_feature_info(MZ_LIBBSD MZ_LIBBSD "Build with libbsd for random functionality") + add_feature_info(MZ_BRG MZ_BRG "Enables Brian Gladman's encryption library") + add_feature_info(MZ_SIGNING MZ_SIGNING "Enables zip signing support") + add_feature_info(MZ_COMPRESS_ONLY MZ_COMPRESS_ONLY "Only support compression") +-- +2.17.1 +