parent
77156d49a1
commit
3b3f77bf32
@ -1,19 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index a6deb4c..c579059 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -115,7 +115,13 @@ endif()
|
|
||||||
# Check if zstd installation is present
|
|
||||||
if(MZ_ZSTD)
|
|
||||||
if(NOT ZSTD_FORCE_FETCH)
|
|
||||||
- find_package(ZSTD QUIET)
|
|
||||||
+ find_package(PkgConfig)
|
|
||||||
+ if(PKGCONFIG_FOUND)
|
|
||||||
+ pkg_check_modules(ZSTD libzstd)
|
|
||||||
+ endif()
|
|
||||||
+ if(NOT ZSTD_FOUND)
|
|
||||||
+ find_package(ZSTD QUIET)
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
if(ZSTD_FOUND AND NOT ZSTD_FORCE_FETCH)
|
|
||||||
message(STATUS "Using ZSTD")
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 861ba9e9fe82403805119fb3879f77d2d80be1fa Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
|
||||||
|
Date: Mon, 26 Oct 2020 16:23:03 +0100
|
||||||
|
Subject: [PATCH] Allow option to skip git clone for MZ_BRG
|
||||||
|
|
||||||
|
Downloading additional sources during build is problematic for
|
||||||
|
distribution integration.
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 9 ++++++---
|
||||||
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 3c7d45d..4f775d8 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -31,8 +31,9 @@ option(MZ_FILE32_API "Builds using posix 32-bit file api" OFF)
|
||||||
|
set(MZ_PROJECT_SUFFIX "" CACHE STRING "Project name suffix for package managers")
|
||||||
|
option(ZLIB_FORCE_FETCH "Skips find package for ZLIB" OFF)
|
||||||
|
option(ZSTD_FORCE_FETCH "Skips find package for ZSTD" OFF)
|
||||||
|
+option(BRG_FORCE_FETCH "Clone Brian Gladman's encryption library from GIT" ON)
|
||||||
|
|
||||||
|
-mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX ZLIB_FORCE_FETCH ZSTD_FORCE_FETCH)
|
||||||
|
+mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX ZLIB_FORCE_FETCH ZSTD_FORCE_FETCH BRG_FORCE_FETCH)
|
||||||
|
|
||||||
|
if(POLICY CMP0074)
|
||||||
|
cmake_policy(SET CMP0074 OLD)
|
||||||
|
@@ -489,8 +490,10 @@ endif()
|
||||||
|
|
||||||
|
# Include Brian Gladman's crypto library
|
||||||
|
if(MZ_BRG)
|
||||||
|
- clone_repo(AES https://github.com/BrianGladman/aes)
|
||||||
|
- clone_repo(SHA https://github.com/BrianGladman/sha)
|
||||||
|
+ if(BRG_FORCE_FETCH)
|
||||||
|
+ clone_repo(AES https://github.com/BrianGladman/aes)
|
||||||
|
+ clone_repo(SHA https://github.com/BrianGladman/sha)
|
||||||
|
+ endif()
|
||||||
|
|
||||||
|
set(BRG_AES_SRC
|
||||||
|
lib/aes/brg_endian.h
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 3f9345400bec0676acbb023e0755fc7daee6a26a Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
|
||||||
|
Date: Tue, 27 Oct 2020 10:08:31 +0100
|
||||||
|
Subject: [PATCH] Rename Brian Gladman's shared libraries
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 4f775d8..b3e0649 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -521,12 +521,12 @@ if(MZ_BRG)
|
||||||
|
lib/sha/sha1.h
|
||||||
|
lib/sha/sha2.h)
|
||||||
|
|
||||||
|
- add_library(aes STATIC ${BRG_AES_SRC} ${BRG_AES_HDR})
|
||||||
|
- add_library(sha STATIC ${BRG_SHA_SRC} ${BRG_SHA_HDR})
|
||||||
|
+ add_library(aes-gladman STATIC ${BRG_AES_SRC} ${BRG_AES_HDR})
|
||||||
|
+ add_library(sha-gladman STATIC ${BRG_SHA_SRC} ${BRG_SHA_HDR})
|
||||||
|
|
||||||
|
list(APPEND MINIZIP_SRC mz_crypt_brg.c)
|
||||||
|
list(APPEND MINIZIP_INC lib/aes lib/sha)
|
||||||
|
- list(APPEND MINIZIP_DEP aes sha)
|
||||||
|
+ list(APPEND MINIZIP_DEP aes-gladman sha-gladman)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Include compatibility layer
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -1 +1,3 @@
|
|||||||
SHA512 (minizip-2.10.1.tar.gz) = b5550d3ec6d5bbc6435277904d19db17ac944abaab854cbcc7bb861f7a7e2e0db414476e5bebd19f6370b177f60a94547b7a9c16627bce49af1cdb24a0e82c5e
|
SHA512 (minizip-2.10.2.tar.gz) = ceb327315fe16fc010820f72c6ca780c9ce4769268750fbb81e4664f0c8e378272cb74fbe775bbd4211b907175f68812189a778c7d6b104523d99930763f60dd
|
||||||
|
SHA512 (aes-gladman-minizip-2.10.2.tar.gz) = f9eb661b4c1dca7803b31be1e97a07e97e5042cda6ab390444626272e368a7bb5331c50c46c862e6901e03c4227222332efab6361880a49c9810fb3a734b6de8
|
||||||
|
SHA512 (sha-gladman-minizip-2.10.2.tar.gz) = 33f8915168fe161df3243731d8949611824abee36089eae91540162edc4b972d758268c7cab9e5fc7e908af5ce4affd8cdda7b0ce727b3d7c7f2ef15126e1e36
|
||||||
|
Loading…
Reference in new issue