diff options
author | joerg <joerg@pkgsrc.org> | 2006-04-28 16:23:55 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-04-28 16:23:55 +0000 |
commit | b300dc2aee936d5b3ff3f5828475fb19cab57d04 (patch) | |
tree | 2795d0a71a0399f5ce88e3f3fbb3419fda3c220f /games | |
parent | c586c1ee199fa18bf4e0b84772fc334fab03bea9 (diff) | |
download | pkgsrc-b300dc2aee936d5b3ff3f5828475fb19cab57d04.tar.gz |
Fix C++ for GCC 3.4+. Always link with pthread when linking with qt-mt.
Diffstat (limited to 'games')
-rw-r--r-- | games/xarchon/Makefile | 3 | ||||
-rw-r--r-- | games/xarchon/distinfo | 6 | ||||
-rw-r--r-- | games/xarchon/patches/patch-ab | 8 | ||||
-rw-r--r-- | games/xarchon/patches/patch-am | 53 | ||||
-rw-r--r-- | games/xarchon/patches/patch-an | 35 |
5 files changed, 98 insertions, 7 deletions
diff --git a/games/xarchon/Makefile b/games/xarchon/Makefile index 91b530123ba..bd3e9383478 100644 --- a/games/xarchon/Makefile +++ b/games/xarchon/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2006/04/17 13:46:30 wiz Exp $ +# $NetBSD: Makefile,v 1.39 2006/04/28 16:23:55 joerg Exp $ # DISTNAME= xarchon-0.60 @@ -29,4 +29,5 @@ CONFIGURE_ENV+= CC=${CC:Q} #HF#.include "../../x11/gtk/buildlink3.mk" .include "../../x11/qt3-libs/buildlink3.mk" .include "../../graphics/glu/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/games/xarchon/distinfo b/games/xarchon/distinfo index cb6bead11a8..ec83060c43b 100644 --- a/games/xarchon/distinfo +++ b/games/xarchon/distinfo @@ -1,10 +1,10 @@ -$NetBSD: distinfo,v 1.8 2005/02/23 23:12:03 agc Exp $ +$NetBSD: distinfo,v 1.9 2006/04/28 16:23:55 joerg Exp $ SHA1 (xarchon-0.60.tar.gz) = e68f79a712a8bff5ca18e5011d1582f7e5196f49 RMD160 (xarchon-0.60.tar.gz) = fdaa7556ee980b004efe4aaae59618fddba8a10b Size (xarchon-0.60.tar.gz) = 435088 bytes SHA1 (patch-aa) = f6049d4298cd1363d10bbea35957334fa496e2c0 -SHA1 (patch-ab) = d6ce4b8b5d9053debff34cc7d6ec396e8d8f2306 +SHA1 (patch-ab) = 551ea1b5a9873c14c763b064f270a75d2ce821ce SHA1 (patch-ac) = 0021cba328bbfc4da5a3093d5a338495ee3681f4 SHA1 (patch-ad) = 28dea7e4fd285791d42df7ee43ff6623b15dad55 SHA1 (patch-ae) = b80aa4bd8ee51d9798aac15da917235b7ae2b106 @@ -15,3 +15,5 @@ SHA1 (patch-ai) = ebb7809f3c2bef22ccc73afe507826d46347a14d SHA1 (patch-aj) = feeca49101109695a09a2e5a526e306659cc7089 SHA1 (patch-ak) = bff38380e7b40161c8135a1d04ee0468a1135991 SHA1 (patch-al) = 55693517ab21d4393b724844f091fc3e6833d764 +SHA1 (patch-am) = 619b7e66a072666c499abfde09fe707cd7d06d3f +SHA1 (patch-an) = f0be4b2d99512c0130c4d1be7bfb99eb6923ff19 diff --git a/games/xarchon/patches/patch-ab b/games/xarchon/patches/patch-ab index f849b5b8bd9..042a642c4a2 100644 --- a/games/xarchon/patches/patch-ab +++ b/games/xarchon/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.7 2005/02/22 16:35:55 wiz Exp $ +$NetBSD: patch-ab,v 1.8 2006/04/28 16:23:55 joerg Exp $ ---- configure.orig 2002-01-09 19:34:33.000000000 +0100 +--- configure.orig 2002-01-09 18:34:33.000000000 +0000 +++ configure @@ -4458,13 +4458,13 @@ QT_INCLUDES="-I $qtdir/include" QT_LDFLAGS="-L $qtdir/lib" @@ -15,7 +15,7 @@ $NetBSD: patch-ab,v 1.7 2005/02/22 16:35:55 wiz Exp $ else ac_check_lib_save_LIBS=$LIBS -LIBS="-lqt $LIBS" -+LIBS="-lqt-mt $LIBS" ++LIBS="-lqt-mt $PTHREAD_LDFLAGS $PTHREAD_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4469 "configure" #include "confdefs.h" @@ -32,7 +32,7 @@ $NetBSD: patch-ab,v 1.7 2005/02/22 16:35:55 wiz Exp $ else - QT_LDFLAGS="$QT_LDFLAGS -lqt" -+ QT_LDFLAGS="$QT_LDFLAGS -lqt-mt" ++ QT_LDFLAGS="$QT_LDFLAGS -lqt-mt $PTHREAD_LDFLAGS $PTHREAD_LIBS" have_qt=yes fi diff --git a/games/xarchon/patches/patch-am b/games/xarchon/patches/patch-am new file mode 100644 index 00000000000..3be8a1e0097 --- /dev/null +++ b/games/xarchon/patches/patch-am @@ -0,0 +1,53 @@ +$NetBSD: patch-am,v 1.1 2006/04/28 16:23:55 joerg Exp $ + +--- src/Problem.hpp.orig 2006-04-28 15:41:18.000000000 +0000 ++++ src/Problem.hpp +@@ -306,14 +306,15 @@ public: + virtual G Goal_Value(T *a) + { + if (depth==0) +- return tester->Goal_Value(a); ++ return this->tester->Goal_Value(a); + +- Goal_Test<G,T> *endtester=tester; +- tester=new Minimax_Goal_Test(depth-1,generator,other_acc,goal_acc,tester); ++ Goal_Test<G,T> *endtester=this->tester; ++ this->tester=new Minimax_Goal_Test(depth-1,this->generator,other_acc,this->goal_acc,this->tester); + G ret_val=Successor_Goal_Test<G,T>::Goal_Value(a); +- delete tester; +- tester=endtester; +- delete next; ++ delete this->tester; ++ this->tester=this->endtester; ++ delete this->next; ++ this->next = NULL; + + return ret_val; + } +@@ -340,19 +341,19 @@ public: + + virtual G Goal_Value(T *a) + { +- Goal_Accumulator <G,T> *old=goal_acc; ++ Goal_Accumulator <G,T> *old=this->goal_acc; + Multi_Goal_Accumulator <G,T,greater<G> > *mga=new Multi_Goal_Accumulator<G,T,greater<G> >(branch); +- goal_acc=mga; ++ this->goal_acc=mga; + Successor_Goal_Test<G,T>::Goal_Value(a); +- goal_acc=old; ++ this->goal_acc=old; + for (mga->Init();!mga->IsEnd();mga->Next()) { + T *state=mga->Get_State(); +- Multi_Minimax_Goal_Test *next=new Multi_Minimax_Goal_Test(d-1,b,gen,other,goal_acc,tester); ++ Multi_Minimax_Goal_Test *next=new Multi_Minimax_Goal_Test(this->d-1,this->b,this->gen,other,this->goal_acc,this->tester); + next->Goal_Value(state); +- goal_acc->Put(accumulator->value,acc->state,acc->op); ++ this->goal_acc->Put(this->accumulator->value,this->acc->state,this->acc->op); + } +- goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result()); +- return goal_acc->Get_Value(); ++ this->goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result()); ++ return this->goal_acc->Get_Value(); + } + }; + diff --git a/games/xarchon/patches/patch-an b/games/xarchon/patches/patch-an new file mode 100644 index 00000000000..bce6bf3c1f0 --- /dev/null +++ b/games/xarchon/patches/patch-an @@ -0,0 +1,35 @@ +$NetBSD: patch-an,v 1.1 2006/04/28 16:23:55 joerg Exp $ + +--- src/Genetic.hpp.orig 2006-04-28 16:16:16.000000000 +0000 ++++ src/Genetic.hpp +@@ -216,9 +216,9 @@ public: + virtual Genetic_Operator<T> *Choose_Operator(void) + { + int max=(int)total_op_weight; +- list<Genetic_Operator<T> *>::iterator start=operators.begin(); +- list<Genetic_Operator<T> *>::iterator end=operators.end(); +- list<Genetic_Operator<T> *>::iterator iter; ++ typename list<Genetic_Operator<T> *>::iterator start=operators.begin(); ++ typename list<Genetic_Operator<T> *>::iterator end=operators.end(); ++ typename list<Genetic_Operator<T> *>::iterator iter; + int r=rand()%max; + int count=0; + for (iter=start;iter!=end;iter++) { +@@ -249,7 +249,7 @@ public: + Genetic_Population<T> *newpop=new Genetic_Population<T>(p->size); + int cur_size=0; + while (cur_size<newpop->size) { +- Genetic_Operator<T> *op=Choose_Operator(); ++ Genetic_Operator<T> *op=this->Choose_Operator(); + if ( (cur_size+op->NumOfResults())>newpop->size) + continue; + for (i=0;i<op->NumOfOperands();i++) { +@@ -264,7 +264,7 @@ public: + cur_size++; + } + } +- newpop->Eval_Fitness(fit_func); ++ newpop->Eval_Fitness(this->fit_func); + return newpop; + } + |