Compare commits

..

1 commit

Author SHA1 Message Date
Dominik 'Rathann' Mierzejewski
2a04f56d48 fix build with SDL2_sound 2.0.1 2024-01-19 18:02:46 +01:00
7 changed files with 101 additions and 193 deletions

View file

@ -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

14
ags-sdl2_sound.patch Normal file
View file

@ -0,0 +1,14 @@
diff -up ags-3.6.0.56/Engine/Makefile-defs.linux.sdl2_sound ags-3.6.0.56/Engine/Makefile-defs.linux
--- ags-3.6.0.56/Engine/Makefile-defs.linux.sdl2_sound 2024-01-19 17:37:12.929782340 +0100
+++ ags-3.6.0.56/Engine/Makefile-defs.linux 2024-01-19 17:47:24.587125274 +0100
@@ -30,8 +30,8 @@ else
endif
LIBS += $(shell pkg-config --libs vorbisfile)
-SDL2_SOUND_CFLAGS = $(shell pkg-config --cflags SDL2_sound)
-SDL2_SOUND_LIBS = $(shell pkg-config --libs SDL2_sound)
+SDL2_SOUND_CFLAGS = $(shell pkg-config --cflags SDL2_sound || echo)
+SDL2_SOUND_LIBS = $(shell pkg-config --libs SDL2_sound || echo "-lSDL2_sound")
SDL2_CFLAGS = $(shell sdl2-config --cflags)
SDL2_LIBS = $(shell sdl2-config --libs)

29
ags-use-openal.patch Normal file
View file

