[arch-commits] Commit in gnome-2048/repos (10 files)

Jan Steffens heftig at archlinux.org
Sun Sep 27 16:26:14 UTC 2015


    Date: Sunday, September 27, 2015 @ 18:26:13
  Author: heftig
Revision: 247544

archrelease: copy trunk to gnome-unstable-x86_64, gnome-unstable-i686

Added:
  gnome-2048/repos/gnome-unstable-i686/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch
    (from rev 247543, gnome-2048/trunk/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch)
  gnome-2048/repos/gnome-unstable-i686/PKGBUILD
    (from rev 247543, gnome-2048/trunk/PKGBUILD)
  gnome-2048/repos/gnome-unstable-i686/gnome-2048.install
    (from rev 247543, gnome-2048/trunk/gnome-2048.install)
  gnome-2048/repos/gnome-unstable-x86_64/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch
    (from rev 247543, gnome-2048/trunk/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch)
  gnome-2048/repos/gnome-unstable-x86_64/PKGBUILD
    (from rev 247543, gnome-2048/trunk/PKGBUILD)
  gnome-2048/repos/gnome-unstable-x86_64/gnome-2048.install
    (from rev 247543, gnome-2048/trunk/gnome-2048.install)
Deleted:
  gnome-2048/repos/gnome-unstable-i686/PKGBUILD
  gnome-2048/repos/gnome-unstable-i686/gnome-2048.install
  gnome-2048/repos/gnome-unstable-x86_64/PKGBUILD
  gnome-2048/repos/gnome-unstable-x86_64/gnome-2048.install

---------------------------------------------------------------------------------------+
 /PKGBUILD                                                                             |   70 ++++++++++
 /gnome-2048.install                                                                   |   24 +++
 gnome-unstable-i686/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch   |   55 +++++++
 gnome-unstable-i686/PKGBUILD                                                          |   28 ----
 gnome-unstable-i686/gnome-2048.install                                                |   12 -
 gnome-unstable-x86_64/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch |   55 +++++++
 gnome-unstable-x86_64/PKGBUILD                                                        |   28 ----
 gnome-unstable-x86_64/gnome-2048.install                                              |   12 -
 8 files changed, 204 insertions(+), 80 deletions(-)

Copied: gnome-2048/repos/gnome-unstable-i686/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch (from rev 247543, gnome-2048/trunk/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch)
===================================================================
--- gnome-unstable-i686/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch	                        (rev 0)
+++ gnome-unstable-i686/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch	2015-09-27 16:26:13 UTC (rev 247544)
@@ -0,0 +1,55 @@
+From 8a18366cb3c054f01ceef43b403cf0838937bb70 Mon Sep 17 00:00:00 2001
+From: Yanko Kaneti <yaneti at declera.com>
+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
+

Deleted: gnome-unstable-i686/PKGBUILD
===================================================================
--- gnome-unstable-i686/PKGBUILD	2015-09-27 16:25:29 UTC (rev 247543)
+++ gnome-unstable-i686/PKGBUILD	2015-09-27 16:26:13 UTC (rev 247544)
@@ -1,28 +0,0 @@
-# $Id$
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-
-pkgname=gnome-2048
-pkgver=3.18.0
-pkgrel=1
-pkgdesc="Obtain the 2048 tile"
-url="https://wiki.gnome.org/Apps/2048"
-arch=(x86_64 i686)
-license=(GPL3)
-depends=(clutter-gtk libgee libgames-support)
-makedepends=(intltool vala itstool)
-groups=(gnome-extra)
-install=gnome-2048.install
-options=(!emptydirs)
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('87cf703f5dad02bb22ba464faa5fdf8a0784e64652de23b7f1c8685fc3d69938')
-
-build() {
-  cd $pkgname-$pkgver
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="$pkgdir" install
-}

Copied: gnome-2048/repos/gnome-unstable-i686/PKGBUILD (from rev 247543, gnome-2048/trunk/PKGBUILD)
===================================================================
--- gnome-unstable-i686/PKGBUILD	                        (rev 0)
+++ gnome-unstable-i686/PKGBUILD	2015-09-27 16:26:13 UTC (rev 247544)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgname=gnome-2048
+pkgver=3.18.0
+pkgrel=2
+pkgdesc="Obtain the 2048 tile"
+url="https://wiki.gnome.org/Apps/2048"
+arch=(x86_64 i686)
+license=(GPL3)
+depends=(clutter-gtk libgee libgames-support)
+makedepends=(intltool vala itstool)
+groups=(gnome-extra)
+install=gnome-2048.install
+options=(!emptydirs)
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
+        '0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch')
+sha256sums=('87cf703f5dad02bb22ba464faa5fdf8a0784e64652de23b7f1c8685fc3d69938'
+            'bb9eb8e5a977828aeadb974324742c0a5b16abf2a42533db95b1a372c85b16de')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i "../0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch"
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Deleted: gnome-unstable-i686/gnome-2048.install
===================================================================
--- gnome-unstable-i686/gnome-2048.install	2015-09-27 16:25:29 UTC (rev 247543)
+++ gnome-unstable-i686/gnome-2048.install	2015-09-27 16:26:13 UTC (rev 247544)
@@ -1,12 +0,0 @@
-post_install() {
-  glib-compile-schemas usr/share/glib-2.0/schemas
-  gtk-update-icon-cache -f -q usr/share/icons/hicolor
-}
-
-post_upgrade() {
-  post_install
-}
-
-post_remove() {
-  post_install
-}

