aboutsummaryrefslogtreecommitdiffstats
path: root/games/einstein
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2007-10-03 05:39:28 +0800
committeredwin <edwin@FreeBSD.org>2007-10-03 05:39:28 +0800
commitcd304a4f1c5840c2f6dc250c4864322d2183b479 (patch)
treee3553d0c6f58127c16e2427abb30b0050a8a9f7a /games/einstein
parent0dc11bd7e607933d69c6701f8600730e28e01c40 (diff)
downloadfreebsd-ports-gnome-cd304a4f1c5840c2f6dc250c4864322d2183b479.tar.gz
freebsd-ports-gnome-cd304a4f1c5840c2f6dc250c4864322d2183b479.tar.zst
freebsd-ports-gnome-cd304a4f1c5840c2f6dc250c4864322d2183b479.zip
[PATCH] games/einstein: Fix build with AMD64/GCC4.2
- Unbreak - Fix build with AMD64 and GCC4.2 PR: ports/116832 Submitted by: Martin Wilke <miwi@FreeBSD.org>
Diffstat (limited to 'games/einstein')
-rw-r--r--games/einstein/Makefile12
-rw-r--r--games/einstein/files/patch-formatter.cpp31
2 files changed, 33 insertions, 10 deletions
diff --git a/games/einstein/Makefile b/games/einstein/Makefile
index 52164a16661d..6988ac1a33f3 100644
--- a/games/einstein/Makefile
+++ b/games/einstein/Makefile
@@ -7,7 +7,7 @@
PORTNAME= einstein
PORTVERSION= 2.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= http://games.flowix.com/files/einstein/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
@@ -18,15 +18,7 @@ COMMENT= Remake of old DOS game Sherlock, which was inspired by Albert Einstein'
USE_SDL= sdl ttf mixer
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
-BROKEN= Does not compile with GCC 4.2
-.endif
-.endif
-
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/einstein/files/patch-formatter.cpp b/games/einstein/files/patch-formatter.cpp
new file mode 100644
index 000000000000..0507fbd646a2
--- /dev/null
+++ b/games/einstein/files/patch-formatter.cpp
@@ -0,0 +1,31 @@
+diff -urN einstein-2.0.orig/formatter.cpp einstein-2.0/formatter.cpp
+--- formatter.cpp 2005-08-13 22:40:58.000000000 -0400
++++ formatter.cpp 2006-08-15 11:18:28.000000000 -0400
+@@ -58,7 +58,7 @@
+ if ((c.type == INT_ARG) || (c.type == STRING_ARG) ||
+ (c.type == FLOAT_ARG) || (c.type == DOUBLE_ARG))
+ {
+- int no = (int)c.data;
++ long int no = (long int)c.data;
+ args[no - 1] = c.type;
+ }
+ }
+@@ -123,7 +123,7 @@
+ std::wstring Formatter::format(std::vector<ArgValue*> &argValues) const
+ {
+ std::wstring s;
+- int no;
++ long int no;
+
+ for (int i = 0; i < commandsCnt; i++) {
+ Command *cmd = &commands[i];
+@@ -135,8 +135,8 @@
+
+ case STRING_ARG:
+ case INT_ARG:
+- no = (int)cmd->data - 1;
+- if (no < (int)argValues.size())
++ no = (long int)cmd->data - 1;
++ if (no < (long int)argValues.size())
+ s += argValues[no]->format(cmd);
+ break;