|
|
@ -1,50 +0,0 @@ |
|
|
|
From 3d94e052f987bc35452592acf9f6fcb0d4ee4db4 Mon Sep 17 00:00:00 2001 |
|
|
|
From: David Woodhouse <dwmw2@infradead.org> |
|
|
|
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(-) |
|
|
|
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -17,6 +17,7 @@ option(MZ_PKCRYPT "Enables PKWARE tradit
|
|
|
|
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) |
|
|
|
@@ -298,7 +299,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) |
|
|
|
@@ -311,6 +312,8 @@ if(UNIX)
|
|
|
|
list(APPEND MINIZIP_INC ${LIBBSD_INCLUDE_DIRS}) |
|
|
|
link_directories(${LIBBSD_LIBRARY_DIRS}) |
|
|
|
endif() |
|
|
|
+ else()
|
|
|
|
+ set(MZ_LIBBSD FALSE)
|
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
@@ -943,6 +946,7 @@ add_feature_info(MZ_PKCRYPT MZ_PKCRYPT "
|
|
|
|
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") |