diff options
author | B. Watson <yalhcru@gmail.com> | 2016-08-12 23:24:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-08-12 23:24:58 +0700 |
commit | cf097d5fa6ec1829ecb9933568518736698acc99 (patch) | |
tree | 35f1df9ddc18626554b25d60dc1127bff44a7dcf /games/xarchon/patches | |
parent | fd81ce18f55827c8461ec7bca7203795451e7e7e (diff) |
games/xarchon: Added (fantasy-themed board game).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/xarchon/patches')
-rw-r--r-- | games/xarchon/patches/compilefix.diff | 169 | ||||
-rw-r--r-- | games/xarchon/patches/joystick.diff | 11 | ||||
-rw-r--r-- | games/xarchon/patches/manpage.diff | 28 | ||||
-rw-r--r-- | games/xarchon/patches/remove_gtk.diff | 82 | ||||
-rw-r--r-- | games/xarchon/patches/remove_theme_option.diff | 12 |
5 files changed, 302 insertions, 0 deletions
diff --git a/games/xarchon/patches/compilefix.diff b/games/xarchon/patches/compilefix.diff new file mode 100644 index 0000000000000..2d9a2709635f6 --- /dev/null +++ b/games/xarchon/patches/compilefix.diff @@ -0,0 +1,169 @@ +diff -Naur xarchon-0.60.orig/acinclude.m4 xarchon-0.60/acinclude.m4 +--- xarchon-0.60.orig/acinclude.m4 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/acinclude.m4 2016-08-10 15:44:42.085582512 -0400 +@@ -176,13 +176,13 @@ + QT_LDFLAGS="-L $qtdir/lib" + CFLAGS="$CFLAGS $QT_INCLUDES" + LDFLAGS="$LDFLAGS $QT_LDFLAGS" +-AC_CHECK_LIB(qt, qVersion__Fv, [ ++AC_CHECK_LIB(qt-mt, qt_C_sigchldHnd, [ + AC_PATH_PROG(MOC, moc, notfound, $PATH:$qtdir/bin) + if test "x$MOC" = xnotfound; then + AC_MSG_WARN([Moc is missing; the Qt interface will not be built]) + [$3] + else +- QT_LDFLAGS="$QT_LDFLAGS -lqt" ++ QT_LDFLAGS="$QT_LDFLAGS -lqt-mt -lX11" + AC_SUBST(QT_INCLUDES) + AC_SUBST(QT_LDFLAGS) + [$2] +diff -Naur xarchon-0.60.orig/aclocal.m4 xarchon-0.60/aclocal.m4 +--- xarchon-0.60.orig/aclocal.m4 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/aclocal.m4 2016-08-10 15:44:49.089582758 -0400 +@@ -189,13 +189,13 @@ + QT_LDFLAGS="-L $qtdir/lib" + CFLAGS="$CFLAGS $QT_INCLUDES" + LDFLAGS="$LDFLAGS $QT_LDFLAGS" +-AC_CHECK_LIB(qt, qVersion__Fv, [ ++AC_CHECK_LIB(qt-mt, _Z8qVersionv, [ + AC_PATH_PROG(MOC, moc, notfound, $PATH:$qtdir/bin) + if test "x$MOC" = xnotfound; then + AC_MSG_WARN([Moc is missing; the Qt interface will not be built]) + [$3] + else +- QT_LDFLAGS="$QT_LDFLAGS -lqt" ++ QT_LDFLAGS="$QT_LDFLAGS -lqt-mt" + AC_SUBST(QT_INCLUDES) + AC_SUBST(QT_LDFLAGS) + [$2] +diff -Naur xarchon-0.60.orig/data/Makefile.am xarchon-0.60/data/Makefile.am +--- xarchon-0.60.orig/data/Makefile.am 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/data/Makefile.am 2016-08-11 06:10:28.727404448 -0400 +@@ -11,8 +11,8 @@ + echo "--> Installing theme '$$theme'"; \ + THEME_DIRS=`find $$theme -type d`; \ + for p in $$THEME_DIRS; do \ +- echo "mkdir $(pkgdatadir)/$$p"; \ +- mkdir $(pkgdatadir)/$$p; \ ++ echo "mkdir -p $(DESTDIR)$(pkgdatadir)/$$p"; \ ++ mkdir -p $(DESTDIR)$(pkgdatadir)/$$p; \ + done; \ + THEME_FILES=`find $$theme -type f`; \ + for p in $$THEME_FILES; do \ +diff -Naur xarchon-0.60.orig/src/Genetic.hpp xarchon-0.60/src/Genetic.hpp +--- xarchon-0.60.orig/src/Genetic.hpp 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/src/Genetic.hpp 2016-08-11 06:02:50.212388366 -0400 +@@ -1,6 +1,7 @@ + #ifndef GENETIC_HPP + #define GENETIC_HPP + ++#include <cstdlib> + #include <list> + using namespace std; + +@@ -216,9 +217,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++) { +@@ -264,7 +265,7 @@ + cur_size++; + } + } +- newpop->Eval_Fitness(fit_func); ++ newpop->Eval_Fitness(this->fit_func); + return newpop; + } + +diff -Naur xarchon-0.60.orig/src/Problem.hpp xarchon-0.60/src/Problem.hpp +--- xarchon-0.60.orig/src/Problem.hpp 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/src/Problem.hpp 2016-08-11 05:59:58.156382332 -0400 +@@ -306,14 +306,14 @@ + 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=endtester; ++ delete this->next; + + return ret_val; + } +@@ -340,19 +340,19 @@ + + 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 -Naur xarchon-0.60.orig/src/Xarchon_Problem.cpp xarchon-0.60/src/Xarchon_Problem.cpp +--- xarchon-0.60.orig/src/Xarchon_Problem.cpp 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/src/Xarchon_Problem.cpp 2016-08-11 06:03:37.472390024 -0400 +@@ -1,3 +1,4 @@ ++#include <cstring> + #include "Xarchon_Problem.hpp" + #include "Xarchon_Interface.hpp" + +diff -Naur xarchon-0.60.orig/src/board.h xarchon-0.60/src/board.h +--- xarchon-0.60.orig/src/board.h 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/src/board.h 2016-08-10 16:20:27.874657772 -0400 +@@ -98,7 +98,6 @@ + /*--------------------------------------------------------------------------*/ + + extern int board_turn; +-extern int board_frame_time; + extern CELL board_cells[BOARD_YCELLS][BOARD_XCELLS]; + extern int spell_avails[3][SPELL_COUNT_2]; /* row 0 is light, row 1 is dark */ + extern int init_board_cells[NUM_GAMES][BOARD_YCELLS][BOARD_XCELLS]; +diff -Naur xarchon-0.60.orig/src/qt/qtplayersdialog.h xarchon-0.60/src/qt/qtplayersdialog.h +--- xarchon-0.60.orig/src/qt/qtplayersdialog.h 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/src/qt/qtplayersdialog.h 2016-08-10 16:18:46.872654229 -0400 +@@ -5,9 +5,9 @@ + #ifndef __MY_QT_PLAYERS_DIALOG_H + #define __MY_QT_PLAYERS_DIALOG_H + ++#include "iface.h" + #include <qdialog.h> + +-struct IFACE_PLAYER; + class QtPlayerWidget; + class QButtonGroup; + diff --git a/games/xarchon/patches/joystick.diff b/games/xarchon/patches/joystick.diff new file mode 100644 index 0000000000000..43514bfd62397 --- /dev/null +++ b/games/xarchon/patches/joystick.diff @@ -0,0 +1,11 @@ +diff -Naur xarchon-0.60.orig/src/qt/qthumaniface.cpp xarchon-0.60.joypatch/src/qt/qthumaniface.cpp +--- xarchon-0.60.orig/src/qt/qthumaniface.cpp 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60.joypatch/src/qt/qthumaniface.cpp 2016-08-11 08:07:19.978650355 -0400 +@@ -133,7 +133,6 @@ + if (!human_joystick_init(non_keyboard)) { + #endif + toolkit_message_box("Joystick not available"); +- return false; + #ifdef HAVE_LINUX_JOYSTICK_H + } + #endif diff --git a/games/xarchon/patches/manpage.diff b/games/xarchon/patches/manpage.diff new file mode 100644 index 0000000000000..d7bf2ec84b899 --- /dev/null +++ b/games/xarchon/patches/manpage.diff @@ -0,0 +1,28 @@ +diff -Naur xarchon-0.60.orig/src/xarchon.6 xarchon-0.60/src/xarchon.6 +--- xarchon-0.60.orig/src/xarchon.6 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60/src/xarchon.6 2016-08-11 17:12:47.505798215 -0400 +@@ -304,18 +304,21 @@ + + .SH THE GRAPHICAL USER INTERFACE + ++.B NOTE: ++This section of the manual describes an older version of the ++game. The user interface has been simplified, but there is ++still some useful information here. ++ + The graphical user interface is your means of telling the progam + exactly how you want to play. Using the GUI, you can: + + - define players, select two players to play on either side; +-- select a graphical theme (although currently there is only +-one theme to choose from); + - start and end games; + - and toggle sound. + + .SS DEFINING PLAYERS + +-the program has a concept of "players." A player is merely ++The program has a concept of "players." A player is merely + a collection of configuration choices. For example, one + configuration choice is who plays for this player (a human + at the console, the computer, or perhaps it is played diff --git a/games/xarchon/patches/remove_gtk.diff b/games/xarchon/patches/remove_gtk.diff new file mode 100644 index 0000000000000..81f28f2994d2a --- /dev/null +++ b/games/xarchon/patches/remove_gtk.diff @@ -0,0 +1,82 @@ +diff -Naur xarchon-0.60/configure.in xarchon-0.60.nogtk/configure.in +--- xarchon-0.60/configure.in 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60.nogtk/configure.in 2016-08-11 17:32:05.385838825 -0400 +@@ -69,22 +69,6 @@ + TOOLKIT_LIBS="" + TOOLKIT_LDADDS="" + +-GTK_SUBDIR="" +-AM_PATH_GTK(1.2.0, have_gtk=yes, ) +-if test "x$have_gtk" = xyes; then +- AC_PATH_PROG(GLADE, glade, notfound, $PATH:$gtk_config_exec_prefix/bin) +- if test "x$GLADE" = xnotfound; then +- AC_MSG_WARN([Glade is missing; the GTK+ interface will not be built]) +- have_gtk="" +- else +- GTK_SUBDIR="gtk" +- TOOLKIT_LIBS="$TOOLKIT_LIBS gtk/libgtk.a" +- TOOLKIT_LDADDS="$TOOLKIT_LDADDS $GTK_LIBS" +- AC_DEFINE(HAVE_GTK) +- fi +-fi +-AC_SUBST(GTK_SUBDIR) +- + QT_SUBDIR="" + XC_PATH_QT(whatever, have_qt=yes, ) + if test "x$have_qt" = xyes; then +@@ -104,11 +88,6 @@ + + def_toolkit="none" + +-AC_ARG_WITH(default-gtk, +- [ --with-default-gtk default to GTK+ toolkit ], +- def_toolkit="gtk", +-) +- + AC_ARG_WITH(default-qt, + [ --with-default-qt default to Qt toolkit ], + def_toolkit="qt", +@@ -118,22 +97,11 @@ + + case $def_toolkit in + none) +- if test "x$have_gtk" = xyes; then +- DEFAULT_TOOLKIT="GTK+" +- elif test "x$have_qt" = xyes; then ++ if test "x$have_qt" = xyes; then + DEFAULT_TOOLKIT="Qt" + else + AC_MSG_ERROR([ +- Neither GTK+ nor Qt toolkits were found]) +- fi +- ;; +- +- gtk) +- if test "x$have_gtk" = xyes; then +- DEFAULT_TOOLKIT="GTK+" +- else +- AC_MSG_ERROR([ +- GTK+ was requested, but could not be found]) ++ Qt3 toolkit not found]) + fi + ;; + +@@ -265,7 +233,6 @@ + AC_OUTPUT( + Makefile + src/Makefile +-src/gtk/Makefile + src/qt/Makefile + data/Makefile + stamp.h) +diff -Naur xarchon-0.60/src/Makefile.am xarchon-0.60.nogtk/src/Makefile.am +--- xarchon-0.60/src/Makefile.am 2016-08-11 17:36:55.973849017 -0400 ++++ xarchon-0.60.nogtk/src/Makefile.am 2016-08-11 17:37:05.196849341 -0400 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-SUBDIRS = @GTK_SUBDIR@ @QT_SUBDIR@ ++SUBDIRS = @QT_SUBDIR@ + + INCLUDES = @X_CFLAGS@ @ESD_CFLAGS@ + diff --git a/games/xarchon/patches/remove_theme_option.diff b/games/xarchon/patches/remove_theme_option.diff new file mode 100644 index 0000000000000..20a40b2e9e43d --- /dev/null +++ b/games/xarchon/patches/remove_theme_option.diff @@ -0,0 +1,12 @@ +diff -Naur xarchon-0.60.orig/src/qt/qtguiwidget.cpp xarchon-0.60.menu/src/qt/qtguiwidget.cpp +--- xarchon-0.60.orig/src/qt/qtguiwidget.cpp 2002-01-09 13:34:33.000000000 -0500 ++++ xarchon-0.60.menu/src/qt/qtguiwidget.cpp 2016-08-11 09:10:20.179782939 -0400 +@@ -46,8 +46,6 @@ + + menubar->insertItem("settingsPlayers", popup, "Configure &Players...", + this, SLOT(settingsPlayers())); +- menubar->insertItem("settingsTheme", popup, "Select &Theme...", +- this, SLOT(settingsTheme())); + menubar->insertItem("settingsSound", popup, "Toggle &Sound", + this, SLOT(settingsSound()), Qt::Key_F11); + menubar->setChecked("settingsSound", TRUE); |