From amdmi3@mail.ru  Fri Feb 10 00:35:37 2006
Return-Path: <amdmi3@mail.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4C30D16A420
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Feb 2006 00:35:37 +0000 (GMT)
	(envelope-from amdmi3@mail.ru)
Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CCCAB43D46
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Feb 2006 00:35:36 +0000 (GMT)
	(envelope-from amdmi3@mail.ru)
Received: from [213.148.29.33] (port=1860 helo=nexii.panopticon)
	by mx1.mail.ru with esmtp 
	id 1F7MG7-000MqP-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 10 Feb 2006 03:35:35 +0300
Received: from hades.panopticon (hades.panopticon [192.168.0.2])
	by nexii.panopticon (Postfix) with ESMTP id 82BF61142B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Feb 2006 03:39:05 +0300 (MSK)
Received: by hades.panopticon (Postfix, from userid 1000)
	id B484F17D; Fri, 10 Feb 2006 03:35:49 +0300 (MSK)
Message-Id: <20060210003549.B484F17D@hades.panopticon>
Date: Fri, 10 Feb 2006 03:35:49 +0300 (MSK)
From: Dmitry Marakasov <amdmi3@mail.ru>
Reply-To: Dmitry Marakasov <amdmi3@mail.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] games/wop: Update to 0.4.1
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         93112
>Category:       ports
>Synopsis:       [MAINTAINER] games/wop: Update to 0.4.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lawrance
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 10 00:40:03 GMT 2006
>Closed-Date:    Sun Feb 12 04:08:30 GMT 2006
>Last-Modified:  Sun Feb 12 04:08:30 GMT 2006
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 6.0-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #1: Fri Jan 27 12:07:19 MSK 2006 amdmi3@hades.panopticon:/usr/obj/usr/src/sys/HADES i386

>Description:
- Update to 0.4.1
- Unbreak on 4.x
- Add more intelligent global config file handling
>How-To-Repeat:
>Fix:

--- wop-0.4.1.patch begins here ---
diff -ruN wop.orig/Makefile wop/Makefile
--- wop.orig/Makefile	Tue Dec 27 07:52:55 2005
+++ wop/Makefile	Fri Feb 10 03:21:59 2006
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	wop
-PORTVERSION=	0.4
+PORTVERSION=	0.4.1
 CATEGORIES=	games
 MASTER_SITES=	http://wormsofprey.org/download/
 DISTFILES=	${PORTNAME}-${PORTVERSION}-src${EXTRACT_SUFX} \
@@ -21,6 +21,7 @@
 USE_SDL=	sdl net mixer ttf image
 USE_GMAKE=	yes
 USE_REINPLACE=	yes
+USE_GCC=	3.4+
 
 MAKE_ENV=	"CXX=${CXX}"
 
@@ -29,7 +30,7 @@
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 500000
-BROKEN=		"Does not compile on < 5.x"
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-src-global.hpp
 .endif
 
 post-patch:
@@ -39,11 +40,16 @@
 	@${REINPLACE_CMD} -e 's|= g++|?= g++|g' ${WRKSRC}/sdlwidgets/Makefile ${WRKSRC}/src/Makefile
 	@${REINPLACE_CMD} -e 's|/etc/woprc|${PREFIX}/etc/woprc|' ${WRKSRC}/src/wopsettings.cpp
 	@${REINPLACE_CMD} -e 's|\./data|${DATADIR}|' ${WRKSRC}/woprc
+	@${REINPLACE_CMD} -e '/stdint.h/ d' ${WRKSRC}/src/attachableobject.cpp
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/wop ${PREFIX}/bin
-	${INSTALL_DATA} ${WRKSRC}/woprc ${PREFIX}/etc
+	${INSTALL_DATA} ${WRKSRC}/woprc ${PREFIX}/etc/woprc.sample
+	if [ ! -f ${PREFIX}/etc/woprc ]; then \
+		${INSTALL_DATA} ${WRKSRC}/woprc ${PREFIX}/etc; \
+	fi
 
+	@echo "Installing data files..."
 	@cd ${WRKDIR}/${PORTNAME}data-${DATAVERSION}; \
 		${FIND} . -type d -exec ${MKDIR} ${DATADIR}/{} \; ; \
 		${FIND} . -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
diff -ruN wop.orig/distinfo wop/distinfo
--- wop.orig/distinfo	Tue Dec 27 05:20:07 2005
+++ wop/distinfo	Fri Feb 10 01:42:26 2006
@@ -1,6 +1,6 @@
-MD5 (wop-0.4-src.tar.bz2) = f508cf330815eb727552b88303d40ec5
-SHA256 (wop-0.4-src.tar.bz2) = 96127385234861e78b41085e9f0490423a813bf0eb31e7c4b157725a14879349
-SIZE (wop-0.4-src.tar.bz2) = 275247
+MD5 (wop-0.4.1-src.tar.bz2) = 339c6a832a5add5c0867a0aca6c935bb
+SHA256 (wop-0.4.1-src.tar.bz2) = 787f60362d605ba4fb3df2f513605587a84015153777c05c84679ef3ed23d82b
+SIZE (wop-0.4.1-src.tar.bz2) = 279613
 MD5 (wopdata-2005-12-21.tar.bz2) = 0bf42f28e03dcac5c8066b46d7733907
 SHA256 (wopdata-2005-12-21.tar.bz2) = cd6b8eb9f77f709d7a52b913d8a665bd202c53ceca9cf96b4c9f9adc17d8a6b2
 SIZE (wopdata-2005-12-21.tar.bz2) = 4217006
