summaryrefslogtreecommitdiffstats
path: root/games/odamex
diff options
context:
space:
mode:
author B. Watson2021-10-28 10:44:35 +0200
committer Willy Sudiarto Raharjo2021-10-29 12:07:25 +0200
commitc470017001ac8abf94220abbfa51c1809866f267 (patch)
tree94d9ba1f32985b9dd687652a2b83a7947f6034e2 /games/odamex
parent16f3196e369dfafcc57fd86ee22204a0f9293c63 (diff)
downloadslackbuilds-c470017001ac8abf94220abbfa51c1809866f267.tar.gz
games/odamex: Updated for version 0.9.5.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/odamex')
-rw-r--r--games/odamex/README24
-rw-r--r--games/odamex/odamex.SlackBuild75
-rw-r--r--games/odamex/odamex.info10
3 files changed, 65 insertions, 44 deletions
diff --git a/games/odamex/README b/games/odamex/README
index b97c5c769a..0305146680 100644
--- a/games/odamex/README
+++ b/games/odamex/README
@@ -1,14 +1,17 @@
+odamex: odamex (Online Doom Multiplayer Experience)
+
Odamex (Online Doom Multiplayer Experience) is a modification of DOOM
-to allow players to compete with each other over the Internet using the
-client/server architecture.
+to allow players to compete with each other over the Internet using
+the client/server architecture.
-To hear in-game music, install either eawpats or freepats, and make sure
-the Options -> Sound Options -> MIDI System Backend option is set to
-"SDL Mixer".
+To hear in-game music, install either eawpats or freepats, and make
+sure the Options -> Sound Options -> MIDI System Backend option is
+set to "SDL Mixer" [note: music not working in -current as of October
+2021].
-Optional dependency: If portmidi is installed, odamex will be built with
-it. This allows odamex's in-game music to be directed to a separate MIDI
-synthesizer application, or a hardware MIDI synth.
+Optional dependency: If portmidi is installed, odamex will be built
+with it. This allows odamex's in-game music to be directed to a
+separate MIDI synthesizer application, or a hardware MIDI synth.
You'll also need the game data (WAD file) from one of the following:
@@ -25,8 +28,3 @@ all lowercase (doom.wad) or all uppercase (DOOM.WAD).
Optional dependency: miniupnpc (auto-detected at build time). This
adds support for UPnP to odasrv (the odamex server). It has no effect
on odamex (the client) or odalaunch (the launcher).
-
-Note: If you get compile errors relating to wxIntPtr not being defined,
-upgrade your wxPython or wxGTK package to at least version 2.8.12.0. If
-for some reason you don't want to do this, see the comments in the
-SlackBuild for a dirty hack that might work instead.
diff --git a/games/odamex/odamex.SlackBuild b/games/odamex/odamex.SlackBuild
index f27541e689..f11f34eb62 100644
--- a/games/odamex/odamex.SlackBuild
+++ b/games/odamex/odamex.SlackBuild
@@ -6,6 +6,9 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211028 bkw: update for v0.9.5.
+# - had to switch to SDL 1 to avoid SDL2_Mixer-related segfaults.
+# unfortunately I can't get the music to work with SDL 1...
# 20201024 bkw: update for v0.8.3.
# 20191201 bkw: update for v0.8.1.
@@ -24,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=odamex
-VERSION=${VERSION:-0.8.3}
+VERSION=${VERSION:-0.9.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -80,28 +83,31 @@ rm -rf $PRGNAM-src-$VERSION
tar xvf $CWD/$PRGNAM-src-$VERSION.tar.bz2
cd $PRGNAM-src-$VERSION
chown -R root:root .
-find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
- \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# Every file in 0.9.5 is +x, and none of them need to be!
+# Do not revert to template.
+find . -type f -exec chmod 644 {} \+
+find . -type d -exec chmod 755 {} \+
# Make the launcher look in /usr/games for the odamex binary rather
# than the current directory. User can override with the settings
# dialog, this just sets the default.
-sed -i \
- '/launchercfg_s.odamex_directory *= */s,wxGetCwd(),wxString::FromAscii("/usr/games"),' \
- odalaunch/src/dlg_main.cpp
+sed -i 's,OdaGetInstallDir(),"/usr/games",g' \
+ odalaunch/src/dlg_main.cpp \
+ odalaunch/src/dlg_config.cpp
-# 20201024 bkw: Not sure why make is exiting with nonzero status after
-# linking odalaunch. There are no error messages. Adding "-i" to the
-# make command line is a band-aid for this.
+rm -rf build
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_BINDIR=games \
-DwxWidgets_CONFIG_EXECUTABLE=$WXCONFIG \
+ -DUSE_SDL12=ON \
-DCMAKE_BUILD_TYPE=Release ..
- make -i VERBOSE=1
+ make VERBOSE=1
cd ..
# cmake-based odamex lacks a 'make install' target, do it manually.
@@ -111,32 +117,47 @@ install -s -m0755 build/client/$PRGNAM $PKG/usr/games
install -s -m0755 build/server/odasrv $PKG/usr/games
install -s -m0755 build/odalaunch/odalaunch $PKG/usr/games
-mkdir -p $PKG/usr/share/games/doom
-
-# wad file has moved in the source tree, accomodate either version
-WAD="$PRGNAM.wad"
-[ -e "wad/$PRGNAM.wad" ] && WAD="wad/$PRGNAM.wad"
-install -m0644 $WAD $PKG/usr/share/games/doom
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/tech
-cp -a CHANGELOG LICENSE MAINTAINERS README $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/odasrv.cfg > $PKG/usr/doc/$PRGNAM-$VERSION/odasrv.cfg.sample
-install -m0644 documentation/tech/* $PKG/usr/doc/$PRGNAM-$VERSION/tech
-
# Man page created for this slackbuild
-mkdir -p $PKG/usr/man/man6
-gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
+MANDIR=$PKG/usr/man/man6
+mkdir -p $MANDIR
+gzip -9c < $CWD/$PRGNAM.6 > $MANDIR/$PRGNAM.6.gz
+for i in odasrv odalaunch; do
+ ln -s $PRGNAM.6.gz $MANDIR/$i.6.gz
+done
# Desktop stuff
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
for exe in $PRGNAM odasrv odalaunch; do
- sed -e '/^Encoding/d' -e 's,/usr/share/doom,/usr/share/games/doom,' \
+ # make these validate and call the correct binary
+ sed -e '/^Encoding/d' -e 's, -waddir.*,,' -e 's,Exec=,&/usr/games/,' \
< installer/arch/$exe.desktop \
> $PKG/usr/share/applications/$exe.desktop
- cat media/icon_${exe}_512.png > $PKG/usr/share/pixmaps/$exe.png
+
+ # use upstream's icons
+ for i in media/icon_${exe}_*.png; do
+ px=$( basename $i | cut -d. -f1 | cut -d_ -f3 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$exe.png
+ done
+
+ # make old-school icon, too
+ convert -resize 48x48 media/icon_${exe}_512.png $PKG/usr/share/pixmaps/$exe.png
done
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20211027 bkw: In 0.9.5, upstream doesn't ship the wad. It expects
+# to build it using deutex. Easier to use a prebuilt one, from their
+# windows package.
+WADDIR=$PKG/usr/share/games/doom
+mkdir -p $WADDIR
+unzip -p $CWD/$PRGNAM-win32-$VERSION.zip $PRGNAM.wad > $WADDIR/$PRGNAM.wad
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CHANGELOG LICENSE MAINTAINERS README.md documentation/tech $PKGDOC
+cat $CWD/odasrv.cfg > $PKGDOC/odasrv.cfg.sample
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/games/odamex/odamex.info b/games/odamex/odamex.info
index 2da96d07f2..30e02d3f8c 100644
--- a/games/odamex/odamex.info
+++ b/games/odamex/odamex.info
@@ -1,8 +1,10 @@
PRGNAM="odamex"
-VERSION="0.8.3"
-HOMEPAGE="http://odamex.net/"
-DOWNLOAD="http://downloads.sourceforge.net/odamex/odamex-src-0.8.3.tar.bz2"
-MD5SUM="c096604173a0d48946f877483520dec1"
+VERSION="0.9.5"
+HOMEPAGE="https://odamex.net/"
+DOWNLOAD="https://downloads.sourceforge.net/odamex/odamex-src-0.9.5.tar.bz2 \
+ https://downloads.sourceforge.net/odamex/odamex-win32-0.9.5.zip"
+MD5SUM="2facffaf15bc2892aafd74a0630f9ee0 \
+ 2e53f5a238a032439ee83504607206f7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="wxGTK3"