aboutsummaryrefslogtreecommitdiff
path: root/games/doomlegacy
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2014-08-22 10:21:08 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2014-08-22 10:21:08 +0000
commitefc59ad97f183e228d8075f9ceff8f6cc23ac496 (patch)
tree5b8b79e82e9ef159b0ac19bca36ca997647c644c /games/doomlegacy
parentbb2294af880b6e09081a314803f457585d439bd8 (diff)
downloadports-efc59ad97f183e228d8075f9ceff8f6cc23ac496.tar.gz
ports-efc59ad97f183e228d8075f9ceff8f6cc23ac496.zip
Unbreak on big-endian architectures (e.g., PowerPC).
Notes
Notes: svn path=/head/; revision=365632
Diffstat (limited to 'games/doomlegacy')
-rw-r--r--games/doomlegacy/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/games/doomlegacy/Makefile b/games/doomlegacy/Makefile
index 2cfabd09cd8d..cbaedcd42e6c 100644
--- a/games/doomlegacy/Makefile
+++ b/games/doomlegacy/Makefile
@@ -44,6 +44,11 @@ post-patch: .SILENT
# Provide better support for relative paths (for `-iwad' switch)
${REINPLACE_CMD} -e "s|s\[0\] ==[^)]*|strchr(s, '/')|" \
${WRKSRC}/d_main.c
+# Unbreak on big-endian architectures
+ ${REINPLACE_CMD} -e '150s|^|#include "m_swap.h"|' \
+ ${WRKSRC}/p_spec.c
+ ${REINPLACE_CMD} -e '60s|^|#include "m_swap.h"|' \
+ ${WRKSRC}/p_switch.c
.if ! ${PORT_OPTIONS:MIPX}
${REINPLACE_CMD} -e '/USE_IPX/s|define|undef|' ${WRKSRC}/doomdef.h
${REINPLACE_CMD} -e 's| -lipx||' ${WRKSRC}/Makefile