aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-08-22 18:21:08 +0800
committerdanfe <danfe@FreeBSD.org>2014-08-22 18:21:08 +0800
commit097fc31a8742bd21bb672b6d9525b306c0074fdf (patch)
tree5b8b79e82e9ef159b0ac19bca36ca997647c644c /games
parent6a6d37d37c1f984eb3ccd4c921459bd0e87a141d (diff)
downloadfreebsd-ports-gnome-097fc31a8742bd21bb672b6d9525b306c0074fdf.tar.gz
freebsd-ports-gnome-097fc31a8742bd21bb672b6d9525b306c0074fdf.tar.zst
freebsd-ports-gnome-097fc31a8742bd21bb672b6d9525b306c0074fdf.zip
Unbreak on big-endian architectures (e.g., PowerPC).
Diffstat (limited to 'games')
-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