Copied: gnome-2048/repos/gnome-unstable-i686/gnome-2048.install (from rev 247543, gnome-2048/trunk/gnome-2048.install)
===================================================================
--- gnome-unstable-i686/gnome-2048.install	                        (rev 0)
+++ gnome-unstable-i686/gnome-2048.install	2015-09-27 16:26:13 UTC (rev 247544)
@@ -0,0 +1,12 @@
+post_install() {
+  glib-compile-schemas usr/share/glib-2.0/schemas
+  gtk-update-icon-cache -f -q usr/share/icons/hicolor
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove() {
+  post_install
+}

Copied: gnome-2048/repos/gnome-unstable-x86_64/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch (from rev 247543, gnome-2048/trunk/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch)
===================================================================
--- gnome-unstable-x86_64/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch	                        (rev 0)
+++ gnome-unstable-x86_64/0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch	2015-09-27 16:26:13 UTC (rev 247544)
@@ -0,0 +1,55 @@
+From 8a18366cb3c054f01ceef43b403cf0838937bb70 Mon Sep 17 00:00:00 2001
+From: Yanko Kaneti <yaneti at declera.com>
+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
+

Deleted: gnome-unstable-x86_64/PKGBUILD
===================================================================
--- gnome-unstable-x86_64/PKGBUILD	2015-09-27 16:25:29 UTC (rev 247543)
+++ gnome-unstable-x86_64/PKGBUILD	2015-09-27 16:26:13 UTC (rev 247544)
@@ -1,28 +0,0 @@
-# $Id$
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-
-pkgname=gnome-2048
-pkgver=3.18.0
-pkgrel=1
-pkgdesc="Obtain the 2048 tile"
-url="https://wiki.gnome.org/Apps/2048"
-arch=(x86_64 i686)
-license=(GPL3)
-depends=(clutter-gtk libgee libgames-support)
-makedepends=(intltool vala itstool)
-groups=(gnome-extra)
-install=gnome-2048.install
-options=(!emptydirs)
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('87cf703f5dad02bb22ba464faa5fdf8a0784e64652de23b7f1c8685fc3d69938')
-
-build() {
-  cd $pkgname-$pkgver
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-  make
-}
-
-package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="$pkgdir" install
-}

Copied: gnome-2048/repos/gnome-unstable-x86_64/PKGBUILD (from rev 247543, gnome-2048/trunk/PKGBUILD)
===================================================================
--- gnome-unstable-x86_64/PKGBUILD	                        (rev 0)
+++ gnome-unstable-x86_64/PKGBUILD	2015-09-27 16:26:13 UTC (rev 247544)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgname=gnome-2048
+pkgver=3.18.0
+pkgrel=2
+pkgdesc="Obtain the 2048 tile"
+url="https://wiki.gnome.org/Apps/2048"
+arch=(x86_64 i686)
+license=(GPL3)
+depends=(clutter-gtk libgee libgames-support)
+makedepends=(intltool vala itstool)
+groups=(gnome-extra)
+install=gnome-2048.install
+options=(!emptydirs)
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
+        '0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch')
+sha256sums=('87cf703f5dad02bb22ba464faa5fdf8a0784e64652de23b7f1c8685fc3d69938'
+            'bb9eb8e5a977828aeadb974324742c0a5b16abf2a42533db95b1a372c85b16de')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i "../0001-game-Make-new_game-work-in-the-case-of-game-not-alre.patch"
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Deleted: gnome-unstable-x86_64/gnome-2048.install
===================================================================
--- gnome-unstable-x86_64/gnome-2048.install	2015-09-27 16:25:29 UTC (rev 247543)
+++ gnome-unstable-x86_64/gnome-2048.install	2015-09-27 16:26:13 UTC (rev 247544)
@@ -1,12 +0,0 @@
-post_install() {
-  glib-compile-schemas usr/share/glib-2.0/schemas
-  gtk-update-icon-cache -f -q usr/share/icons/hicolor
-}
-
-post_upgrade() {
-  post_install
-}
-
-post_remove() {
-  post_install
-}

Copied: gnome-2048/repos/gnome-unstable-x86_64/gnome-2048.install (from rev 247543, gnome-2048/trunk/gnome-2048.install)
===================================================================
--- gnome-unstable-x86_64/gnome-2048.install	                        (rev 0)
+++ gnome-unstable-x86_64/gnome-2048.install	2015-09-27 16:26:13 UTC (rev 247544)
@@ -0,0 +1,12 @@
+post_install() {
+  glib-compile-schemas usr/share/glib-2.0/schemas
+  gtk-update-icon-cache -f -q usr/share/icons/hicolor
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove() {
+  post_install
+}



More information about the arch-commits mailing list