diff --git a/FindMiniz.cmake b/FindMiniz.cmake new file mode 100644 index 0000000..c11f082 --- /dev/null +++ b/FindMiniz.cmake @@ -0,0 +1,34 @@ +# This module tries to find miniz library and include files +# +# MINIZ_INCLUDE_DIR, path where to find miniz.h +# MINIZ_LIBRARY_DIR, path where to find libminiz.so +# MINIZ_LIBRARIES, the library to link against +# MINIZ_FOUND, If false, do not try to use miniz +# +# This currently works probably only for Linux +FIND_PATH ( MINIZ_INCLUDE_DIR miniz.h + /usr/local/include + /usr/include +) +FIND_LIBRARY ( MINIZ_LIBRARIES libminiz.so libminiz.a libminiz.so.2 libminiz.so.0.1 + /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) +GET_FILENAME_COMPONENT( MINIZ_LIBRARY_DIR ${MINIZ_LIBRARIES} PATH ) +SET ( MINIZ_FOUND "NO" ) +IF ( MINIZ_INCLUDE_DIR ) + IF ( MINIZ_LIBRARIES ) + SET ( MINIZ_FOUND "YES" ) + ENDIF ( MINIZ_LIBRARIES ) +ENDIF ( MINIZ_INCLUDE_DIR ) +MARK_AS_ADVANCED( + MINIZ_LIBRARY_DIR + MINIZ_INCLUDE_DIR + MINIZ_LIBRARIES +) +add_library(miniz INTERFACE) +target_link_libraries(miniz INTERFACE ${MINIZ_LIBRARIES}) +target_include_directories(miniz INTERFACE ${MINIZ_INCLUDE_DIR}) +add_library(MiniZ::MiniZ ALIAS miniz) diff --git a/ags-build-tests-with-cxx17.patch b/ags-build-tests-with-cxx17.patch deleted file mode 100644 index daea83b..0000000 --- a/ags-build-tests-with-cxx17.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up ags-3.6.2.13/Common/CMakeLists.txt.cxx17 ags-3.6.2.13/Common/CMakeLists.txt ---- ags-3.6.2.13/Common/CMakeLists.txt.cxx17 2025-09-04 10:13:12.000000000 +0200 -+++ ags-3.6.2.13/Common/CMakeLists.txt 2025-09-05 00:52:47.300264039 +0200 -@@ -241,7 +241,7 @@ if(AGS_TESTS) - test/version_test.cpp - ) - set_target_properties(common_test PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_EXTENSIONS NO - C_STANDARD 11 - C_EXTENSIONS NO -diff -up ags-3.6.2.13/Compiler/CMakeLists.txt.cxx17 ags-3.6.2.13/Compiler/CMakeLists.txt ---- ags-3.6.2.13/Compiler/CMakeLists.txt.cxx17 2025-09-04 10:13:12.000000000 +0200 -+++ ags-3.6.2.13/Compiler/CMakeLists.txt 2025-09-05 00:54:51.632435890 +0200 -@@ -92,7 +92,7 @@ if(AGS_TESTS) - test/cc_test_helper.h - ) - set_target_properties(compiler_test PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_EXTENSIONS NO - C_STANDARD 11 - C_EXTENSIONS NO -diff -up ags-3.6.2.13/Engine/CMakeLists.txt.cxx17 ags-3.6.2.13/Engine/CMakeLists.txt ---- ags-3.6.2.13/Engine/CMakeLists.txt.cxx17 2025-09-04 10:13:12.000000000 +0200 -+++ ags-3.6.2.13/Engine/CMakeLists.txt 2025-09-05 00:55:12.224488252 +0200 -@@ -649,7 +649,7 @@ if(AGS_TESTS) - test/systemimports_test.cpp - ) - set_target_properties(engine_test PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_EXTENSIONS NO - C_STANDARD 11 - C_EXTENSIONS NO diff --git a/ags-use-system-libraries.patch b/ags-use-system-libraries.patch index 0ea5cd9..9a51f43 100644 --- a/ags-use-system-libraries.patch +++ b/ags-use-system-libraries.patch @@ -1,6 +1,6 @@ -diff -up ags-3.6.2.13/CMake/FindLocalOpenAL.cmake.orig ags-3.6.2.13/CMake/FindLocalOpenAL.cmake ---- ags-3.6.2.13/CMake/FindLocalOpenAL.cmake.orig 2025-09-04 10:13:12.000000000 +0200 -+++ ags-3.6.2.13/CMake/FindLocalOpenAL.cmake 2025-10-09 13:07:24.743943475 +0200 +diff -up ags-3.6.2.14/CMake/FindLocalOpenAL.cmake.orig ags-3.6.2.14/CMake/FindLocalOpenAL.cmake +--- ags-3.6.2.14/CMake/FindLocalOpenAL.cmake.orig 2025-10-20 21:56:58.000000000 +0200 ++++ ags-3.6.2.14/CMake/FindLocalOpenAL.cmake 2025-10-28 14:29:41.117898341 +0100 @@ -1,6 +1,6 @@ # Grab system openAL or use embedded mojoAL @@ -9,3 +9,16 @@ diff -up ags-3.6.2.13/CMake/FindLocalOpenAL.cmake.orig ags-3.6.2.13/CMake/FindLo set(AGS_USE_MOJO_AL TRUE) endif() +diff -up ags-3.6.2.14/CMakeLists.txt.orig ags-3.6.2.14/CMakeLists.txt +--- ags-3.6.2.14/CMakeLists.txt.orig 2025-10-20 21:56:58.000000000 +0200 ++++ ags-3.6.2.14/CMakeLists.txt 2025-10-28 14:31:25.751904200 +0100 +@@ -336,8 +336,7 @@ endif() + if (NOT AGS_USE_LOCAL_MINIZ) + add_subdirectory(libsrc/miniz EXCLUDE_FROM_ALL) + else() +- find_package(miniz REQUIRED) +- add_library(MiniZ::MiniZ ALIAS miniz::miniz) ++ include(FindMiniz) + endif() + + add_subdirectory(Common/libsrc/aastr-0.1.1 EXCLUDE_FROM_ALL) diff --git a/ags.spec b/ags.spec index 1e42828..7f5c0ea 100644 --- a/ags.spec +++ b/ags.spec @@ -8,10 +8,11 @@ Name: ags Summary: Engine for creating and running videogames of adventure (quest) genre Version: 3.6.2.16 URL: http://www.adventuregamestudio.co.uk/site/ags/ -Release: 2%{?dist} +Release: 1%{?dist} Source0: https://github.com/adventuregamestudio/ags/archive/%{fver}/ags-%{fver}.tar.gz +# https://github.com/richgel999/miniz/issues/249 +Source1: FindMiniz.cmake Patch0: ags-use-system-libraries.patch -Patch1: ags-build-tests-with-cxx17.patch # Most code is under Artistic-2.0, except: # Common/libsrc/aastr-0.1.1: LicenseRef-Fedora-UltraPermissive # Common/libsrc/alfont-2.0.9: FTL @@ -35,14 +36,13 @@ BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: glad BuildRequires: glm-devel -BuildRequires: gtest-devel # for KHR/khrplatform.h BuildRequires: libglvnd-devel BuildRequires: libogg-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel BuildRequires: make -BuildRequires: cmake(miniz) +BuildRequires: miniz-devel BuildRequires: SDL2-devel BuildRequires: SDL2_sound-devel BuildRequires: tinyxml2-devel @@ -68,17 +68,10 @@ limited, support for other genres as well. Originally created by Chris Jones back in 1999, AGS was opensourced in 2011 and since continued to be developed by contributors. -%package tools -Summary: Tools for Adventure Game Studio engine game development -Requires: %{name}%{_isa} = %{version}-%{release} - -%description tools -This package contains the AGS engine game development tools. - %prep %setup -q %patch 0 -p1 -b .orig -%patch 1 -p1 -b .cxx17 +cp -p %{S:1} CMake/ # delete unused bundled stuff pushd Common/libinclude rm -r ogg @@ -111,8 +104,6 @@ mv Changes.txt.utf-8 Changes.txt %build %cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DAGS_BUILD_TOOLS=TRUE \ - -DAGS_TESTS=TRUE \ -DAGS_USE_LOCAL_SDL2=TRUE \ -DAGS_USE_LOCAL_SDL2_SOUND=TRUE \ -DAGS_USE_LOCAL_OGG=TRUE \ @@ -121,67 +112,30 @@ mv Changes.txt.utf-8 Changes.txt -DAGS_USE_LOCAL_GLM=TRUE \ -DAGS_USE_LOCAL_TINYXML2=TRUE \ -DAGS_USE_LOCAL_MINIZ=TRUE \ - -DAGS_USE_LOCAL_GTEST=TRUE \ %cmake_build %install %cmake_install -%check -%ctest - %files %license License.txt %doc Changes.txt Copyright.txt OPTIONS.md README.md %{_bindir}/ags -%files tools -%{_bindir}/agscc -%{_bindir}/agf2dlgasc -%{_bindir}/agfexport -%{_bindir}/agspak -%{_bindir}/agsunpak -%{_bindir}/crm2ash -%{_bindir}/crmpak -%{_bindir}/trac -%{_bindir}/ags - %changelog -* Fri Jan 16 2026 Fedora Release Engineering - 3.6.2.16-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - * Wed Jan 14 2026 Dominik Mierzejewski - 3.6.2.16-1 - update to 3.6.2.16 -- drop obsolete patch * Wed Nov 26 2025 Dominik Mierzejewski - 3.6.2.15-1 - update to 3.6.2.15 (resolves rhbz#2416531) -- drop serial ctest call work-around, fixed upstream - (https://github.com/adventuregamestudio/ags/pull/2910) - -* Mon Nov 03 2025 Benjamin A. Beasley - 3.6.2.14-2 -- Build tests as C++17; required for gtest 1.17 * Mon Oct 27 2025 Dominik Mierzejewski - 3.6.2.14-1 - update to 3.6.2.14 (resolves rhbz#2405254) -* Fri Sep 05 2025 Dominik Mierzejewski - 3.6.2.13-2 -- build tools and run tests - * Thu Sep 04 2025 Dominik Mierzejewski - 3.6.2.13-1 - update to 3.6.2.13 (resolves rhbz#2393079) -* Sat Aug 23 2025 Benjamin A. Beasley - 3.6.2.12-4 -- Rebuilt for tinyxml2 11.0.0 - -* Sun Aug 03 2025 Dominik Mierzejewski - 3.6.2.12-3 -- follow upstream convention in option naming -- drop custom miniz detection and require a fixed build instead - -* Wed Jul 23 2025 Fedora Release Engineering - 3.6.2.12-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - * Sat Jul 19 2025 Dominik Mierzejewski - 3.6.2.12-1 - update to 3.6.2.12 - switch back to bundled freetype per upstream recommendation