Rebase to upstream release 2.10.2

epel9
Patrik Novotný 4 years ago
parent 77156d49a1
commit 3b3f77bf32

3
.gitignore vendored

@ -12,3 +12,6 @@
/minizip-2.9.3.tar.gz /minizip-2.9.3.tar.gz
/minizip-2.10.0.tar.gz /minizip-2.10.0.tar.gz
/minizip-2.10.1.tar.gz /minizip-2.10.1.tar.gz
/minizip-2.10.2.tar.gz
/aes-gladman-minizip-2.10.2.tar.gz
/sha-gladman-minizip-2.10.2.tar.gz

@ -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,16 +1,18 @@
Name: minizip Name: minizip
Version: 2.10.1 Version: 2.10.2
Release: 1%{?dist} Release: 1%{?dist}
Summary: Minizip contrib in zlib with the latest bug fixes and advanced features Summary: Minizip contrib in zlib with the latest bug fixes and advanced features
License: zlib License: zlib
URL: https://github.com/nmoinvaz/%{name} URL: https://github.com/nmoinvaz/%{name}
Source0: https://github.com/nmoinvaz/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/nmoinvaz/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/BrianGladman/aes/archive/master.tar.gz#/aes-gladman-%{name}-%{version}.tar.gz
Source2: https://github.com/BrianGladman/sha/archive/master.tar.gz#/sha-gladman-%{name}-%{version}.tar.gz
# https://github.com/nmoinvaz/minizip/pull/509 Patch0: minizip-2.10.2-BRG_FORCE_FETCH.patch
Patch0: minizip-2.10.0-use-pkgconfig-for-zstd.patch Patch1: minizip-2.10.2-rename-gladmans-shared-libraries.patch
BuildRequires: cmake gcc-c++ libbsd-devel zlib-devel bzip2-devel libzstd-devel BuildRequires: cmake gcc-c++ libbsd-devel zlib-devel bzip2-devel libzstd-devel xz-devel
Provides: bundled(aes-gladman) Provides: bundled(aes-gladman)
Provides: bundled(sha1-gladman) Provides: bundled(sha1-gladman)
@ -35,11 +37,16 @@ Development files for %{name} library.
%prep %prep
%autosetup -p1 %autosetup -p1
rm -rf lib/bzip2 mkdir lib
cd lib
gzip -dc %{_sourcedir}/aes-gladman-%{name}-%{version}.tar.gz | tar -xvvf -
gzip -dc %{_sourcedir}/sha-gladman-%{name}-%{version}.tar.gz | tar -xvvf -
mv aes{-master,}
mv sha{-master,}
%build %build
%cmake . -DMZ_BUILD_TEST=ON -DSKIP_INSTALL_BINARIES=ON -DINSTALL_INC_DIR=%{_includedir}/%{name} -DZSTD_FORCE_FETCH=OFF %cmake . -DMZ_BUILD_TEST=ON -DSKIP_INSTALL_BINARIES=ON -DINSTALL_INC_DIR=%{_includedir}/%{name} -DZSTD_FORCE_FETCH=OFF -DBRG_FORCE_FETCH=OFF
%cmake_build %cmake_build
@ -55,11 +62,11 @@ make test
%files %files
%exclude %{_bindir}/%{name}
%exclude %{_libdir}/debug/usr/bin/%{name}-%{version}-%{release}.%{_arch}.debug
%license LICENSE %license LICENSE
%doc README.md %doc README.md
%{_libdir}/lib%{name}.so.* %{_libdir}/lib%{name}.so.*
%{_libdir}/libaes-gladman.a
%{_libdir}/libsha-gladman.a
%files devel %files devel
@ -71,6 +78,9 @@ make test
%{_includedir}/%{name}/zip.h %{_includedir}/%{name}/zip.h
%changelog %changelog
* Mon Oct 26 2020 Patrik Novotný <panovotn@redhat.com> - 2.10.2-1
- Rebase to upstream release 2.10.2
* Tue Oct 13 2020 Patrik Novotný <panovotn@redhat.com> - 2.10.1 * Tue Oct 13 2020 Patrik Novotný <panovotn@redhat.com> - 2.10.1
- Rebase to upstream release 2.10.1 - Rebase to upstream release 2.10.1

@ -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…
Cancel
Save