From d403d953c8d4654dbb68ce5f51bb83bf988a580a Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 21 Apr 2006 09:00:23 +0000 Subject: Add DragonFly. Fix GCC 3.4+ issues in C++. --- games/wormz/Makefile | 4 +++- games/wormz/distinfo | 8 ++++---- games/wormz/patches/patch-aa | 29 +++++++++++++++++------------ games/wormz/patches/patch-ab | 6 +++--- games/wormz/patches/patch-at | 33 +++++++++++++++++++++++++++++---- 5 files changed, 56 insertions(+), 24 deletions(-) (limited to 'games/wormz') diff --git a/games/wormz/Makefile b/games/wormz/Makefile index b8fc0acc26f..c9734e3ceae 100644 --- a/games/wormz/Makefile +++ b/games/wormz/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2006/02/05 23:09:23 joerg Exp $ +# $NetBSD: Makefile,v 1.16 2006/04/21 09:00:23 joerg Exp $ # DISTNAME= Wormz-1.0b5 @@ -19,6 +19,8 @@ USE_TOOLS+= gmake post-extract: ${MKDIR} ${WRKSRC}/NetBSD ${TOUCH} ${WRKSRC}/NetBSD/.depend + ${MKDIR} ${WRKSRC}/DragonFly + ${TOUCH} ${WRKSRC}/DragonFly/.depend do-configure: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} depend diff --git a/games/wormz/distinfo b/games/wormz/distinfo index 138dc582fed..776f5651376 100644 --- a/games/wormz/distinfo +++ b/games/wormz/distinfo @@ -1,10 +1,10 @@ -$NetBSD: distinfo,v 1.8 2005/06/14 16:33:13 jmmv Exp $ +$NetBSD: distinfo,v 1.9 2006/04/21 09:00:23 joerg Exp $ SHA1 (Wormz-1.0b5.tar.gz) = a5e45e90fcc0eb4d188508bdffe71220ddcd20a4 RMD160 (Wormz-1.0b5.tar.gz) = 38411dcc3611d70d5873bf512439cd707372ef9e Size (Wormz-1.0b5.tar.gz) = 436954 bytes -SHA1 (patch-aa) = 415ee135ea0ea1e08a02c74b89a96bfa7f9b2672 -SHA1 (patch-ab) = 44c938189653de05b48a3ea8ec01442a1c5f22f6 +SHA1 (patch-aa) = f67e29081df0f51dff8eea820425e0a767d87274 +SHA1 (patch-ab) = b549a5afb22695695bbc1f6c07836632ea57bc65 SHA1 (patch-ac) = 7a7764b24bd5c1c6f5121508b9bf618a71cdc8de SHA1 (patch-ad) = 8754a4a826273354e5b98586c44add9b818a3d53 SHA1 (patch-ae) = deaf33d7d7e584965e9496f8214a9a2505e75caa @@ -22,7 +22,7 @@ SHA1 (patch-ap) = e8b24843effc24515ee81becd75c280b4ce6b548 SHA1 (patch-aq) = 66ed99cc9521ce31f9d155f590ea0d296c0e9eb2 SHA1 (patch-ar) = a43ccd48de0db0018495199af29e8fe6980c5b5b SHA1 (patch-as) = a01f27bf1187f02fa327c1bd2cf50e05d789641c -SHA1 (patch-at) = 4acee68d04170e4fabacac37232a1e841306daa0 +SHA1 (patch-at) = 503ecb98bf54787baf655b007daaa3006e591065 SHA1 (patch-au) = e69f4050425dea7705782ac2688df6d19fbe6a2e SHA1 (patch-av) = 81b507fd7df38f3a894eb45482743027df49df08 SHA1 (patch-aw) = b2d855826ffc9b67876acfe7da3b91a7ff5ea34a diff --git a/games/wormz/patches/patch-aa b/games/wormz/patches/patch-aa index bb0a3a08402..3ad774973d4 100644 --- a/games/wormz/patches/patch-aa +++ b/games/wormz/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ +$NetBSD: patch-aa,v 1.4 2006/04/21 09:00:23 joerg Exp $ ---- Makefile.orig Tue Jul 14 15:41:40 1998 -+++ Makefile Wed Feb 18 22:53:19 2004 +--- Makefile.orig 1998-07-14 13:41:40.000000000 +0000 ++++ Makefile @@ -3,8 +3,8 @@ #BinInstallPath=$(ARCH)/ @@ -13,7 +13,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ #AllDepths=16 AllDepths=8 16 24 -@@ -29,13 +29,18 @@ +@@ -29,13 +29,23 @@ else ifeq ($(TYPEOS),Linux) ARCH=Linux EXTRALIBS=-lm @@ -21,6 +21,10 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ +ifeq ($(TYPEOS),NetBSD) +ARCH=NetBSD +EXTRALIBS=-lm ++else ++ifeq ($(TYPEOS),DragonFly) ++ARCH=DragonFly ++EXTRALIBS=-lm +else #!!! #EXTRALIBS=-lefence @@ -29,11 +33,12 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ endif endif endif ++endif +endif ifdef USE_GGI EXTRAGGILIBS=-lggi -lt1 -@@ -43,11 +48,11 @@ +@@ -43,11 +53,11 @@ endif ifdef ARCH @@ -48,7 +53,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ CDEFS=-D$(ARCH) -DARCHDIR=\"$(ARCHDIR)\" -DColorDepth=$(Depth) OPTFLAGS=-O2 -@@ -60,8 +65,8 @@ +@@ -60,8 +70,8 @@ WARNFLAGS=-Wall -Wcast-qual -Wcast-align #-lefence CFLAGS=-pipe $(INCLUDE) $(OPTFLAGS) $(DEBUGFLAGS) $(WARNFLAGS) $(CDEFS) #-Wshadow @@ -59,7 +64,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ INCLUDE=-I./include -I. $(X11INCLUDE) $(STDINCLUDE) -@@ -108,7 +113,7 @@ +@@ -108,7 +118,7 @@ ObjsClientND=$(addprefix $(OBJDIR),$(Obj SrcsClient=$(SrcsClientND) $(SrcsClientDD) ObjsClient=$(ObjsClientND) $(ObjsClientDD) @@ -68,7 +73,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ SrcsServer=$(foreach dir,$(DirsServer),$(wildcard $(dir)/*.cc)) SrcsServerNotDir=$(notdir $(SrcsServer)) -@@ -120,7 +125,7 @@ +@@ -120,7 +130,7 @@ SrcsRunner=$(foreach dir,$(DirsRunner),$ SrcsRunnerNotDir=$(notdir $(SrcsRunner)) ObjsRunnerNotDir=$(SrcsRunnerNotDir:.cc=.o) ObjsRunner=$(addprefix $(OBJDIR),$(ObjsRunnerNotDir)) @@ -77,7 +82,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ AllDSrcs=$(foreach dir,$(DepthDepenceDirs),$(wildcard $(dir)/*.cc)) AllNSrcs=$(foreach dir,$(NotDepthDepenceDirs),$(wildcard $(dir)/*.cc)) -@@ -130,10 +135,10 @@ +@@ -130,10 +140,10 @@ vpath %.o $(OBJDIR) $(OBJDIR)%$(Depth).o: %.cc @@ -90,7 +95,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ DEPEND=$(OBJDIR).depend -@@ -147,9 +152,9 @@ +@@ -147,9 +157,9 @@ depend: Create-PathConfig Depth=xxx $(MAKE) real-depend real-depend: @@ -102,7 +107,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ awk '/^[^ ]/ { print "$(OBJDIR)" $$0 } /^ / { print $$0 }' > .deptmp for i in $(AllDepths); do \ sed s/\\\.o/$$i\\\.o/g < .deptmp >> $(DEPEND) ; done -@@ -160,13 +165,13 @@ +@@ -160,13 +170,13 @@ clean: rm -f `find . -name \*~` $(TargetClient): $(ObjsClient) @@ -119,7 +124,7 @@ $NetBSD: patch-aa,v 1.3 2004/02/18 23:09:03 kristerw Exp $ Client-target: $(TargetClient) -@@ -178,14 +183,14 @@ +@@ -178,14 +188,14 @@ PathConfig=include/PathConfig.hh Create-PathConfig: echo '#ifndef _PathConfig_hh_' > $(PathConfig) echo '#define _PathConfig_hh_' >> $(PathConfig) diff --git a/games/wormz/patches/patch-ab b/games/wormz/patches/patch-ab index a3581f90ce5..5fc2491a6eb 100644 --- a/games/wormz/patches/patch-ab +++ b/games/wormz/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.2 2000/08/26 02:22:49 wiz Exp $ +$NetBSD: patch-ab,v 1.3 2006/04/21 09:00:23 joerg Exp $ --- ./include/Compat.hh.orig Tue Jul 7 23:02:01 1998 +++ ./include/Compat.hh Sat Feb 5 18:55:12 2000 @@ -16,7 +16,7 @@ $NetBSD: patch-ab,v 1.2 2000/08/26 02:22:49 wiz Exp $ memset(data, 0, size); } -+#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__DragonFly__) const double PI=3.1415926535797; +#endif @@ -32,7 +32,7 @@ $NetBSD: patch-ab,v 1.2 2000/08/26 02:22:49 wiz Exp $ + + ((old & 0xff00) >> 8);*/ + return(old); } -+#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__DragonFly__) extern "C" { int usleep(unsigned int); } diff --git a/games/wormz/patches/patch-at b/games/wormz/patches/patch-at index 31429da4c18..e83a4fe8559 100644 --- a/games/wormz/patches/patch-at +++ b/games/wormz/patches/patch-at @@ -1,8 +1,17 @@ -$NetBSD: patch-at,v 1.1 2004/02/18 23:09:03 kristerw Exp $ +$NetBSD: patch-at,v 1.2 2006/04/21 09:00:23 joerg Exp $ ---- Game/Players.cc.orig Wed Feb 18 23:37:31 2004 -+++ Game/Players.cc Wed Feb 18 23:37:59 2004 -@@ -42,7 +42,7 @@ +--- Game/Players.cc.orig 1998-07-07 21:02:38.000000000 +0000 ++++ Game/Players.cc +@@ -24,7 +24,7 @@ const int invalid_playernum = -1; + + Players::Players(FrameBuffer * _arena, FrameBuffer * _scorepanel, + Picture * _background, Picture * _wallborder, NetConnector * _network) +- : worms(new (Worm *)[MAXPlayers]), arena(_arena), scorepanel(_scorepanel), ++ : worms(new Worm *[MAXPlayers]), arena(_arena), scorepanel(_scorepanel), + background(_background), wallborder(_wallborder), + currentMaxPlayerNum(0), network(_network), + score(0), IsSurround(TRUE), winner_num(invalid_playernum) +@@ -42,7 +42,7 @@ Players::~Players() delete crashBuffer; } @@ -11,3 +20,19 @@ $NetBSD: patch-at,v 1.1 2004/02/18 23:09:03 kristerw Exp $ { bool IsSame = FALSE; if (between(number, 0, MAXPlayers-1)) { +@@ -243,12 +243,12 @@ void Players::UpdateRemote() + if (r && (r->GetType() == ptNetwork)) { // can't use IsRemote, it may not be Remote + bool Left, Press; + switch (si->Dir) { +- case si->DirLeft: ++ case nmStepItem::DirLeft: + Left = TRUE; Press = TRUE; break; +- case si->DirRight: ++ case nmStepItem::DirRight: + Left = FALSE; Press = TRUE; break; + default: +- case si->DirUnpress: ++ case nmStepItem::DirUnpress: + Left = TRUE; Press = FALSE; + } + r->Tune(Left, Press); -- cgit v1.2.3