@ -0,0 +1,29 @@
diff -up ags-3.6.0.56/Engine/Makefile-defs.linux.openal ags-3.6.0.56/Engine/Makefile-defs.linux
--- ags-3.6.0.56/Engine/Makefile-defs.linux.openal 2024-01-19 17:35:02.292347784 +0100
+++ ags-3.6.0.56/Engine/Makefile-defs.linux 2024-01-19 17:36:49.822882355 +0100
@@ -36,8 +36,11 @@ SDL2_SOUND_LIBS = $(shell pkg-config --l
SDL2_CFLAGS = $(shell sdl2-config --cflags)
SDL2_LIBS = $(shell sdl2-config --libs)
-CFLAGS += $(SDL2_CFLAGS) $(SDL2_SOUND_CFLAGS)
-LIBS += $(SDL2_LIBS) $(SDL2_SOUND_LIBS)
+OPENAL_CFLAGS = $(shell pkg-config --cflags openal)
+OPENAL_LIBS = $(shell pkg-config --libs openal)
+
+CFLAGS += $(SDL2_CFLAGS) $(SDL2_SOUND_CFLAGS) $(OPENAL_CFLAGS)
+LIBS += $(SDL2_LIBS) $(SDL2_SOUND_LIBS) $(OPENAL_LIBS)
LIBS += -ldl -lpthread -lm
diff -up ags-3.6.0.56/Engine/Makefile-objs.openal ags-3.6.0.56/Engine/Makefile-objs
--- ags-3.6.0.56/Engine/Makefile-objs.openal 2024-01-08 22:35:50.000000000 +0100
+++ ags-3.6.0.56/Engine/Makefile-objs 2024-01-19 17:35:02.292347784 +0100
@@ -59,8 +59,6 @@ PLUGINS = ../Plugins/AGSflashlight/agsfl
ALFONT = ../Common/libsrc/alfont-2.0.9/alfont.c
-MOJOAL = ../libsrc/mojoAL/mojoal.c
-
APEG = libsrc/apeg-1.2.1/adisplay.c libsrc/apeg-1.2.1/getbits.c libsrc/apeg-1.2.1/getblk.c libsrc/apeg-1.2.1/gethdr.c libsrc/apeg-1.2.1/getpic.c libsrc/apeg-1.2.1/idct.c libsrc/apeg-1.2.1/motion.c libsrc/apeg-1.2.1/mpeg1dec.c libsrc/apeg-1.2.1/ogg.c libsrc/apeg-1.2.1/recon.c libsrc/apeg-1.2.1/audio/apegcommon.c libsrc/apeg-1.2.1/audio/aaudio.c libsrc/apeg-1.2.1/audio/dct64.c libsrc/apeg-1.2.1/audio/decode_1to1.c libsrc/apeg-1.2.1/audio/decode_2to1.c libsrc/apeg-1.2.1/audio/decode_4to1.c libsrc/apeg-1.2.1/audio/layer1.c libsrc/apeg-1.2.1/audio/layer2.c libsrc/apeg-1.2.1/audio/layer3.c libsrc/apeg-1.2.1/audio/mpg123.c libsrc/apeg-1.2.1/audio/readers.c libsrc/apeg-1.2.1/audio/tabinit.c libsrc/apeg-1.2.1/audio/vbrhead.c
AASTR = ../Common/libsrc/aastr-0.1.1/aarot.c ../Common/libsrc/aastr-0.1.1/aastr.c ../Common/libsrc/aastr-0.1.1/aautil.c

View file

@ -0,0 +1,22 @@
diff -up ags-v.3.6.0.22/Engine/Makefile-defs.linux.noft ags-v.3.6.0.22/Engine/Makefile-defs.linux
--- ags-v.3.6.0.22/Engine/Makefile-defs.linux.noft 2022-03-31 22:47:27.000000000 +0200
+++ ags-v.3.6.0.22/Engine/Makefile-defs.linux 2022-04-01 13:43:17.624163097 +0200
@@ -1,8 +1,6 @@
USE_BUILT_IN_LIBSRC = 0
USE_MIDI_PATCH = 1
-include Makefile-defs.freetype
-
INCDIR = ../Engine ../Common ../Common/libinclude ../Common/libsrc/alfont-2.0.9 ../Engine/libsrc/apeg-1.2.1/ ../libsrc/mojoAL ../Plugins ../Engine/libsrc/glad/include ../libsrc/glm $(ALLEGRO_SRCDIR)/include
LIBDIR =
@@ -19,7 +17,8 @@ CFLAGS := -O2 -g \
CXXFLAGS := -std=c++11 -Werror=delete-non-virtual-dtor $(CXXFLAGS)
-LIBS += $(FT_LDFLAGS)
+CFLAGS += $(shell pkg-config --cflags freetype2)
+LIBS += $(shell pkg-config --libs freetype2)
LIBS += $(shell pkg-config --libs ogg)
LIBS += $(shell pkg-config --libs theora)

View file

@ -1,11 +0,0 @@
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
@@ -1,6 +1,6 @@
# Grab system openAL or use embedded mojoAL
-if(WIN32 OR LINUX OR MACOS OR FREEBSD)
+if(WIN32 OR MACOS OR FREEBSD)
set(AGS_USE_MOJO_AL TRUE)
endif()

180
ags.spec
View file

@ -1,48 +1,47 @@
%bcond_without freetype
%bcond_without openal
%global fver v%{version}
# avoid building bundled libraries as shared
%undefine _cmake_shared_libs
%define ags_license Artistic 2.0 and BSD and Giftware and LGPLv2+ and Public Domain and zlib
%if %{without freetype}
%define license_full %{ags_license} and FTL
%else
%define license_full %{ags_license}
%endif
Name: ags
Summary: Engine for creating and running videogames of adventure (quest) genre
Version: 3.6.2.16
Version: 3.6.0.56
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
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
# Engine/libsrc/apeg-1.2.1: MPEG-SSG
# Engine/libsrc/glad: Apache-2.0 AND MIT-Khronos-old
# Engine/libsrc/libcda-0.5: Zlib
# Plugins/agsblend/agsblend: MIT
# Plugins/agspalrender/agspalrender/raycast.{cpp,h}: BSD-2-Clause
# Plugins/AGSSpriteFont: CC0-1.0
# libsrc/allegro: Giftware
License: Artistic-2.0 AND LicenseRef-Fedora-UltraPermissive AND FTL AND MPEG-SSG AND Apache-2.0 AND MIT-Khronos-old AND Zlib AND MIT AND BSD-2-Clause AND CC0-1.0 AND Giftware
# use SDL2_sound without pkg-config
Patch0: %{name}-sdl2_sound.patch
# unbundle freetype
Patch2: %{name}-use-system-freetype.patch
# use openal-soft
Patch3: %{name}-use-openal.patch
License: %{license_full}
%if %{with freetype}
BuildRequires: freetype-devel
%else
# incorrect rendering with new FT: https://github.com/adventuregamestudio/ags/issues/1528
Provides: bundled(freetype) = 2.1.3
%endif
%if %{with openal}
BuildRequires: openal-soft-devel
%else
# https://github.com/icculus/mojoAL (zlib)
Provides: bundled(mojoal)
%endif
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: SDL2-devel
BuildRequires: SDL2_sound-devel
BuildRequires: tinyxml2-devel
@ -68,17 +67,15 @@ 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
%patch0 -p1 -b .sdl2_sound
%if %{with freetype}
%patch2 -p1 -b .noft
%endif
%if %{with openal}
%patch3 -p1 -b .openal
%endif
# delete unused bundled stuff
pushd Common/libinclude
rm -r ogg
@ -86,19 +83,19 @@ rm -r theora
rm -r vorbis
popd
pushd Common/libsrc
%if %{with freetype}
rm -r freetype-2.1.3
%endif
rmdir googletest
popd
pushd Engine/libsrc
rm -r glad{,-gles2}/{src,include}
glad --reproducible --out-path=glad --profile="compatibility" --api="gl=2.1" --generator="c" --spec="gl" --extensions="GL_EXT_framebuffer_object"
glad --reproducible --out-path=glad-gles2 --profile="core" --api="gles2=2.0" --generator="c" --spec="gl" --extensions=""
rm -r glad{,-gles2}/include/KHR
rm -r ogg
rm -r theora
rm -r vorbis
popd
pushd libsrc
rm -r glm
rm -r miniz
%if %{with openal}
rm -r mojoAL
%endif
@ -109,132 +106,25 @@ touch -r Changes.txt Changes.txt.utf-8 && \
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 \
-DAGS_USE_LOCAL_VORBIS=TRUE \
-DAGS_USE_LOCAL_THEORA=TRUE \
-DAGS_USE_LOCAL_GLM=TRUE \
-DAGS_USE_LOCAL_TINYXML2=TRUE \
-DAGS_USE_LOCAL_MINIZ=TRUE \
-DAGS_USE_LOCAL_GTEST=TRUE \
%cmake_build
%set_build_flags
%make_build -C Engine
%install
%cmake_install
%check
%ctest
make V=1 -C Engine PREFIX=%{buildroot}%{_prefix} install
%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 <releng@fedoraproject.org> - 3.6.2.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Jan 14 2026 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.16-1
- update to 3.6.2.16
- drop obsolete patch
* Wed Nov 26 2025 Dominik Mierzejewski <dominik@greysector.net> - 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 <code@musicinmybrain.net> - 3.6.2.14-2
- Build tests as C++17; required for gtest 1.17
* Mon Oct 27 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.14-1
- update to 3.6.2.14 (resolves rhbz#2405254)
* Fri Sep 05 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.13-2
- build tools and run tests
* Thu Sep 04 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.13-1
- update to 3.6.2.13 (resolves rhbz#2393079)
* Sat Aug 23 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 3.6.2.12-4
- Rebuilt for tinyxml2 11.0.0
* Sun Aug 03 2025 Dominik Mierzejewski <dominik@greysector.net> - 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 <releng@fedoraproject.org> - 3.6.2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jul 19 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.12-1
- update to 3.6.2.12
- switch back to bundled freetype per upstream recommendation
* Sun Jul 06 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.11-1
- update to 3.6.2.11
* Fri May 09 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.9-1
- update to 3.6.2.9
- regenerate glad sources
* Fri Feb 28 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.2.7-1
- update to 3.6.2.7
- switch build system to cmake
- unbundle miniz
- update SPDX expression in License: field after review
* Thu Feb 27 2025 Dominik Mierzejewski <dominik@greysector.net> - 3.6.1.31-1
- update to 3.6.1.31
- fix build with C23 (resolves rhbz#2336273)
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.1.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Nov 30 2024 Dominik Mierzejewski <dominik@greysector.net> - 3.6.1.30-1
- update to 3.6.1.30
- drop obsolete patch
* Mon Nov 11 2024 Dominik Mierzejewski <dominik@greysector.net> - 3.6.0.56-5
- rebuild for tinyxml2
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0.56-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0.56-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0.56-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Dominik Mierzejewski <dominik@greysector.net> - 3.6.0.56-1
- update to 3.6.0.56
- fix build with GCC14
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0.51-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
- fix build with SDL2_sound 2.0.1
* Fri Sep 01 2023 Dominik Mierzejewski <dominik@greysector.net> - 3.6.0.51-1
- update to 3.6.0.51
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0.48-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun May 14 2023 Dominik Mierzejewski <dominik@greysector.net> - 3.6.0.48-1
- update to 3.6.0.48 (#2192719)

View file

@ -1 +1 @@
SHA512 (ags-v3.6.2.16.tar.gz) = 4b3261284454fc4e770f684eb6ece5199bc9d8a731d433b96f1134ade8907d60f0658f481f5ed229346a6dfeac61622ce5d62adfc163489f1cbf335b7c088936
SHA512 (ags-v3.6.0.56.tar.gz) = f36ec7c34a232e109d0dffff438fb8a6dc3e7ad5825b66b009c982c2505bc136ed660dc871b1c65fc799592f3dcac9082680b7d212a5081198d7bb56ca8be3f6