summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Fix-file-paths.patch39
-rw-r--r--0002-Fix-compilation.patch24
-rw-r--r--PKGBUILD65
4 files changed, 102 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cab4b0ca73c0..2dafab4fc553 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = zdoom-git
pkgdesc = Advanced Doom source port (git version)
- pkgver = 2.9pre+2175+g4f21ff275
+ pkgver = 2.9pre+2176+gd44976175
pkgrel = 1
url = http://www.zdoom.org/
arch = i686
@@ -46,8 +46,12 @@ pkgbase = zdoom-git
conflicts = zdoom
source = zdoom::git+https://github.com/rheit/zdoom.git
source = zdoom.desktop
+ source = 0001-Fix-file-paths.patch
+ source = 0002-Fix-compilation.patch
sha256sums = SKIP
sha256sums = e8932a559baf30ecbfc062546ca014c6dfb70f76d1570549654209d39157e350
+ sha256sums = 02f3da08b3c08be89eeb149fb2be45087ef4a86f5b634e9dac8075c864acc962
+ sha256sums = 09a27450988d259a82b5fa056e1c58c89f57eab287d873af65e39c6d30789a5d
pkgname = zdoom-git
diff --git a/0001-Fix-file-paths.patch b/0001-Fix-file-paths.patch
new file mode 100644
index 000000000000..fae86a743a6b
--- /dev/null
+++ b/0001-Fix-file-paths.patch
@@ -0,0 +1,39 @@
+From e844cd8046f31ea3f6e08e511c5485f46fc14ae8 Mon Sep 17 00:00:00 2001
+From: Jan Cholasta <jan@cholasta.net>
+Date: Sat, 27 May 2023 10:01:55 +0200
+Subject: [PATCH] Fix file paths
+
+---
+ src/gameconfigfile.cpp | 2 --
+ src/sound/music_fluidsynth_mididevice.cpp | 2 +-
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp
+index e6a0f9935..ed7b5cbcd 100644
+--- a/src/gameconfigfile.cpp
++++ b/src/gameconfigfile.cpp
+@@ -129,8 +129,6 @@ FGameConfigFile::FGameConfigFile ()
+ // Arch Linux likes them in /usr/share/doom
+ // Debian likes them in /usr/share/games/doom
+ // I assume other distributions don't do anything radically different
+- SetValueForKey ("Path", "/usr/local/share/doom", true);
+- SetValueForKey ("Path", "/usr/local/share/games/doom", true);
+ SetValueForKey ("Path", "/usr/share/doom", true);
+ SetValueForKey ("Path", "/usr/share/games/doom", true);
+ #endif
+diff --git a/src/sound/music_fluidsynth_mididevice.cpp b/src/sound/music_fluidsynth_mididevice.cpp
+index bbd6536bc..4ba6412fe 100644
+--- a/src/sound/music_fluidsynth_mididevice.cpp
++++ b/src/sound/music_fluidsynth_mididevice.cpp
+@@ -311,7 +311,7 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice(const char *args)
+ {
+ #ifdef __unix__
+ // This is the standard location on Ubuntu.
+- if (0 == LoadPatchSets("/usr/share/sounds/sf2/FluidR3_GS.sf2:/usr/share/sounds/sf2/FluidR3_GM.sf2"))
++ if (0 == LoadPatchSets("/usr/share/soundfonts/FluidR3_GS.sf2:/usr/share/soundfonts/FluidR3_GM.sf2"))
+ {
+ #endif
+ #ifdef _WIN32
+--
+2.40.1
+
diff --git a/0002-Fix-compilation.patch b/0002-Fix-compilation.patch
new file mode 100644
index 000000000000..64db98bb216e
--- /dev/null
+++ b/0002-Fix-compilation.patch
@@ -0,0 +1,24 @@
+From 60637ae7d8daf6d70f7316cb44cd1d76b50be67a Mon Sep 17 00:00:00 2001
+From: Jan Cholasta <jan@cholasta.net>
+Date: Sat, 27 May 2023 10:18:29 +0200
+Subject: [PATCH] Fix compilation
+
+---
+ src/sound/oalsound.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp
+index 53c471a31..5231cb5c7 100644
+--- a/src/sound/oalsound.cpp
++++ b/src/sound/oalsound.cpp
+@@ -42,6 +42,7 @@
+
+ #include <memory>
+ #include <chrono>
++#include <functional>
+
+ #include "except.h"
+ #include "doomstat.h"
+--
+2.40.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 3eb9251ab415..4f3e37a5431e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,7 @@
# Maintainer: Jan Cholasta <grubber at grubber cz>
-_name=zdoom
-pkgname=${_name}-git
-pkgver=2.9pre+2175+g4f21ff275
+pkgname=zdoom-git
+pkgver=2.9pre+2176+gd44976175
pkgrel=1
pkgdesc='Advanced Doom source port (git version)'
arch=('i686' 'x86_64')
@@ -40,44 +39,48 @@ optdepends=('blasphemer-wad: Blasphemer (free Heretic) game data'
'timidity++: Timidity MIDI device'
'urbanbrawl-wad: Urban Brawl: Action Doom 2 game data'
'xorg-xmessage: crash dialog (other)')
-provides=("${_name}")
-conflicts=("${_name}")
-source=("${_name}::git+https://github.com/rheit/${_name}.git"
- "${_name}.desktop")
+provides=('zdoom')
+conflicts=('zdoom')
+source=('zdoom::git+https://github.com/rheit/zdoom.git'
+ 'zdoom.desktop'
+ '0001-Fix-file-paths.patch'
+ '0002-Fix-compilation.patch')
sha256sums=('SKIP'
- 'e8932a559baf30ecbfc062546ca014c6dfb70f76d1570549654209d39157e350')
+ 'e8932a559baf30ecbfc062546ca014c6dfb70f76d1570549654209d39157e350'
+ '02f3da08b3c08be89eeb149fb2be45087ef4a86f5b634e9dac8075c864acc962'
+ '09a27450988d259a82b5fa056e1c58c89f57eab287d873af65e39c6d30789a5d')
pkgver() {
- cd $_name
-
+ cd zdoom
git describe --tags | sed -r 's/-/+/g'
}
-build() {
- cd $_name
+prepare() {
+ cd zdoom
+ patch -i "$srcdir"/0001-Fix-file-paths.patch -p 1
+ patch -i "$srcdir"/0002-Fix-compilation.patch -p 1
+}
- cmake -DCMAKE_BUILD_TYPE=Release \
- -DNO_FMOD=ON \
- -DCMAKE_C_FLAGS="$CFLAGS -DSHARE_DIR=\\\"/usr/share/$_name\\\"" \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS -DSHARE_DIR=\\\"/usr/share/$_name\\\"" \
- -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -Wl,-z,noexecstack" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DINSTALL_PATH=bin \
- -DINSTALL_PK3_PATH=share/$_name \
+build() {
+ cd zdoom
+ mkdir -p build
+ cmake -B build \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D NO_FMOD=ON \
+ -D CMAKE_CXX_FLAGS="$CXXFLAGS -ffile-prefix-map=\"$PWD\"=. -DSHARE_DIR=\\\"/usr/share/zdoom\\\"" \
+ -D CMAKE_EXE_LINKER_FLAGS="$LDFLAGS -Wl,-z,noexecstack" \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -D INSTALL_PATH=bin \
+ -D INSTALL_PK3_PATH=share/zdoom \
.
- make
+ make -C build
}
package() {
- cd $_name
-
- make install DESTDIR="$pkgdir"
-
- desktop-file-install --dir="$pkgdir"/usr/share/applications \
- "$srcdir"/${_name}.desktop
- install -D -m644 src/posix/zdoom.xpm \
- "$pkgdir"/usr/share/icons/hicolor/48x48/apps/${_name}.xpm
-
+ cd zdoom
+ make -C build install DESTDIR="$pkgdir"
install -d "$pkgdir"/usr/share/licenses
- ln -s /usr/share/doc/$_name/licenses "$pkgdir"/usr/share/licenses/$pkgname
+ mv "$pkgdir"/usr/share/doc/zdoom/licenses "$pkgdir"/usr/share/licenses/zdoom
+ desktop-file-install "$srcdir"/zdoom.desktop --dir="$pkgdir"/usr/share/applications
+ install src/posix/zdoom.xpm -D -m 644 "$pkgdir"/usr/share/icons/hicolor/48x48/apps/zdoom.xpm
}