diff --git a/.gitignore b/.gitignore index 50ec7e8..754080e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /minizip-2.9.1.tar.gz /minizip-2.9.2.tar.gz /minizip-2.9.3.tar.gz +/minizip-2.10.0.tar.gz diff --git a/minizip-2.10.0-use-pkgconfig-for-zstd.patch b/minizip-2.10.0-use-pkgconfig-for-zstd.patch new file mode 100644 index 0000000..456763c --- /dev/null +++ b/minizip-2.10.0-use-pkgconfig-for-zstd.patch @@ -0,0 +1,19 @@ +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") diff --git a/minizip.spec b/minizip.spec index dd49e9b..f7fe0a2 100644 --- a/minizip.spec +++ b/minizip.spec @@ -1,5 +1,5 @@ Name: minizip -Version: 2.9.3 +Version: 2.10.0 Release: 1%{?dist} Summary: Minizip contrib in zlib with the latest bug fixes and advanced features @@ -7,7 +7,10 @@ License: zlib URL: https://github.com/nmoinvaz/%{name} Source0: https://github.com/nmoinvaz/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: cmake gcc-c++ libbsd-devel zlib-devel bzip2-devel +# https://github.com/nmoinvaz/minizip/pull/509 +Patch0: minizip-2.10.0-use-pkgconfig-for-zstd.patch + +BuildRequires: cmake gcc-c++ libbsd-devel zlib-devel bzip2-devel libzstd-devel Provides: bundled(aes-gladman) Provides: bundled(sha1-gladman) @@ -31,12 +34,12 @@ Development files for %{name} library. %prep -%autosetup +%autosetup -p1 rm -rf lib/bzip2 %build -%cmake . -DMZ_BUILD_TEST=ON -DSKIP_INSTALL_BINARIES=ON -DINSTALL_INC_DIR=%{_includedir}/%{name} +%cmake . -DMZ_BUILD_TEST=ON -DSKIP_INSTALL_BINARIES=ON -DINSTALL_INC_DIR=%{_includedir}/%{name} -DZSTD_FORCE_FETCH=OFF %make_build @@ -68,6 +71,9 @@ make test %{_includedir}/%{name}/zip.h %changelog +* Wed Jul 01 2020 Patrik Novotný - 2.10.0-1 +- Rebase to upstream release 2.10.0 + * Tue May 26 2020 Patrik Novotný - 2.9.3-1 - Rebase to upstream release 2.9.3 diff --git a/sources b/sources index 8cf9580..195257b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (minizip-2.9.3.tar.gz) = 397a75fd36f0f0b16d7098ad4796177a40b187c220b09a8ed69e9170b9ac262644e55b5c3c27029ae53e8c4b76a04ffea2a25eba3e43c645b3bbaf568279dce4 +SHA512 (minizip-2.10.0.tar.gz) = 8717e00242ba4f8247ef60c925813bcfaf104243cdbfff4cca690e7c1f7da1132084e1b939b3adf1f019d220a1034f46f2fe2a543cca19106af5136e09d6af16