games/odamex: Fix for gcc-4.7.x.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
B. Watson 2012-09-21 06:41:11 +02:00 committed by Robby Workman
parent 8a92061525
commit 4bd9ab40ea
2 changed files with 14 additions and 1 deletions

11
games/odamex/gcc47.diff Normal file
View file

@ -0,0 +1,11 @@
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>

View file

@ -6,7 +6,7 @@
PRGNAM=odamex
VERSION=${VERSION:-0.5.6}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -53,6 +53,8 @@ find . \
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