Fixing with gcc-3.4, bug #116209 and font selection
authorAlfredo Tupone <tupone@gentoo.org>
Wed, 15 Mar 2006 18:42:07 +0000 (18:42 +0000)
committerAlfredo Tupone <tupone@gentoo.org>
Wed, 15 Mar 2006 18:42:07 +0000 (18:42 +0000)
Package-Manager: portage-2.1_pre6-r2

games-strategy/xarchon/ChangeLog
games-strategy/xarchon/Manifest
games-strategy/xarchon/files/01_all_gcc34_font.patch [new file with mode: 0644]
games-strategy/xarchon/files/digest-xarchon-0.60-r1 [new file with mode: 0644]
games-strategy/xarchon/xarchon-0.60-r1.ebuild [new file with mode: 0644]

index b6b4dabe5feb9a848dd877beb313769361db7f88..3779fc7a390f9701bea8d49889191e26de6a4d48 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for games-strategy/xarchon
 # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/xarchon/ChangeLog,v 1.8 2006/03/12 23:43:50 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/xarchon/ChangeLog,v 1.9 2006/03/15 18:42:06 tupone Exp $
+
+*xarchon-0.60-r1 (15 Mar 2006)
+
+  15 Mar 2006; <Tupone@gentoo.org> +files/01_all_gcc34_font.patch,
+  +xarchon-0.60-r1.ebuild:
+  Fix for bug #116209 (compile on gcc-3.4).
+  Patching font to select some present on the system
 
   12 Mar 2006; Michael Sterrett <mr_bones_@gentoo.org> xarchon-0.50.ebuild,
   xarchon-0.60.ebuild:
index 96f8f71e95296c233a25ee9f97b483391dcc0963..a0ff2769d04c89b12d30e0fbf0a70992caf33869 100644 (file)
@@ -1,18 +1,27 @@
-MD5 fe61e594fd6d04922c95c40b1c16a09e ChangeLog 1085
-RMD160 2aa522c361d14693cf677e41def247320d0eedcc ChangeLog 1085
-SHA256 776be180fc70b07c30bf1b1352d0452f17747ccac5e2158052054e0a99e1ac90 ChangeLog 1085
+MD5 5a956b95681dca01aa4da8877b2ab3f7 ChangeLog 1306
+RMD160 80beb2de3dd1d76c368ce186ae0063095db41fbe ChangeLog 1306
+SHA256 32e4cc2b4387b861b570035a4edf6253b70ab5fc5cf2aa675694533278e37224 ChangeLog 1306
+MD5 4388c8ee38d49ac90ccbedbb8b810eaa files/01_all_gcc34_font.patch 5384
+RMD160 174d5ef891870bc58434ce40677269a689d816ad files/01_all_gcc34_font.patch 5384
+SHA256 abbb20e50413f4b812bcade3eb80647b819886f34f10d4897c3535f1d7e2b37a files/01_all_gcc34_font.patch 5384
 MD5 8bfbd70aee2831c6c7a4587cad2f6011 files/digest-xarchon-0.50 64
 RMD160 8500e004b0388a21c858059bce867afde1134b99 files/digest-xarchon-0.50 64
 SHA256 947d8b0a2cc2f818c0e20c69b94d550420a17b4831986a5b6c9e600a7c3d194e files/digest-xarchon-0.50 64
 MD5 50a9df5dead133494d2506a91264661e files/digest-xarchon-0.60 133
 RMD160 834fc66255125395ed538bc55c69d8779599e486 files/digest-xarchon-0.60 133
 SHA256 4c6888f1fff8638cfa755c1ae5945d69e7a46b910849ba811170ac4aa26609d9 files/digest-xarchon-0.60 133
+MD5 596bf4b259ff3ca51a4940ec8a232362 files/digest-xarchon-0.60-r1 491
+RMD160 d0ee7551a6dae2c98e4d6a1b0bacd953f3fde879 files/digest-xarchon-0.60-r1 491
+SHA256 fa2179e4dd10dbfecae8ca1dad0c8eeea8cb9b6c1775337f71e247809408bd0e files/digest-xarchon-0.60-r1 491
 MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea metadata.xml 158
 SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 metadata.xml 158
 MD5 e9926061f428b56d0e8006581cf86805 xarchon-0.50.ebuild 866
 RMD160 9810a6995b5c828bf946f4ed0fc57455d10c954c xarchon-0.50.ebuild 866
 SHA256 94ee3655ac53b5954740ed73c6fcde2ba146fedad9f05c40531145208d3fcd6a xarchon-0.50.ebuild 866
