diff --git a/zziplib-0.13.78-port-to-newer-cmake.patch b/zziplib-0.13.78-port-to-newer-cmake.patch new file mode 100644 index 0000000000000000000000000000000000000000..7f9bec505490c39441188cd41c97029bb5c7e7a7 --- /dev/null +++ b/zziplib-0.13.78-port-to-newer-cmake.patch @@ -0,0 +1,105 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d355a3..c410521 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) + project(zziplib VERSION "0.13.78" LANGUAGES C) + + if(NOT CMAKE_BUILD_TYPE) +diff --git a/SDL/CMakeLists.txt b/SDL/CMakeLists.txt +index 0f603b3..8bc0634 100644 +--- a/SDL/CMakeLists.txt ++++ b/SDL/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) + project(zzipsdl VERSION "0.13.78" LANGUAGES C) + + if(NOT CMAKE_BUILD_TYPE) +diff --git a/bins/CMakeLists.txt b/bins/CMakeLists.txt +index e1db361..2d868c8 100644 +--- a/bins/CMakeLists.txt ++++ b/bins/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) + project(zzipbins VERSION "0.13.78" LANGUAGES C) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeScripts") +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index b3fc58f..ca1272f 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.12) + project(zzipbins VERSION "0.13.78" LANGUAGES C) + + include ( GNUInstallDirs ) +@@ -20,7 +20,7 @@ endif() + # Zlib library needed + find_package ( ZLIB REQUIRED ) + # pkg_search_module ( ZZIP zzip ) +-find_package(PythonInterp 3.5 REQUIRED) ++find_package(Python 3.5 REQUIRED) + find_package(UnixCommands REQUIRED) # bash cp mv rm gzip tar + find_program(XMLTO xmlto) + +@@ -30,7 +30,7 @@ set(README ${CMAKE_SOURCE_DIR}/README) + set(topdir ${CMAKE_SOURCE_DIR}) + set(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) + set(outdir ${CMAKE_CURRENT_BINARY_DIR}) +-set(PY ${PYTHON_EXECUTABLE}) ++set(PY ${Python_EXECUTABLE}) + + set(mandir ${CMAKE_INSTALL_FULL_MANDIR}) + set(docdir ${CMAKE_INSTALL_FULL_DOCDIR}) +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 180a129..13eecd5 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.12) + project(zziptest VERSION "0.13.78" LANGUAGES C) + + if(NOT CMAKE_BUILD_TYPE) +@@ -28,14 +28,14 @@ endif() + # Zlib library needed + find_package ( ZLIB REQUIRED ) + # pkg_search_module ( ZZIP zzip ) +-find_package ( PythonInterp 3.5 REQUIRED ) ++find_package ( Python 3.5 REQUIRED ) + find_package ( UnixCommands REQUIRED ) # bash cp mv rm gzip tar + find_program ( MKZIP zip) + find_program ( UNZIP unzip) + + set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX}) + set(README ${CMAKE_SOURCE_DIR}/README) +-set(PY ${PYTHON_EXECUTABLE}) ++set(PY ${Python_EXECUTABLE}) + set(outdir ${CMAKE_CURRENT_BINARY_DIR}) + set(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) + set(topdir ${CMAKE_SOURCE_DIR}) +diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt +index 28f03aa..773f4a8 100644 +--- a/zzip/CMakeLists.txt ++++ b/zzip/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) + project(zzip VERSION "0.13.78" LANGUAGES C) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeScripts") +diff --git a/zzipwrap/CMakeLists.txt b/zzipwrap/CMakeLists.txt +index bfec754..0edc68b 100644 +--- a/zzipwrap/CMakeLists.txt ++++ b/zzipwrap/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.1) ++cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) + project(zzipwrap VERSION "0.13.78" LANGUAGES C) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeScripts") diff --git a/zziplib.spec b/zziplib.spec index 312425c69a04720ef9b46af69f65f7ae9bd797dd..b4d8cda1c8ed934e9da8c42214368a2341f9d43b 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,14 +1,14 @@ Name: zziplib Version: 0.13.78 -Release: 2 +Release: 3 Summary: Lightweight library for zip compression License: LGPL-2.0-or-later OR MPL-1.1 URL: https://zziplib.sourceforge.net Source0: https://github.com/gdraheim/zziplib/archive/refs/tags/v%{version}.tar.gz Patch0: zziplib-0.13.78-fix-pkgconfig-pkgname.patch - +Patch1: zziplib-0.13.78-port-to-newer-cmake.patch BuildRequires: gcc make -BuildRequires: cmake >= 3.1 +BuildRequires: cmake >= 3.12 BuildRequires: zlib-devel BuildRequires: pkgconfig(sdl2) @@ -60,6 +60,9 @@ library. %{_mandir}/man3/* %changelog +* Tue Mar 04 2025 Funda Wang - 0.13.78-3 +- build with cmake 4.0 + * Thu Nov 28 2024 Funda Wang - 0.13.78-2 - build with sdl2 now