Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=89f57226a3f88de279dd72190637736fa4aa86f7

commit 89f57226a3f88de279dd72190637736fa4aa86f7
Author: Baste <[email protected]>
Date:   Thu Oct 1 14:57:37 2015 +0200

gnome-2048-3.18.0-2-x86_64
- Fix package

diff --git a/source/gnome-extra/gnome-2048/FrugalBuild 
b/source/gnome-extra/gnome-2048/FrugalBuild
index 12c4673..72a9e19 100644
--- a/source/gnome-extra/gnome-2048/FrugalBuild
+++ b/source/gnome-extra/gnome-2048/FrugalBuild
@@ -5,7 +5,7 @@ options+=('asneeded')

pkgname=gnome-2048
pkgver=3.18.0
-pkgrel=1
+pkgrel=2
pkgdesc="Move the tiles until you obtain the 2048 tile."
depends=('clutter-gtk' 'libgames-support')
makedepends=('intltool' 'vala' 'itstool')
@@ -18,4 +18,6 @@ _F_gnome_devel="n"
_F_gnome_ext=".tar.xz"
Finclude gnome gnome-scriptlet
#Fconfopts+=" --with-scores-group=users --with-scores-user=root"
-sha1sums=('db661096a8c1d1f60805e9201dad7e0a7b74316b')
+source=($source fix.patch)
+sha1sums=('db661096a8c1d1f60805e9201dad7e0a7b74316b' \
+          '25e07e685f231b092623d8fecc179085798b3676')
diff --git a/source/gnome-extra/gnome-2048/fix.patch 
b/source/gnome-extra/gnome-2048/fix.patch
new file mode 100644
index 0000000..1f8c40c
--- /dev/null
+++ b/source/gnome-extra/gnome-2048/fix.patch
@@ -0,0 +1,56 @@
+From 8a18366cb3c054f01ceef43b403cf0838937bb70 Mon Sep 17 00:00:00 2001
+From: Yanko Kaneti <[email protected]>
+Date: Sat, 26 Sep 2015 13:18:31 +0300
+Subject: [PATCH] game: Make new_game() work in the case of game not already
+ existing
+
+https://bugzilla.gnome.org/show_bug.cgi?id=755658
+---
+ src/game.vala | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+diff --git a/src/game.vala b/src/game.vala
+index 4142223..d8673c6 100644
+--- a/src/game.vala
++++ b/src/game.vala
+@@ -107,7 +107,11 @@ public class Game : GLib.Object
+   {
+     _grid.clear ();
+     _undo_stack.clear ();
+-    _clear_foreground ();
++    // new_game could be called without an existing game
++    if (_background == null) {
++      _init_background ();
++    } else
++      _clear_foreground ();
+     score = 0;
+     _state = GameState.SHOWING_FIRST_TILE;
+     _create_random_tile ();
+@@ -148,19 +152,13 @@ public class Game : GLib.Object
+     try {
+       FileUtils.get_contents (_saved_path, out contents);
+     } catch (FileError e) {
+-      // FIXME: Returning false guarantees a crash, because _clear_foreground
+-      // will be called before _init_background(). Also, warning here makes no
+-      // sense, since restoring is expected to fail if no previously-saved 
game
+-      // exists. Someone needs to take a closer look at this to see what 
should
+-      // happen if this function needs to return false, or if it needs a 
return
+-      // value at all.
+-
+-      // warning ("Failed to restore game: %s", e.message);
+-      // return false;
++      return false;
+     }
+
+-    if (!_grid.load (contents))
++    if (!_grid.load (contents)) {
++      warning ("Failed to restore game from saved file");
+       return false;
++    }
+
+     lines = contents.split ("\n");
+     score = (uint)int.parse (lines[lines.length-2]);
+--
+2.5.3
+
+
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to