aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/cake/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/games/cake/Makefile b/games/cake/Makefile
index a0cb7749cd5e..428ce52b3dec 100644
--- a/games/cake/Makefile
+++ b/games/cake/Makefile
@@ -3,7 +3,7 @@
PORTNAME= cake
PORTVERSION= 2005.12.26
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= games
MASTER_SITES= http://freebsd.nsu.ru/distfiles/
DISTNAME= ${PORTNAME}_src_${PORTVERSION:S/.//g}
@@ -39,6 +39,15 @@ post-patch: .SILENT
${WRKSRC}/cake/sound.h
# Use traditional mapping for console key (tilde)
${REINPLACE_CMD} -e 's/167/96/' ${WRKSRC}/main.cpp
+# Avoid segmentation fault on amd64 (uninitialized memory access)
+ ${REINPLACE_CMD} -e '1281s:Recalculate_NLines()://&:' \
+ ${WRKSRC}/cake/console.cpp
+# The code assumes that sizeof(long) == 4 in too many places :(
+ ${REINPLACE_CMD} -e '/typedef/s/ long//' ${WRKSRC}/cake/files.h
+ ${REINPLACE_CMD} -e '/typedef/s/long/int/' ${WRKSRC}/cake/types.h
+ ${REINPLACE_CMD} -e 's/unsigned long/DWORD/' ${WRKSRC}/cake/system.h
+ ${REINPLACE_CMD} -e 's/unsigned long/unsigned int/' \
+ ${WRKSRC}/cake/zip/Crc32.h ${WRKSRC}/cake/zip/Unzip.h
# Fixes for GCC 4.x and Clang 4.0
${REINPLACE_CMD} -e 's/Mat3x2:://' ${WRKSRC}/cake/math.h
${REINPLACE_CMD} -e '2852s/numverts/&[0]/' ${WRKSRC}/cake/q3bsp.cpp