From miwi@miwi.homeunix.com  Tue Oct  2 15:52:21 2007
Return-Path: <miwi@miwi.homeunix.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40F3316A496
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  2 Oct 2007 15:52:21 +0000 (UTC)
	(envelope-from miwi@miwi.homeunix.com)
Received: from miwi.homeunix.com (dslb-082-083-155-037.pools.arcor-ip.net [82.83.155.37])
	by mx1.freebsd.org (Postfix) with ESMTP id DA78613C45A
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  2 Oct 2007 15:52:20 +0000 (UTC)
	(envelope-from miwi@miwi.homeunix.com)
Received: by miwi.homeunix.com (Postfix, from userid 1010)
	id 746322E114; Tue,  2 Oct 2007 17:52:19 +0200 (CEST)
Message-Id: <20071002155219.746322E114@miwi.homeunix.com>
Date: Tue,  2 Oct 2007 17:52:19 +0200 (CEST)
From: Martin Wilke <miwi@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: edwin@mavetju.org
Subject: [PATCH] games/einstein: Fix build with AMD64/GCC4.2
X-Send-Pr-Version: 3.113
X-GNATS-Notify: edwin@mavetju.org

>Number:         116832
>Category:       ports
>Synopsis:       [PATCH] games/einstein: Fix build with AMD64/GCC4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    edwin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 02 16:00:08 GMT 2007
>Closed-Date:    Tue Oct 02 21:53:51 GMT 2007
>Last-Modified:  Tue Oct 02 21:53:51 GMT 2007
>Originator:     Martin Wilke
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD miwi.homeunix.com 7.0-CURRENT FreeBSD 7.0-CURRENT #305: Fri Sep 28 12:07:59 CEST 2007
>Description:
- Unbreak
- Fix build with AMD64 and GCC4.2

Tindy tested:
i386
http://head.miwibox.org/tb/index.php?action=describe_port&id=2162
amd64
http://amd64.miwibox.org/tb/index.php?action=describe_port&id=1603

Added file(s):
- files/patch-formatter.cpp

Port maintainer (edwin@mavetju.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- einstein-2.0_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/games/einstein/Makefile,v
retrieving revision 1.8
diff -u -u -r1.8 Makefile
--- Makefile	2 Oct 2007 10:37:26 -0000	1.8
+++ Makefile	2 Oct 2007 14:08:46 -0000
@@ -18,15 +18,7 @@
 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>
Index: files/patch-formatter.cpp
===================================================================
RCS file: files/patch-formatter.cpp
diff -N files/patch-formatter.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-formatter.cpp	2 Oct 2007 15:30:55 -0000
@@ -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;
--- einstein-2.0_2.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->edwin 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Oct 2 16:00:18 UTC 2007 
Responsible-Changed-Why:  
edwin@mavetju.org => edwin@ 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116832 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Oct 2 16:00:34 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116832 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/116832: commit references a PR
Date: Tue,  2 Oct 2007 21:39:34 +0000 (UTC)

 edwin       2007-10-02 21:39:28 UTC
 
   FreeBSD ports repository
 
   Modified files:
     games/einstein       Makefile 
   Added files:
     games/einstein/files patch-formatter.cpp 
   Log:
   [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>
   
   Revision  Changes    Path
   1.9       +2 -10     ports/games/einstein/Makefile
   1.1       +31 -0     ports/games/einstein/files/patch-formatter.cpp (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: edwin 
State-Changed-When: Tue Oct 2 21:53:29 UTC 2007 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116832 
>Unformatted:
