r22523 - in /desktop/unstable/gnome-games/debian: changelog patches/30_gnobots_max_path_undefined.patch patches/series watch

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Sun Dec 6 16:23:36 UTC 2009


Author: pochu
Date: Sun Dec  6 16:23:35 2009
New Revision: 22523

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22523
Log:
* debian/watch: don't uupdate.
* debian/patches/30_gnobots_max_path_undefined.patch:
  - Fix build failure on the Hurd where PATH_MAX is undefined.

Added:
    desktop/unstable/gnome-games/debian/patches/30_gnobots_max_path_undefined.patch
Modified:
    desktop/unstable/gnome-games/debian/changelog
    desktop/unstable/gnome-games/debian/patches/series
    desktop/unstable/gnome-games/debian/watch

Modified: desktop/unstable/gnome-games/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/changelog?rev=22523&op=diff
==============================================================================
--- desktop/unstable/gnome-games/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-games/debian/changelog [utf-8] Sun Dec  6 16:23:35 2009
@@ -1,3 +1,11 @@
+gnome-games (1:2.28.1-2) UNRELEASED; urgency=low
+
+  * debian/watch: don't uupdate.
+  * debian/patches/30_gnobots_max_path_undefined.patch:
+    - Fix build failure on the Hurd where PATH_MAX is undefined.
+
+ -- Emilio Pozuelo Monfort <pochu at debian.org>  Sat, 05 Dec 2009 18:08:31 +0100
+
 gnome-games (1:2.28.1-1) unstable; urgency=low
 
   [ Josselin Mouette ]

