summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Seiler <rizzo@gentoo.org>2004-02-24 16:38:41 +0000
committerDon Seiler <rizzo@gentoo.org>2004-02-24 16:38:41 +0000
commit7269ccf4a9e1229f2edcff4d7eafb932e6045285 (patch)
tree44809798dbb017880298254c4005f655c12fb605 /games-board/gnocatan
parentClosing #42603. (Manifest recommit) (diff)
downloadgentoo-2-7269ccf4a9e1229f2edcff4d7eafb932e6045285.tar.gz
gentoo-2-7269ccf4a9e1229f2edcff4d7eafb932e6045285.tar.bz2
gentoo-2-7269ccf4a9e1229f2edcff4d7eafb932e6045285.zip
Patches to fix some upstream bugs, namely the cursed chatting bug and server crashes
Diffstat (limited to 'games-board/gnocatan')
-rw-r--r--games-board/gnocatan/ChangeLog10
-rw-r--r--games-board/gnocatan/Manifest11
-rw-r--r--games-board/gnocatan/files/chat.diff51
-rw-r--r--games-board/gnocatan/files/digest-gnocatan-0.8.1.16-r11
-rw-r--r--games-board/gnocatan/files/gmap.diff16
-rw-r--r--games-board/gnocatan/files/nothing.diff28
-rw-r--r--games-board/gnocatan/files/servertrade.diff104
-rw-r--r--games-board/gnocatan/gnocatan-0.8.1.16-r1.ebuild33
8 files changed, 249 insertions, 5 deletions
diff --git a/games-board/gnocatan/ChangeLog b/games-board/gnocatan/ChangeLog
index 78831ce12465..3e553ffe0138 100644
--- a/games-board/gnocatan/ChangeLog
+++ b/games-board/gnocatan/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for games-board/gnocatan
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-board/gnocatan/ChangeLog,v 1.6 2004/01/30 03:41:18 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-board/gnocatan/ChangeLog,v 1.7 2004/02/24 16:38:41 rizzo Exp $
+
+*gnocatan-0.8.1.16-r1 (24 Feb 2004)
+
+ 24 Feb 2004; Don Seiler <rizzo@gentoo.org>; gnocatan-0.8.1.16-r1.ebuild,
+ files/chat.diff, files/gmap.diff, files/nothing.diff,
+ files/servertrade.diff:
+ Patches to fix some upstream bugs, namely the cursed chatting bug and server
+ crashes
29 Jan 2004; Michael Sterrett <mr_bones_@gentoo.org>
gnocatan-0.7.1-r1.ebuild, gnocatan-0.7.1-r2.ebuild,
diff --git a/games-board/gnocatan/Manifest b/games-board/gnocatan/Manifest
index 8630cdf4a0dd..ea0879399f0c 100644
--- a/games-board/gnocatan/Manifest
+++ b/games-board/gnocatan/Manifest
@@ -1,7 +1,10 @@
-MD5 598461790e6ce6e5e69321c13ff915b1 ChangeLog 1813
-MD5 a30c9d4ce8f9629d6d7323eaab258343 metadata.xml 241
MD5 125dc455016cc8dfbcadf3487499ada6 gnocatan-0.8.0.0.ebuild 768
MD5 7c535cdca352b4705ddd57f098b131a7 gnocatan-0.8.1.16.ebuild 633
-MD5 dcde661f2b2d171c64e989779ceaa2ec files/gnocatan-wijnen-patch.diff 6134
-MD5 f7edf2ac07200fa2cb176fd70558df99 files/digest-gnocatan-0.8.1.16 70
+MD5 ccf17b60f0e3a620571cc47fe6e22ae1 gnocatan-0.8.1.16-r1.ebuild 721
+MD5 598461790e6ce6e5e69321c13ff915b1 ChangeLog 1813
+MD5 a30c9d4ce8f9629d6d7323eaab258343 metadata.xml 241
MD5 62b58d24373317098e61680e9310028a files/digest-gnocatan-0.8.0.0 69
+MD5 f7edf2ac07200fa2cb176fd70558df99 files/digest-gnocatan-0.8.1.16-r1 70
+MD5 9022b7d722de7336e084c4a2e2f18763 files/gnocatan-0.8.1.16-chat.diff 1593
+MD5 f7edf2ac07200fa2cb176fd70558df99 files/digest-gnocatan-0.8.1.16 70
+MD5 dcde661f2b2d171c64e989779ceaa2ec files/gnocatan-wijnen-patch.diff 6134
diff --git a/games-board/gnocatan/files/chat.diff b/games-board/gnocatan/files/chat.diff
new file mode 100644
index 000000000000..93d67ba4ab12
--- /dev/null
+++ b/games-board/gnocatan/files/chat.diff
@@ -0,0 +1,51 @@
+Index: chat.c
+===================================================================
+RCS file: /cvsroot/gnocatan/gnocatan/client/gtk/chat.c,v
+retrieving revision 1.2
+diff -u -p -r1.2 chat.c
+--- chat.c 1 Jan 2004 19:23:09 -0000 1.2
++++ chat.c 23 Feb 2004 23:04:29 -0000
+@@ -19,15 +19,16 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#define GDK_DISABLE_DEPRECATED 1
++#define GTK_DISABLE_DEPRECATED 1
++#define GNOME_DISABLE_DEPRECATED 1
++
+ #include "config.h"
+-#include <string.h>
+-
+-#include "log.h"
+ #include "frontend.h"
+
+-#define MAX_CHAT 512 /* maximum chat message size */
++#define MAX_CHAT 512 /* maximum chat message size */
+
+-static GtkWidget *chat_entry; /* messages text widget */
++static GtkWidget *chat_entry; /* messages text widget */
+
+ static void chat_cb(GtkEditable *editable, UNUSED(gpointer user_data))
+ {
+@@ -59,8 +60,9 @@ GtkWidget *chat_build_panel()
+ gtk_widget_show(frame);
+
+ chat_entry = gtk_entry_new();
+- gtk_signal_connect(GTK_OBJECT(chat_entry), "activate",
+- GTK_SIGNAL_FUNC(chat_cb), NULL);
++ gtk_entry_set_max_length(GTK_ENTRY(chat_entry), MAX_CHAT);
++ g_signal_connect(G_OBJECT(chat_entry), "activate",
++ G_CALLBACK(chat_cb), NULL);
+ gtk_widget_show(chat_entry);
+ gtk_container_add(GTK_CONTAINER(frame), chat_entry);
+
+@@ -69,5 +71,8 @@ GtkWidget *chat_build_panel()
+
+ void chat_set_focus(void)
+ {
+- gtk_widget_grab_focus(GTK_WIDGET(chat_entry));
++ if (!gtk_widget_is_focus(chat_entry)) {
++ gtk_widget_grab_focus(chat_entry);
++ gtk_editable_set_position(GTK_EDITABLE(chat_entry), -1);
++ }
+ }
diff --git a/games-board/gnocatan/files/digest-gnocatan-0.8.1.16-r1 b/games-board/gnocatan/files/digest-gnocatan-0.8.1.16-r1
new file mode 100644
index 000000000000..fe963935f0ef
--- /dev/null
+++ b/games-board/gnocatan/files/digest-gnocatan-0.8.1.16-r1
@@ -0,0 +1 @@
+MD5 9dd31aad77a44ed2e3e8ba6c39e5aa7e gnocatan-0.8.1.16.tar.gz 2116705
diff --git a/games-board/gnocatan/files/gmap.diff b/games-board/gnocatan/files/gmap.diff
new file mode 100644
index 000000000000..06cba4ceddcf
--- /dev/null
+++ b/games-board/gnocatan/files/gmap.diff
@@ -0,0 +1,16 @@
+Index: client/gtk/gui.c
+===================================================================
+RCS file: /cvsroot/gnocatan/gnocatan/client/gtk/gui.c,v
+retrieving revision 1.4
+diff -u -p -r1.4 gui.c
+--- client/gtk/gui.c 2 Jan 2004 13:33:50 -0000 1.4
++++ client/gtk/gui.c 6 Feb 2004 18:25:41 -0000
+@@ -296,7 +296,7 @@ void gui_highlight_chits(gint roll)
+ static gint expose_map_cb(GtkWidget *area, GdkEventExpose *event,
+ UNUSED(gpointer user_data))
+ {
+- if (area->window == NULL || map == NULL)
++ if (area->window == NULL || map == NULL || gmap == NULL)
+ return FALSE;
+
+ if (gmap->pixmap == NULL) {
diff --git a/games-board/gnocatan/files/nothing.diff b/games-board/gnocatan/files/nothing.diff
new file mode 100644
index 000000000000..d7986315bb14
--- /dev/null
+++ b/games-board/gnocatan/files/nothing.diff
@@ -0,0 +1,28 @@
+Index: client/common/resource.c
+===================================================================
+RCS file: /cvsroot/gnocatan/gnocatan/client/common/resource.c,v
+retrieving revision 1.3
+diff -u -p -r1.3 resource.c
+--- client/common/resource.c 11 Jan 2004 22:38:26 -0000 1.3
++++ client/common/resource.c 8 Feb 2004 20:38:15 -0000
+@@ -134,7 +134,7 @@ void resource_format_num(gchar *str, gui
+ str[len - 1] = '\0';
+ return;
+ }
+-
++
+ if (num_types == 1) {
+ for (idx = 0; idx < NO_RESOURCE; idx++) {
+ gint num = resources[idx];
+@@ -211,6 +211,11 @@ void resource_format_type(gchar *str, gi
+ if (resources[idx] != 0)
+ num_types++;
+
++ if (num_types == 0) {
++ strcpy(str, _("nothing"));
++ return;
++ }
++
+ if (num_types == 1) {
+ for (idx = 0; idx < NO_RESOURCE; idx++) {
+ gint num = resources[idx];
diff --git a/games-board/gnocatan/files/servertrade.diff b/games-board/gnocatan/files/servertrade.diff
new file mode 100644
index 000000000000..8d5af9534484
--- /dev/null
+++ b/games-board/gnocatan/files/servertrade.diff
@@ -0,0 +1,104 @@
+Index: server/player.c
+===================================================================
+RCS file: /cvsroot/gnocatan/gnocatan/server/player.c,v
+retrieving revision 1.37
+diff -u -p -r1.37 player.c
+--- server/player.c 1 Jan 2004 19:23:09 -0000 1.37
++++ server/player.c 8 Feb 2004 00:43:53 -0000
+@@ -402,26 +402,11 @@ void player_archive(Player *player)
+
+ /* If the player was in the middle of a trade, pop the state
+ machine and inform others as necessary */
++ /* This doesn't quite solve anything, since it is still this
++ * player's turn, so the others have to wait for the reconnect
++ * anyway. */
+ state = sm_current(player->sm);
+- if (state == (StateFunc)mode_wait_quote_exit)
+- {
+- sm_pop(player->sm);
+- }
+- else if (state == (StateFunc)mode_domestic_quote)
+- {
+- for (;;) {
+- QuoteInfo *quote;
+- quote = quotelist_find_domestic(game->quotes,
+- player->num, -1);
+- if (quote == NULL)
+- break;
+- quotelist_delete(game->quotes, quote);
+- }
+- player_broadcast(player, PB_RESPOND, "domestic-quote finish\n");
+-
+- sm_pop(player->sm);
+- }
+- else if (state == (StateFunc)mode_domestic_initiate)
++ if (state == (StateFunc)mode_domestic_initiate)
+ {
+ trade_finish_domestic(player);
+ }
+Index: server/trade.c
+===================================================================
+RCS file: /cvsroot/gnocatan/gnocatan/server/trade.c,v
+retrieving revision 1.14
+diff -u -p -r1.14 trade.c
+--- server/trade.c 1 Jan 2004 19:23:09 -0000 1.14
++++ server/trade.c 8 Feb 2004 00:43:53 -0000
+@@ -125,6 +125,27 @@ gboolean mode_wait_quote_exit(Player *pl
+ return FALSE;
+ }
+
++static void end_quote (Player *player)
++{
++ /* Player has rejected domestic trade - remove all
++ * quotes from that player
++ */
++ for (;;) {
++ QuoteInfo *quote;
++ quote = quotelist_find_domestic(player->game->quotes,
++ player->num, -1);
++ if (quote == NULL)
++ break;
++ quotelist_delete(player->game->quotes, quote);
++ }
++ player_broadcast(player, PB_RESPOND, "domestic-quote finish\n");
++
++ if (player->disconnected)
++ sm_pop (player->sm);
++ else
++ sm_goto(player->sm, (StateFunc)mode_wait_quote_exit);
++}
++
+ gboolean mode_domestic_quote(Player *player, gint event)
+ {
+ StateMachine *sm = player->sm;
+@@ -138,20 +159,7 @@ gboolean mode_domestic_quote(Player *pla
+ return FALSE;
+
+ if (sm_recv(sm, "domestic-quote finish")) {
+- /* Player has rejected domestic trade - remove all
+- * quotes from that player
+- */
+- for (;;) {
+- QuoteInfo *quote;
+- quote = quotelist_find_domestic(game->quotes,
+- player->num, -1);
+- if (quote == NULL)
+- break;
+- quotelist_delete(game->quotes, quote);
+- }
+- player_broadcast(player, PB_RESPOND, "domestic-quote finish\n");
+-
+- sm_goto(sm, (StateFunc)mode_wait_quote_exit);
++ end_quote (player);
+ return TRUE;
+ }
+
+@@ -209,7 +217,7 @@ void trade_finish_domestic(Player *playe
+ list != NULL; list = player_next_real(list)) {
+ Player *scan = list->data;
+ if (scan != player && scan->num < game->params->num_players)
+- sm_goto(scan->sm, (StateFunc)mode_wait_quote_exit);
++ end_quote (scan);
+ }
+ quotelist_free(game->quotes);
+ game->quotes = NULL;
diff --git a/games-board/gnocatan/gnocatan-0.8.1.16-r1.ebuild b/games-board/gnocatan/gnocatan-0.8.1.16-r1.ebuild
new file mode 100644
index 000000000000..1d0d9925d9ec
--- /dev/null
+++ b/games-board/gnocatan/gnocatan-0.8.1.16-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-board/gnocatan/gnocatan-0.8.1.16-r1.ebuild,v 1.1 2004/02/24 16:38:41 rizzo Exp $
+
+inherit gnome2
+
+DESCRIPTION="A clone of the popular board game The Settlers of Catan"
+HOMEPAGE="http://gnocatan.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnocatan/${P}.tar.gz"
+
+KEYWORDS="~x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="nls"
+
+DEPEND=">=gnome-base/libgnomeui-2.2*
+ =dev-libs/glib-1.2*
+ >=app-text/scrollkeeper-0.3*"
+
+G2CONF="${G2CONF} `use_enable nls`"
+DOCS="AUTHORS ChangeLog README"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ cd ${S}/client/gtk
+ epatch ${FILESDIR}/chat.diff
+ epatch ${FILESDIR}/gmap.diff
+ cd ${S}/client/common
+ epatch ${FILESDIR}/nothing.diff
+ cd ${S}/server
+ epatch ${FILESDIR}/servertrade.diff
+}