ports/doom: Update and install to /usr/share/games

This commit is contained in:
2026-07-05 00:11:33 +03:00
parent c7eb2dbdf3
commit 15f6158cea
2 changed files with 31 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
NAME='doom'
VERSION='git'
DOWNLOAD_URL="https://github.com/ozkl/doomgeneric.git#5041246e859052e2e258ca6edb4e1e9bbd98fcf5"
DOWNLOAD_URL="https://github.com/ozkl/doomgeneric.git#dcb7a8dbc7a16ce3dda29382ac9aae9d77d21284"
DEPENDENCIES=('sdl2-compat' 'SDL2_mixer' 'timidity')
configure() {
@@ -14,13 +14,13 @@ build() {
wget https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad -O ../doom1.wad || exit 1
fi
CFLAGS='-std=c11' make --directory doomgeneric --file Makefile.sdl CC="$CC" SDL_PATH="$BANAN_SYSROOT/usr/bin/" || exit 1
make -C doomgeneric -f Makefile.sdl CC="$CC" SDL_PATH="$BANAN_SYSROOT/usr/bin/" || exit 1
}
install() {
mkdir -p "$DESTDIR/usr/bin"
cp -vf doomgeneric/doomgeneric "$DESTDIR/usr/bin/doom"
mkdir -p "$DESTDIR/home/user"
cp -vf ../doom1.wad "$DESTDIR/home/user/"
mkdir -p "$DESTDIR/usr/share/games/doom"
cp -vf ../doom1.wad "$DESTDIR/usr/share/games/doom/"
}

View File

@@ -0,0 +1,27 @@
From 42616232560bfa8aacc85828a60dc51cfd176944 Mon Sep 17 00:00:00 2001
From: Oskari Alaranta <oskari.alaranta@bananymous.com>
Date: Sun, 19 Apr 2026 14:32:43 +0300
Subject: [PATCH] Add /usr/share/games/doom as an iwad directory
---
doomgeneric/d_iwad.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doomgeneric/d_iwad.c b/doomgeneric/d_iwad.c
index 508cc61..23b16da 100644
--- a/doomgeneric/d_iwad.c
+++ b/doomgeneric/d_iwad.c
@@ -615,6 +615,10 @@ static void BuildIWADDirList(void)
#else
AddIWADDir (FILES_DIR);
+#ifdef __banan_os__
+ AddIWADDir("/usr/share/games/doom");
+#endif
+
// Don't run this function again.
iwad_dirs_built = true;
--
2.53.0