From jre@vineyard.net  Sat Mar  6 23:36:56 2004
Return-Path: <jre@vineyard.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1A80316A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  6 Mar 2004 23:36:56 -0800 (PST)
Received: from mail.vineyard.net (k1.vineyard.net [204.17.195.90])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 91A0743D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  6 Mar 2004 23:36:55 -0800 (PST)
	(envelope-from jre@vineyard.net)
Received: from localhost (loopback [127.0.0.1])
	by mail.vineyard.net (Postfix) with ESMTP id 5CA329827E
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Mar 2004 02:34:20 -0500 (EST)
Received: from mail.vineyard.net ([127.0.0.1])
 by localhost (king1.vineyard.net [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 84399-06 for <FreeBSD-gnats-submit@freebsd.org>;
 Sun,  7 Mar 2004 02:34:20 -0500 (EST)
Received: from jade.elsasser.org (loopback [127.0.0.1])
	by mail.vineyard.net (Postfix) with ESMTP id A3B2298359
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Mar 2004 02:34:18 -0500 (EST)
Received: from jade.elsasser.org (localhost [127.0.0.1])
	by jade.elsasser.org (Postfix) with ESMTP id 5003A93
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Mar 2004 02:34:17 -0500 (EST)
Message-Id: <1078644857.0@jade.elsasser.org>
Date: Sun, 7 Mar 2004 02:34:17 -0500
From: "Josh Elsasser" <jre@vineyard.net>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: [patch] games/heroes: fix build on alpha (hopefully)
X-Send-Pr-Version: gtk-send-pr 0.3.3 
X-GNATS-Notify:

>Number:         63866
>Category:       ports
>Synopsis:       [patch] games/heroes: fix build on alpha (hopefully)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 06 23:40:19 PST 2004
>Closed-Date:    Fri Mar 12 21:38:22 PST 2004
>Last-Modified:  Fri Mar 12 21:38:22 PST 2004
>Originator:     Josh Elsasser
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 5.2-CURRENT #11: Sat Feb  7 15:09:05 EST 2004
    joshe@jade.elsasser.org:/usr/local/obj/usr/src/sys/JADE



>Description:


According to bento, games/heroes fails to link on alpha.  I don't have access to alpha hardware, but I think that passing -ffast-math to the compiler is the culprit.


>How-To-Repeat:





>Fix:


--- heroes-alpha-breakage.patch begins here ---
--- Makefile.orig	Sun Mar  7 01:46:22 2004
+++ Makefile	Sun Mar  7 01:47:15 2004
@@ -43,18 +43,18 @@
 		MAKEINFO="makeinfo --no-split"
 CONFIGURE_ARGS=	--with-sdl_mixer=${LOCALBASE} --without-gii --without-ggi
 
+.if defined(WITH_OPTIMIZED_CFLAGS)
+CONFIGURE_ARGS+=	--enable-optimizations
+.else
+CONFIGURE_ARGS+=	--disable-optimizations
+.endif
+
 MAN6=		heroes.6 heroeslvl.6
 INFO=		heroes
 
 CPPFLAGS=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
 LDFLAGS=	-L${LOCALBASE}/lib -lsmpeg ${PTHREAD_LIBS}
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "alpha" && ${OSVERSION} >= 502102
-BROKEN=		"Does not compile on alpha >=5.x"
-.endif
-
 post-patch:
 	@for dir in ${DATASRC} ${SOUNDSRC} ${MUSICSRC}; do \
 		${FIND} $${dir} -name "Makefile*" | ${XARGS} ${RM}; \
@@ -72,4 +72,4 @@
 	${MKDIR} ${DATADIR}/mod
 	${INSTALL_DATA} ${MUSICSRC}/*.xm ${MUSICSRC}/sound.conf ${DATADIR}/mod
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- heroes-alpha-breakage.patch ends here ---



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->vs 
Responsible-Changed-By: vs 
Responsible-Changed-When: Fri Mar 12 09:47:55 PST 2004 
Responsible-Changed-Why:  
I'd like to handle this: looks promising on my alpha. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63866 
State-Changed-From-To: open->closed 
State-Changed-By: vs 
State-Changed-When: Fri Mar 12 21:36:59 PST 2004 
State-Changed-Why:  
Committed with minor modifications, thanks! 

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