summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2013-06-30 11:00:08 -0300
committerErik Hanson <erik@slackbuilds.org>2013-07-02 16:06:51 -0500
commit7ad32b6c040691b6a049a98ce49f32aadde26c20 (patch)
treee94156ef205963b10553de360bc09394176874ae /games
parent2db11e1838e0c066b2bef216ac9c7254e4201afe (diff)
downloadslackbuilds-7ad32b6c040691b6a049a98ce49f32aadde26c20.tar.gz
games/odamex: Updated for version 0.6.3.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/odamex/README13
-rw-r--r--games/odamex/gcc47.diff11
-rw-r--r--games/odamex/odamex.SlackBuild65
-rw-r--r--games/odamex/odamex.info6
-rw-r--r--games/odamex/waddir.diff22
5 files changed, 54 insertions, 63 deletions
diff --git a/games/odamex/README b/games/odamex/README
index e984c55542..e93a1299bf 100644
--- a/games/odamex/README
+++ b/games/odamex/README
@@ -6,12 +6,21 @@ To hear in-game music, install either eawpats or freepats.
You'll also need the game data (WAD file) from one of the following:
-Shareware Doom v1.9 (DOOM1.WAD)
+Shareware Doom v1.9 (DOOM1.WAD, aka 'doom_shareware_data' SBo build)
Ultimate Doom v1.9 (DOOM.WAD)
Doom II v1.9 (DOOM2.WAD)
Final Doom: TNT Evilution v1.9 (TNT.WAD)
Final Doom: The Plutonia Experiment v1.9 (PLUTONIA.WAD)
-FreeDoom v0.6.2 (FREEDOOM.WAD)
+FreeDoom >=0.6.2 (FREEDOOM.WAD aka 'freedoom' SBo build)
Place the WAD file(s) in /usr/share/games/doom. The filenames can be
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/gcc47.diff b/games/odamex/gcc47.diff
deleted file mode 100644
index 880f5426b5..0000000000
--- a/games/odamex/gcc47.diff
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur odamex-src-0.5.6/odalpapi/net_io.cpp odamex-src-0.5.6.patched/odalpapi/net_io.cpp
---- odamex-src-0.5.6/odalpapi/net_io.cpp 2011-11-04 23:59:42.000000000 -0400
-+++ odamex-src-0.5.6.patched/odalpapi/net_io.cpp 2012-09-20 02:19:30.000000000 -0400
-@@ -27,6 +27,7 @@
- #include <iostream>
- #include <sstream>
- #include <cstdio>
-+#include <unistd.h>
- #include <cstdlib>
- #include <cstring>
- #include <cstdarg>
diff --git a/games/odamex/odamex.SlackBuild b/games/odamex/odamex.SlackBuild
index 7bcdc256bb..278f0869d8 100644
--- a/games/odamex/odamex.SlackBuild
+++ b/games/odamex/odamex.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Slackware build script for odamex
@@ -7,8 +7,8 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=odamex
-VERSION=${VERSION:-0.5.6}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.6.3}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -38,6 +38,11 @@ else
LIBDIRSUFFIX=""
fi
+# This is a dirty hack that should let odalaunch compile with versions of
+# wx(GTK|Python) 2.8.x where x < 12. Uncomment the following line and
+# cross your fingers:
+#SLKCFLAGS="$SLKCFLAGS -DwxIntPtr=long"
+
set -e
rm -rf $PKG
@@ -53,29 +58,39 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-sed -i "s/-g -Wall -O2/$SLKCFLAGS/" Makefile
-
-patch -p1 < $CWD/gcc47.diff
-
-# N.B. we want the game to look in /usr/share/games/doom for wad files,
-# to match the already-existing zdoom and prboom slackbuilds. Makefile
-# adds the /doom part to RESDIR itself. The patch adds this dir to the
-# default wad search path (otherwise we have to always run the game with
-# the -waddir option).
-
-patch -p1 < $CWD/waddir.diff
-
-make INSTALLDIR=/usr/games RESDIR=/usr/share/games
-make install INSTALLDIR=$PKG/usr/games RESDIR=$PKG/usr/share/games
-strip $PKG/usr/games/*
+# Make the game look in /usr/share/games/doom for wad files,
+# like the already-existing zdoom, prboom, gzdoom builds.
+sed -i 's,getenv("HOME"),"/usr/share/games/doom",' common/d_main.cpp
+
+# 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
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+cd ..
+
+# cmake-based odamex lacks a 'make install' target, do it manually.
+mkdir -p $PKG/usr/games
+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
+install -m0644 $PRGNAM.wad $PKG/usr/share/games/doom
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/tech
-
-# The distributed docs are DOS CRLF text files, and they're executable. Ugh.
-for doc in CHANGELOG LICENSE MAINTAINERS README TODO odasrv.cfg; do
- sed 's/\r//' < $doc > $PKG/usr/doc/$PRGNAM-$VERSION/$doc
-done
-mv $PKG/usr/doc/$PRGNAM-$VERSION/odasrv.cfg $PKG/usr/doc/$PRGNAM-$VERSION/odasrv.cfg.sample
+cp -a CHANGELOG LICENSE MAINTAINERS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cat odasrv.cfg > $PKG/usr/doc/$PRGNAM-$VERSION/odasrv.cfg.sample
install -m0644 doc/tech/* $PKG/usr/doc/$PRGNAM-$VERSION/tech
# Man page created for this slackbuild
@@ -83,7 +98,7 @@ mkdir -p $PKG/usr/man/man6
gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
# Desktop stuff
-mkdir -p $PKG/usr/share/{applications,pixmaps}
+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,' \
< installer/arch/$exe.desktop \
diff --git a/games/odamex/odamex.info b/games/odamex/odamex.info
index 5b0e4a30fa..d639a5c152 100644
--- a/games/odamex/odamex.info
+++ b/games/odamex/odamex.info
@@ -1,8 +1,8 @@
PRGNAM="odamex"
-VERSION="0.5.6"
+VERSION="0.6.3"
HOMEPAGE="http://odamex.net/"
-DOWNLOAD="http://downloads.sourceforge.net/odamex/odamex-src-0.5.6.tar.bz2"
-MD5SUM="acc6aeac1ae9e4cd3504400a3a17178f"
+DOWNLOAD="http://downloads.sourceforge.net/odamex/odamex-src-0.6.3.tar.bz2"
+MD5SUM="8a6e32608ac95ac3cde93e06190436e6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="wxPython"
diff --git a/games/odamex/waddir.diff b/games/odamex/waddir.diff
deleted file mode 100644
index ea82a16778..0000000000
--- a/games/odamex/waddir.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -Naur odamex-src-0.5.6/client/src/d_main.cpp odamex-src-0.5.6.patched//client/src/d_main.cpp
---- odamex-src-0.5.6/client/src/d_main.cpp 2011-11-05 00:00:05.000000000 -0400
-+++ odamex-src-0.5.6.patched//client/src/d_main.cpp 2011-12-23 07:23:12.000000000 -0500
-@@ -845,6 +845,7 @@
- D_AddSearchDir(dirs, getenv("DOOMWADPATH"), separator);
- D_AddSearchDir(dirs, getenv("HOME"), separator);
- D_AddSearchDir(dirs, waddirs.cstring(), separator);
-+ D_AddSearchDir(dirs, "/usr/share/games/doom", separator);
-
- dirs.erase(std::unique(dirs.begin(), dirs.end()), dirs.end());
-
-diff -Naur odamex-src-0.5.6/server/src/d_main.cpp odamex-src-0.5.6.patched//server/src/d_main.cpp
---- odamex-src-0.5.6/server/src/d_main.cpp 2011-11-04 23:59:48.000000000 -0400
-+++ odamex-src-0.5.6.patched//server/src/d_main.cpp 2011-12-23 07:22:56.000000000 -0500
-@@ -629,6 +629,7 @@
- D_AddSearchDir(dirs, getenv("DOOMWADPATH"), separator);
- D_AddSearchDir(dirs, getenv("HOME"), separator);
- D_AddSearchDir(dirs, waddirs.cstring(), separator);
-+ D_AddSearchDir(dirs, "/usr/share/games/doom", separator);
-
-
- dirs.erase(std::unique(dirs.begin(), dirs.end()), dirs.end());