diff -ruN wop.orig/files/extra-patch-src-global.hpp wop/files/extra-patch-src-global.hpp
--- wop.orig/files/extra-patch-src-global.hpp	Thu Jan  1 03:00:00 1970
+++ wop/files/extra-patch-src-global.hpp	Fri Feb 10 01:42:26 2006
@@ -0,0 +1,11 @@
+--- src/global.hpp.orig	Tue Jun 28 17:55:19 2005
++++ src/global.hpp	Fri Feb 10 00:42:31 2006
+@@ -44,7 +44,7 @@
+ 
+ void makePace();
+ 
+-inline int ROUND( const real x ) { return static_cast<int>( round( x )); }
++#define ROUND(x) (int)((x)-floor(x) < 0.5 ? floor(x) : ceil(x))
+ 
+ // already defined somewhere else
+ //template<class T> T min( const T a, const T b ) { return a < b ? a : b; }
diff -ruN wop.orig/pkg-plist wop/pkg-plist
--- wop.orig/pkg-plist	Tue Dec 27 05:20:07 2005
+++ wop/pkg-plist	Fri Feb 10 03:23:34 2006
@@ -1,5 +1,7 @@
 bin/wop
-etc/woprc
+@unexec if cmp -s %D/etc/woprc %D/etc/woprc.sample; then rm -f %D/etc/woprc; fi
+etc/woprc.sample
+@exec if [ ! -f  %D/etc/woprc ]; then cp -p %D/etc/woprc.sample %D/etc/woprc; fi
 %%DATADIR%%/images/avatar/worm/remote_control/eyes_rc_left.pnm
 %%DATADIR%%/images/avatar/worm/remote_control/eyes_rc_right.pnm
 %%DATADIR%%/images/avatar/worm/remote_control/gun_rc_left.pnm
--- wop-0.4.1.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Sat Feb 11 14:59:32 UTC 2006 
Responsible-Changed-Why:  
Yoink 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93112 
State-Changed-From-To: open->feedback 
State-Changed-By: lawrance 
State-Changed-When: Sun Feb 12 01:24:35 UTC 2006 
State-Changed-Why:  
Fails on clean 4.x due to imake-6: 

===>  imake-6.9.0 is part of X.Org and you have xfree86-4 set for X11 distribution. See The X Window System and Virtual Consoles chapter of FAQ for more information. 
*** Error code 1 


You should set USE_IMAKE rather than depending directly on imake-6. 
However, that doesn't seem to work on 4.x either: 

===>  Configuring for wop-0.4.1 
mv -f Makefile Makefile.bak 
imake -DUseInstalled -I/usr/X11R6/lib/X11/config 
imake: No such file or directory 
imake: No description file. 
Stop. 
*** Error code 1 


Any ideas? 

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

From: Sam Lawrance <lawrance@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/93112: [MAINTAINER] games/wop: Update to 0.4.1
Date: Sun, 12 Feb 2006 14:17:35 +1100

 [For the PR ...]
 
 On 12/02/2006, at 2:11 PM, Dmitry Marakasov wrote:
 
 > * Sam Lawrance (lawrance@FreeBSD.org) wrote:
 >> Any ideas?
 > I guess USE_IMAKE is not right thing to use here, as in addition to
 > dependency on imake it does imply other things we don't need for this
 > port (like that non-working configure stuff).
 >
 > The best solution seem to be this (I've also forgot to drop  
 > USE_REINPLACE):
 >
 > --- Makefile.patch begins here ---
 > --- Makefile.orig	Sun Feb 12 06:03:11 2006
 > +++ Makefile	Sun Feb 12 06:03:24 2006
 > @@ -15,12 +15,11 @@
 >  MAINTAINER=	amdmi3@mail.ru
 >  COMMENT=	Free real-time Worms game
 >
 > -BUILD_DEPENDS=	makedepend:${PORTSDIR}/devel/imake-6
 > +BUILD_DEPENDS=	makedepend:${X_IMAKE_PORT}
 >
 >  USE_BZIP2=	yes
 >  USE_SDL=	sdl net mixer ttf image
 >  USE_GMAKE=	yes
 > -USE_REINPLACE=	yes
 >  USE_GCC=	3.4+
 >
 >  MAKE_ENV=	"CXX=${CXX}"
 > --- Makefile.patch ends here ---
 >
 > Though X_IMAKE_PORT is not documented is bsd.port.mk, it always  
 > contains
 > correct path to imake port depending on X_WINDOW_SYSTEM used, and it's
 > used in other ports in cases similar to ours:
 >
 > graphics/dri/Makefile
 > graphics/dri-devel/Makefile
 > lang/xsb/Makefile
 > mbone/mcl/Makefile
 > net-mgmt/driftnet/Makefile
 > science/vmd/Makefile
 > www/larbin/Makefile
 > x11-wm/wm2/Makefile
 >
 > -- 
 > Best regards,
 >  Dmitry                          mailto:amdmi3@mail.ru
 >
 
State-Changed-From-To: feedback->closed 
State-Changed-By: lawrance 
State-Changed-When: Sun Feb 12 04:08:28 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

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