Added: desktop/unstable/gnome-games/debian/patches/30_gnobots_max_path_undefined.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/patches/30_gnobots_max_path_undefined.patch?rev=22523&op=file
==============================================================================
--- desktop/unstable/gnome-games/debian/patches/30_gnobots_max_path_undefined.patch (added)
+++ desktop/unstable/gnome-games/debian/patches/30_gnobots_max_path_undefined.patch [utf-8] Sun Dec  6 16:23:35 2009
@@ -1,0 +1,158 @@
+diff --git a/gnobots2/gameconfig.c b/gnobots2/gameconfig.c
+index 8be6bf2..fd97af5 100644
+--- a/gnobots2/gameconfig.c
++++ b/gnobots2/gameconfig.c
+@@ -71,7 +71,7 @@ load_config (gchar * fname)
+   GameConfig *gcfg;
+   gint pflag = 0;
+   FILE *fp;
+-  gchar buffer[PATH_MAX];
++  gchar buffer[256];
+   gchar *bptr;
+   gchar *bpstart, *bpstart2;
+   gchar *vptr;
+@@ -93,7 +93,7 @@ load_config (gchar * fname)
+   gcfg->description = g_string_new (bpstart2);
+   g_free (bpstart2);
+ 
+-  while (fgets (buffer, 256, fp) != NULL) {
++  while (fgets (buffer, sizeof(buffer), fp) != NULL) {
+     if (strlen (buffer) < 3)
+       continue;
+ 
+@@ -416,13 +416,12 @@ current_game_config (void)
+  * returns a string containing the name of the specified configuration
+  *
+  * Returns:
+- * pointer to a string containing the name
++ * pointer to a string containing the name that the caller must free.
+  **/
+ gchar *
+ game_config_name (gint n)
+ {
+-  static gchar buffer[PATH_MAX];
+-  gchar *ptr = buffer;
++  gchar *buffer, *ptr;
+ 
+   if (game_configs == NULL)
+     return NULL;
+@@ -430,7 +429,8 @@ game_config_name (gint n)
+   if ((n < 0) || (n >= num_configs))
+     return NULL;
+ 
+-  strcpy (buffer, game_configs[n]->description->str);
++  buffer = g_strdup (game_configs[n]->description->str);
++  ptr = buffer;
+ 
+   while (*ptr) {
+     if (*ptr == '_') {
+diff --git a/gnobots2/gnobots.c b/gnobots2/gnobots.c
+index 1e3d6fe..c3c028f 100644
+--- a/gnobots2/gnobots.c
++++ b/gnobots2/gnobots.c
+@@ -200,6 +200,7 @@ main (int argc, char *argv[])
+   GOptionContext *context;
+   struct timeval tv;
+   gint i;
++  gchar *config;
+   gboolean retval;
+   GError *error = NULL;
+ #ifdef WITH_SMCLIENT
+@@ -356,10 +357,13 @@ main (int argc, char *argv[])
+ 
+   if (cmdline_config) {
+     for (i = 0; i < num_game_configs (); ++i) {
+-      if (!strcmp (cmdline_config, game_config_name (i))) {
++      config = game_config_name (i);
++      if (!strcmp (cmdline_config, config)) {
+ 	properties_set_config (i);
++	g_free (config);
+ 	break;
+       }
++      g_free (config);
+     }
+   }
+ 
+diff --git a/gnobots2/properties.c b/gnobots2/properties.c
+index 32d70f4..0d0b347 100644
+--- a/gnobots2/properties.c
++++ b/gnobots2/properties.c
+@@ -213,11 +213,14 @@ pmap_selection (GtkWidget * widget, gpointer data)
+ static void
+ type_selection (GtkWidget * widget, gpointer data)
+ {
++  gchar *config;
+   gint num = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
+ 
+   properties.selected_config = num;
+ 
+-  conf_set_configuration (game_config_name (properties.selected_config));
++  config = game_config_name (properties.selected_config);
++  conf_set_configuration (config);
++  g_free (config);
+ 
+   set_game_config (properties.selected_config);
+ 
+@@ -307,6 +310,7 @@ static void
+ fill_typemenu (GtkWidget * menu)
+ {
+   gint i;
++  gchar *config;
+ 
+ #if 0
+   /* this is just a place holder so that xgettext can found the strings to
+@@ -322,7 +326,9 @@ fill_typemenu (GtkWidget * menu)
+ #endif
+ 
+   for (i = 0; i < num_game_configs (); ++i) {
+-    gtk_combo_box_append_text (GTK_COMBO_BOX (menu), _(game_config_name (i)));
++    config = game_config_name (i);
++    gtk_combo_box_append_text (GTK_COMBO_BOX (menu), _(config));
++    g_free (config);
+   }
+ 
+   gtk_combo_box_set_active (GTK_COMBO_BOX (menu), properties.selected_config);
+@@ -593,7 +599,7 @@ load_properties (void)
+ {
+   gchar *cname = NULL;
+   gint i;
+-  gchar *bgcolour;
++  gchar *bgcolour, *config;
+ 
+   load_keys ();
+ 
+@@ -610,10 +616,13 @@ load_properties (void)
+ 
+   properties.selected_config = 0;
+   for (i = 0; i < num_game_configs (); ++i) {
+-    if (!strcmp (cname, game_config_name (i))) {
++    config = game_config_name (i);
++    if (!strcmp (cname, config)) {
++      g_free (config);
+       properties.selected_config = i;
+       break;
+     }
++    g_free (config);
+   }
+   g_free (cname);
+ 
+@@ -717,13 +726,18 @@ gboolean
+ save_properties (void)
+ {
+   gint i;
++  gchar *config;
+ 
+   for (i = 0; i < 12; i++) {
+     conf_set_control_key (i, properties.keys[i]);
+   }
+ 
+   conf_set_theme (properties.themename);
+-  conf_set_configuration (game_config_name (properties.selected_config));
++
++  config = game_config_name (properties.selected_config);
++  conf_set_configuration (config);
++  g_free (config);
++
+   conf_set_use_safe_moves (properties.safe_moves);
+   conf_set_use_super_safe_moves (properties.super_safe_moves);
+   conf_set_enable_sound (properties.sound);

Modified: desktop/unstable/gnome-games/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/patches/series?rev=22523&op=diff
==============================================================================
--- desktop/unstable/gnome-games/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-games/debian/patches/series [utf-8] Sun Dec  6 16:23:35 2009
@@ -3,4 +3,5 @@
 12_ggz_gtk_require-x11.patch
 15_ggz_makefile_vars.patch
 #20_glchess_no3d.patch
+30_gnobots_max_path_undefined.patch
 90_automake_autoconf.patch

Modified: desktop/unstable/gnome-games/debian/watch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/watch?rev=22523&op=diff
==============================================================================
--- desktop/unstable/gnome-games/debian/watch [utf-8] (original)
+++ desktop/unstable/gnome-games/debian/watch [utf-8] Sun Dec  6 16:23:35 2009
@@ -1,4 +1,3 @@
 version=2
 http://ftp.gnome.org/pub/GNOME/sources/gnome-games/([\d\.]+)[02468]/ \
-	gnome-games-(.*)\.tar\.gz \
-	debian uupdate
+	gnome-games-(.*)\.tar\.gz




More information about the pkg-gnome-commits mailing list