+MD5 08f09f22d845ff4cf6fc2820599f49b4 xarchon-0.60-r1.ebuild 1297
+RMD160 c67cb684734d9ed55717c6f7d7f1cbe26f6158fe xarchon-0.60-r1.ebuild 1297
+SHA256 e879e4972715a1e8ca6c6c0cb2782e0ec1b6eb7307e77121aed7eb81b3971472 xarchon-0.60-r1.ebuild 1297
 MD5 e925e1555906a05144224079efa976f4 xarchon-0.60.ebuild 1170
 RMD160 26e653e5eab0c54b14bc2a8d5e3b975f04ab7986 xarchon-0.60.ebuild 1170
 SHA256 b866fdbe8482b665d20e2f6c8b33d90105bfa1e426543e3d4c28c084623299e0 xarchon-0.60.ebuild 1170
diff --git a/games-strategy/xarchon/files/01_all_gcc34_font.patch b/games-strategy/xarchon/files/01_all_gcc34_font.patch
new file mode 100644 (file)
index 0000000..3a9a798
--- /dev/null
@@ -0,0 +1,131 @@
+--- src/Problem.hpp.original   2006-03-14 21:55:28.000000000 +0100
++++ src/Problem.hpp    2006-03-14 22:06:18.000000000 +0100
+@@ -306,14 +306,19 @@
+   virtual G Goal_Value(T *a)
+   {
+     if (depth==0) 
+-      return tester->Goal_Value(a);
++      return Successor_Goal_Test<G,T>::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=Successor_Goal_Test<G,T>::tester;
++    Successor_Goal_Test<G,T>::tester
++          = new Minimax_Goal_Test(depth-1,
++                                  Successor_Goal_Test<G,T>::generator,
++                                  other_acc,
++                                  Successor_Goal_Test<G,T>::goal_acc,
++                                  Successor_Goal_Test<G,T>::tester);
+     G ret_val=Successor_Goal_Test<G,T>::Goal_Value(a);
+-    delete tester;
+-    tester=endtester;
+-    delete next;
++    delete Successor_Goal_Test<G,T>::tester;
++    Successor_Goal_Test<G,T>::tester=endtester;
++    delete Successor_Goal_Test<G,T>::next;
+     return ret_val;
+   }
+@@ -340,19 +345,29 @@
+   
+   virtual G Goal_Value(T *a)
+   {
+-    Goal_Accumulator <G,T> *old=goal_acc;
++    Goal_Accumulator <G,T> *old=Successor_Goal_Test<G,T>::goal_acc;
+     Multi_Goal_Accumulator <G,T,greater<G> > *mga=new Multi_Goal_Accumulator<G,T,greater<G> >(branch);
+-    goal_acc=mga;
++    Successor_Goal_Test<G,T>::goal_acc=mga;
+     Successor_Goal_Test<G,T>::Goal_Value(a);
+-    goal_acc=old;
++    Successor_Goal_Test<G,T>::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(Successor_Goal_Test<G,T>::d-1,
++                                          Successor_Goal_Test<G,T>::b,
++                                          Successor_Goal_Test<G,T>::gen,
++                                          other,
++                                          Successor_Goal_Test<G,T>::goal_acc,
++                                          Successor_Goal_Test<G,T>::tester);
+       next->Goal_Value(state);
+-      goal_acc->Put(accumulator->value,acc->state,acc->op);
++      Successor_Goal_Test<G,T>::goal_acc->Put(Successor_Goal_Test<G,T>::accumulator->value,
++                                            Successor_Goal_Test<G,T>::acc->state,
++                                            Successor_Goal_Test<G,T>::acc->op);
+     }
+-    goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result());
+-    return goal_acc->Get_Value();
++    Successor_Goal_Test<G,T>::goal_acc->Put(mga->Get_State(),
++                                          mga->Get_Operator(),
++                                          mga->Get_Result());
++    return Successor_Goal_Test<G,T>::goal_acc->Get_Value();
+   }
+ };
+--- src/Genetic.hpp.original   2006-03-14 22:06:40.000000000 +0100
++++ src/Genetic.hpp    2006-03-14 22:12:20.000000000 +0100
+@@ -216,9 +216,9 @@
+   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 @@
+     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=Genetic_Generation<T>::Choose_Operator();
+       if ( (cur_size+op->NumOfResults())>newpop->size)
+       continue;
+       for (i=0;i<op->NumOfOperands();i++) {
+@@ -264,7 +264,7 @@
+       cur_size++;
+       }
+     }
+-    newpop->Eval_Fitness(fit_func);
++    newpop->Eval_Fitness(Genetic_Generation<T>::fit_func);
+     return newpop;
+   }
+--- src/board.c.original       2006-03-14 23:24:41.000000000 +0100
++++ src/board.c        2006-03-14 23:24:52.000000000 +0100
+@@ -27,7 +27,7 @@
+ #define FLOOR_DARK     0                /* steppings for light and dark */
+ #define FLOOR_LIGHT    7                /*   outside luminance cycle */
+-#define FONT_NAME      "-misc-fixed-medium-*-normal-*-15-0-*-*-*-*-iso8859-1"
++#define FONT_NAME      "-misc-fixed-medium-*-normal-*-15-*-*-*-*-*-iso8859-1"
+ #define V_CELL_YSIZE   40               /* revive cell height */
+--- src/field.c.original       2006-03-14 23:46:13.000000000 +0100
++++ src/field.c        2006-03-14 23:46:57.000000000 +0100
+@@ -21,7 +21,7 @@
+ /* defines                                                                  */
+ /*--------------------------------------------------------------------------*/
+-#define FONT_NAME      "-misc-fixed-medium-*-normal-*-40-0-*-*-*-*-iso8859-1"
++#define FONT_NAME      "-misc-fixed-medium-*-normal-*-20-*-*-*-*-*-iso8859-1"
+ #define NUM_ROCKS      12
+ #define ROCK_DELAY     2                /* rock slowdown factor */
+--- src/network.c.original     2006-03-14 23:46:23.000000000 +0100
++++ src/network.c      2006-03-14 23:47:24.000000000 +0100
+@@ -31,7 +31,7 @@
+ /* define                                                                   */
+ /*--------------------------------------------------------------------------*/
+-#define FONT_NAME      "-misc-fixed-medium-*-normal-*-20-0-*-*-*-*-iso8859-1"
++#define FONT_NAME      "-misc-fixed-medium-*-normal-*-18-*-*-*-*-*-iso8859-1"
+ #define TIMEOUT        3
+ #define RETRIES        4
diff --git a/games-strategy/xarchon/files/digest-xarchon-0.60-r1 b/games-strategy/xarchon/files/digest-xarchon-0.60-r1
new file mode 100644 (file)
index 0000000..d10455a
--- /dev/null
@@ -0,0 +1,6 @@
+MD5 299edc5edf0d0ded68801e1beaa3164e xarchon-0.60-gtk.patch.bz2 3541
+RMD160 ee615751ee30fba5ecce867e68866c3ea34b8c14 xarchon-0.60-gtk.patch.bz2 3541
+SHA256 9b1b15a50442493dc267920ae617834defcbd39f529723621559bc5bdb870893 xarchon-0.60-gtk.patch.bz2 3541
+MD5 d7f3fc32b2ddbbfb8578a3366400c5c6 xarchon-0.60.tar.gz 435088
+RMD160 fdaa7556ee980b004efe4aaae59618fddba8a10b xarchon-0.60.tar.gz 435088
+SHA256 37765e765fd6e35dcaaa830750b5936611644b10566c7b7338d54a496bfbf716 xarchon-0.60.tar.gz 435088
diff --git a/games-strategy/xarchon/xarchon-0.60-r1.ebuild b/games-strategy/xarchon/xarchon-0.60-r1.ebuild
new file mode 100644 (file)
index 0000000..8b6657e
--- /dev/null
@@ -0,0 +1,53 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/xarchon/xarchon-0.60-r1.ebuild,v 1.1 2006/03/15 18:42:06 tupone Exp $
+
+inherit eutils games
+
+DESCRIPTION="modelled after the golden oldie Archon game"
+HOMEPAGE="http://xarchon.seul.org/"
+SRC_URI="ftp://ftp.seul.org/pub/xarchon/${P}.tar.gz
+       http://xarchon.seul.org/${P}.tar.gz
+       mirror://gentoo/${P}-gtk.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE="esd joystick" # also has qt support but it fails :/
+
+DEPEND="=x11-libs/gtk+-1*
+       <dev-util/glade-2
+       esd? ( media-sound/esound )"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       # Applying gtk patch
+       # Fixing gcc-3.4 compiling
+       # Fixing font missing in gentoo
+       epatch "${WORKDIR}/${P}-gtk.patch" \
+               "${FILESDIR}"/01_all_gcc34_font.patch
+       sed -i \
+               -e 's:gtk12-config:gtk-config:' configure \
+               || die "sed configure failed"
+}
+
+src_compile() {
+       local mysndconf
+       use esd \
+               && mysndconf="--with-esd-prefix=/usr" \
+               || mysndconf="--disable-sound"
+       egamesconf \
+               --enable-network \
+               $(use_enable joystick) \
+               --with-default-gtk \
+               ${mysndconf} \
+               || die
+       emake || die "emake failed"
+}
+
+src_install() {
+       egamesinstall || die
+       dodoc AUTHORS ChangeLog NEWS README
+       prepgamesdirs
+}