commit d6f312610adff34f61ba04d19de0dcf5f5fbb7a4
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Tue Jul 19 13:53:34 2022 +0100
Updated to latest upstream release, 0.47.05.
.gitignore | 43 ++---------------
6dcfe5ae869fddd51940c6c37a95f7bc639f4389.patch | 66 +++++++++++++++++++++++++
dwarffortress.spec | 67 ++++++++++++++------------
sources | 8 +--
4 files changed, 106 insertions(+), 78 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 15aa323..4ce2d48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,41 +1,4 @@
*.src.rpm
-/0.43.05.zip
-/df_43_05_linux.tar.bz2
-/df_43_05_linux32.tar.bz2
-/dwarffortress-launcher.tar.xz
-/0.44.02.zip
-/df_44_02_linux.tar.bz2
-/df_44_02_linux32.tar.bz2
-/0.44.03.zip
-/df_44_03_linux32.tar.bz2
-/df_44_03_linux.tar.bz2
-/df_44_04_linux.tar.bz2
-/df_44_04_linux32.tar.bz2
-/0.44.04.zip
-/df_44_05_linux.tar.bz2
-/df_44_05_linux32.tar.bz2
-/0.44.05.zip
-/0.44.07.zip
-/df_44_07_linux32.tar.bz2
-/df_44_07_linux.tar.bz2
-/0.44.09.zip
-/df_44_09_linux32.tar.bz2
-/df_44_09_linux.tar.bz2
-/0.44.10.zip
-/df_44_10_linux32.tar.bz2
-/df_44_10_linux.tar.bz2
-/df_44_11_linux32.tar.bz2
-/df_44_11_linux.tar.bz2
-/dwarffortress-libgraphics-0.44.11.zip
-/df_44_12_linux32.tar.bz2
-/df_44_12_linux.tar.bz2
-/dwarffortress-libgraphics-0.44.12.zip
-/df_47_01_linux32.tar.bz2
-/df_47_01_linux.tar.bz2
-/dwarffortress-libgraphics-0.47.01.zip
-/df_47_03_linux32.tar.bz2
-/df_47_03_linux.tar.bz2
-/dwarffortress-libgraphics-0.47.03.zip
-/df_47_04_linux.tar.bz2
-/df_47_04_linux32.tar.bz2
-/dwarffortress-libgraphics-0.47.04.zip
+/dwarffortress-libgraphics-*.zip
+/df_*_linux.tar.bz2
+
diff --git a/6dcfe5ae869fddd51940c6c37a95f7bc639f4389.patch
b/6dcfe5ae869fddd51940c6c37a95f7bc639f4389.patch
new file mode 100644
index 0000000..eb3b45a
--- /dev/null
+++ b/6dcfe5ae869fddd51940c6c37a95f7bc639f4389.patch
@@ -0,0 +1,66 @@
+From 6dcfe5ae869fddd51940c6c37a95f7bc639f4389 Mon Sep 17 00:00:00 2001
+From: Finn Rayment <finn(a)rayment.fr>
+Date: Mon, 1 Feb 2021 19:17:50 +0100
+Subject: [PATCH] Added 0.47.04 bugfix
+
+Fixes audio bug causing segmentation fault and infinite loop on game close as
+described at
https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564
+---
+ g_src/enabler.cpp | 4 ++++
+ g_src/music_and_sound_openal.cpp | 14 +++++++++++---
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/g_src/enabler.cpp b/g_src/enabler.cpp
+index c0cfda8..7db0142 100644
+--- a/g_src/enabler.cpp
++++ b/g_src/enabler.cpp
+@@ -590,6 +590,10 @@ int enablerst::loop(string cmdline) {
+
+ // Clean up graphical resources
+ delete renderer;
++
++ // FIX infinite loop
++ //
https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564
++ return 0;
+ }
+
+ void enablerst::override_grid_size(int x, int y) {
+diff --git a/g_src/music_and_sound_openal.cpp b/g_src/music_and_sound_openal.cpp
+index 1ee0941..75a8177 100644
+--- a/g_src/music_and_sound_openal.cpp
++++ b/g_src/music_and_sound_openal.cpp
+@@ -250,7 +250,9 @@ void musicsoundst::deinitsound() {
+ alDeleteBuffers(1, &buffer);
+ }
+ // Deinit OpenAL
+- alcMakeContextCurrent(NULL);
++ // FIX infinite loop
++ //
https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564
++ //alcMakeContextCurrent(NULL);
+ alcDestroyContext(context);
+ alcCloseDevice(device);
+
+@@ -480,7 +482,10 @@ static bool init_openal() {
+
+ void alEnable( ALenum capability ) { _alEnable(capability); }
+ void alDisable( ALenum capability ) { _alDisable(capability); }
+-ALboolean alIsEnabled( ALenum capability ) { _alIsEnabled(capability); }
++//ALboolean alIsEnabled( ALenum capability ) { _alIsEnabled(capability); }
++// FIX return statement
++//
https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564
++ALboolean alIsEnabled( ALenum capability ) { return _alIsEnabled(capability); }
+ const ALchar* alGetString( ALenum param ) { return _alGetString(param); }
+ void alGetBooleanv( ALenum param, ALboolean* data ) { _alGetBooleanv(param, data); }
+ void alGetIntegerv( ALenum param, ALint* data ) { _alGetIntegerv(param, data); }
+@@ -490,7 +495,10 @@ ALboolean alGetBoolean( ALenum param ) { return
_alGetBoolean(param); }
+ ALint alGetInteger( ALenum param ) { return _alGetInteger(param); }
+ ALfloat alGetFloat( ALenum param ) { return _alGetFloat(param); }
+ ALdouble alGetDouble( ALenum param ) { return _alGetDouble(param); }
+-ALenum alGetError( void ) { _alGetError(); }
++//ALenum alGetError( void ) { _alGetError(); }
++// FIX return statement
++//
https://www.bay12games.com/dwarves/mantisbt/view.php?id=11564
++ALenum alGetError( void ) { return _alGetError(); }
+ ALboolean alIsExtensionPresent( const ALchar* extname ) { return
_alIsExtensionPresent(extname); }
+ void* alGetProcAddress( const ALchar* fname ) { return _alGetProcAddress(fname); }
+ ALenum alGetEnumValue( const ALchar* ename ) { return _alGetEnumValue(ename); }
diff --git a/dwarffortress.spec b/dwarffortress.spec
index 6ef1d77..32f4fff 100644
--- a/dwarffortress.spec
+++ b/dwarffortress.spec
@@ -4,8 +4,8 @@
%global __strip /bin/true
Name: dwarffortress
-Version: 0.47.04
-Release: 6%{?dist}
+Version: 0.47.05
+Release: 1%{?dist}
Summary: A single-player procedurally generated fantasy game
@@ -13,27 +13,29 @@ License: Dwarf Fortress
URL:
http://www.bay12games.com/dwarves/
# Due to pre-compiled stuff, there is a separate 32 and 64 bit architecture.
-Source0:
http://www.bay12games.com/dwarves/df_47_04_linux.tar.bz2
-Source1:
http://www.bay12games.com/dwarves/df_47_04_linux32.tar.bz2
+Source0:
http://www.bay12games.com/dwarves/df_47_05_linux.tar.bz2
# The libgraphics sources, as maintained by the Arch Linux packager.
-Source2:
https://github.com/svenstaro/dwarf_fortress_unfuck/archive/%{version}/dwa...
+Source1:
https://github.com/svenstaro/dwarf_fortress_unfuck/archive/%{version}/dwa...
# Desktop file.
-Source3: dwarffortress.desktop
+Source2: dwarffortress.desktop
# Appstream file.
-Source4: dwarffortress.appdata.xml
+Source3: dwarffortress.appdata.xml
# Launcher script.
-Source5: dwarffortress
+Source4: dwarffortress
# Icon.
-Source6: dwarffortress.png
+Source5: dwarffortress.png
+
+#
https://github.com/svenstaro/dwarf_fortress_unfuck/commit/6dcfe5ae869fddd...
+Patch0: 6dcfe5ae869fddd51940c6c37a95f7bc639f4389.patch
# Only build for 32 and 64 bit x86 systems.
# (According to kwizart, just use i686 here).
-ExclusiveArch: x86_64 i686
+ExclusiveArch: x86_64
# BuildRequires from
https://github.com/svenstaro/dwarf_fortress_unfuck/
BuildRequires: automake
@@ -80,31 +82,26 @@ have already been implemented.
Dwarf Fortress is free to redistribute, but is not open source.
%prep
-# Extract the 'sources' into the build directory.
-# This is architecture-dependent, because upstream distributes two tarballs.
-%ifarch x86_64
tar xfj %SOURCE0
-%else
-tar xfj %SOURCE1
-%endif
# Extract other sources.
cd df_linux/
-unzip -qo %SOURCE2
+unzip -qo %SOURCE1
# Fix some permissions.
find -type d -exec chmod 755 {} +
find -type f -exec chmod 644 {} +
dos2unix *.txt
-%build
-cd df_linux/
cd dwarf_fortress_unfuck*
-mkdir -p build && cd build
+%patch0 -p1
+
+%build
+cd df_linux/dwarf_fortress_unfuck*
# Something in the default make flags prevents dfhack from linking to DF.
-cmake ..
-%make_build
+%cmake -DOpenGL_GL_PREFERENCE=GLVND
+%cmake_build
%install
cd df_linux/
@@ -114,32 +111,38 @@ cp -ra data raw sdl %{buildroot}%{_datadir}/dwarffortress/
# Copy over the actual binary and compiled graphics library.
install -p -Dm755 libs/Dwarf_Fortress
%{buildroot}%{_libexecdir}/dwarffortress/Dwarf_Fortress
-install -p -Dm755 dwarf_fortress_unfuck*/build/libgraphics.so
%{buildroot}%{_libexecdir}/dwarffortress/libgraphics.so
+install -p -Dm755 dwarf_fortress_unfuck*/%{_vpath_builddir}/libgraphics.so
%{buildroot}%{_libexecdir}/dwarffortress/libgraphics.so
strip %{buildroot}%{_libexecdir}/dwarffortress/libgraphics.so
# Install .desktop file and launcher script from Arch Linux package.
# Or, rather, the modified versions.
-install -p -Dm755 %SOURCE5 %{buildroot}%{_bindir}/dwarffortress
+install -p -Dm755 %SOURCE4 %{buildroot}%{_bindir}/dwarffortress
sed 's|prefix=/usr|prefix=%{_prefix}|' -i %{buildroot}%{_bindir}/dwarffortress
-install -p -Dm644 %SOURCE3 %{buildroot}%{_datadir}/applications/dwarffortress.desktop
-install -p -Dm644 %SOURCE6 %{buildroot}%{_datadir}/pixmaps/dwarffortress.png
+install -p -Dm644 %SOURCE2 %{buildroot}%{_datadir}/applications/dwarffortress.desktop
+install -p -Dm644 %SOURCE5 %{buildroot}%{_datadir}/pixmaps/dwarffortress.png
desktop-file-validate %{buildroot}%{_datadir}/applications/dwarffortress.desktop
# Install appdata file and validate it.
-mkdir -p %{buildroot}%{_datadir}/appdata
-cp -a %SOURCE4 %{buildroot}%{_datadir}/appdata/
-appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
+mkdir -p %{buildroot}%{_metainfodir}/
+cp -a %SOURCE3 %{buildroot}%{_metainfodir}/
+appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
%files
%doc df_linux/*.txt df_linux/README.linux
-%{_datadir}/dwarffortress
-%{_libexecdir}/dwarffortress
+%{_datadir}/dwarffortress/
+%{_libexecdir}/dwarffortress/
%{_bindir}/dwarffortress
%{_datadir}/applications/dwarffortress.desktop
%{_datadir}/pixmaps/dwarffortress.png
-%{_datadir}/appdata/dwarffortress.appdata.xml
+%{_metainfodir}/dwarffortress.appdata.xml
%changelog
+* Tue Jul 19 2022 Leigh Scott <leigh123linux(a)gmail.com> - 0.47.05-1
+- Updated to latest upstream release, 0.47.05.
+- Apply upstream fix for rfbz#6368
+- Use cmake macros
+- Remove i686 support
+
* Mon Feb 28 2022 Sérgio Basto <sergio(a)serjux.com> - 0.47.04-6
- Rebuid for glew-2.2.0
diff --git a/sources b/sources
index 7a81027..7ce55f5 100644
--- a/sources
+++ b/sources
@@ -1,6 +1,2 @@
-SHA512 (df_47_03_linux32.tar.bz2) =
76e841b86c699479833a044552ec902632420896f3618034a76f7a86b4d5a47073fa4c35a0ccecc246e44abe5500dfc9aa153d109a039e5a07546c58770468fa
-SHA512 (df_47_03_linux.tar.bz2) =
a7122fb1f5433200f43344f7f905494184ba916d0316cd0bfde1f2d4f11685ec2e0bad0276b169ca34b4fb0774d62e6d1e03060c2d6ef79140ced62cba1fac95
-SHA512 (dwarffortress-libgraphics-0.47.03.zip) =
ddd8bcdd7b94197755e13979925267f1d597c412ec138cc29a094c986453285a3a30369369e989e523e9ec4b0e6d177330604e59296eb026869573ca7e57e7b5
-SHA512 (df_47_04_linux.tar.bz2) =
65f6cd39187afbb7b60ba72d0caf23c39d95674615ab718ad55c25cad23c08e42c1b911cfde7015b05a280325504f3b931f2c7defb34ee2ee6b725101c536cea
-SHA512 (df_47_04_linux32.tar.bz2) =
d76286957ed3f1e677519c45b9644463e45c07c226ce3200f2db6a776396e77fc8aa3f5fdd697fdbde5efa49b7d0dce47b98dfe0a880b666e227ccb8b288a6c0
-SHA512 (dwarffortress-libgraphics-0.47.04.zip) =
25e5386a1165786dc777d17ea6dd6eefb4fdc7c9d0677c1cd683468d8656ef093b89f84927a7df8ea9c1941e67b018e1cb95abf29f38782b0bf6289eab284529
+SHA512 (df_47_05_linux.tar.bz2) =
9ea46fa12a80266cd09363f1aea8cdd059a5ebeefb453c4a46ffbb1115486409003c3caca95a1b6010da4040d04b781182c59e57a6cc033cd7de4507299f7534
+SHA512 (dwarffortress-libgraphics-0.47.05.zip) =
fd0eff0c86b943a6601c07aa867f17d3f55514a72215e91a8017465e03ed934b07ee72906ccbe6d6ecaf982f8b814d7dfcc222975abb7f70b72edf2583c25b6d