From ac5ada660240f37d7347e42123071990f616e418 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Feb 2012 23:14:54 +0000 Subject: Wed Feb 1 23:14:54 UTC 2012 --- extra/gnome-games/PKGBUILD | 27 +++++++++++++++------------ extra/gnome-games/gnome-sudoku-fix.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 extra/gnome-games/gnome-sudoku-fix.patch (limited to 'extra/gnome-games') diff --git a/extra/gnome-games/PKGBUILD b/extra/gnome-games/PKGBUILD index ddaf0d307..b891651d3 100644 --- a/extra/gnome-games/PKGBUILD +++ b/extra/gnome-games/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 140893 2011-10-20 05:42:40Z ibiru $ +# $Id: PKGBUILD 148440 2012-01-31 22:33:21Z ibiru $ # Maintainer: Jan de Groot pkgname=gnome-games pkgver=3.2.1 -pkgrel=1 +pkgrel=2 pkgdesc="Some Games for GNOME" arch=('i686' 'x86_64') license=('GPL') @@ -13,11 +13,14 @@ options=('!emptydirs' '!libtool') install=gnome-games.install url="http://www.gnome.org" groups=('gnome-extra') -source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz) -sha256sums=('b40fe59537fd58af1bd8163897684883b730ee0f0257d23b493b13e21d105a3b') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz + gnome-sudoku-fix.patch) +sha256sums=('b40fe59537fd58af1bd8163897684883b730ee0f0257d23b493b13e21d105a3b' + '00daafd11078355e16f384fe98dab69ee7e03037c8c311e7180f8f896965a715') build() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i "$srcdir/gnome-sudoku-fix.patch" PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --disable-scrollkeeper \ --disable-static \ @@ -27,15 +30,15 @@ build() { } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + cd "$srcdir/$pkgname-$pkgver" + make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install # Remove all scores, we generate them from postinstall - rm -rf "${pkgdir}/var" + rm -rf "$pkgdir/var" - install -m755 -d "${pkgdir}/usr/share/gconf/schemas" - gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnome-games ${pkgdir}/etc/gconf/schemas/*.schemas - rm -f ${pkgdir}/etc/gconf/schemas/*.schemas + install -m755 -d "$pkgdir/usr/share/gconf/schemas" + gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain gnome-games "$pkgdir"/etc/gconf/schemas/*.schemas + rm -f "$pkgdir"/etc/gconf/schemas/*.schemas - sed -i 's_#! /usr/bin/env python_#!/usr/bin/env python2_' ${pkgdir}/usr/bin/gnome-sudoku + sed -i 's_#! /usr/bin/env python_#!/usr/bin/env python2_' "$pkgdir/usr/bin/gnome-sudoku" } diff --git a/extra/gnome-games/gnome-sudoku-fix.patch b/extra/gnome-games/gnome-sudoku-fix.patch new file mode 100644 index 000000000..ec29f34ab --- /dev/null +++ b/extra/gnome-games/gnome-sudoku-fix.patch @@ -0,0 +1,29 @@ +From 8ab5a3a28281e6b1b649d9ef93628b3433ddd887 Mon Sep 17 00:00:00 2001 +From: John (J5) Palmieri +Date: Mon, 02 Jan 2012 18:39:05 +0000 +Subject: fix type check so gnome-sudoku works with pygobject >= 3.0.3 + +gnome-sudoku was using if type(grid) == str to check if it needed +to convert the game board to a list. Unicode fixes in the latest +pygobject returns unicode strings for any string stored in a +TreeStore. The fix was to correctly check for any string using +isinstance(grid, basestring) + +Note this will not work in python3 so needs to be looked at when +porting +--- +diff --git a/gnome-sudoku/src/lib/sudoku.py b/gnome-sudoku/src/lib/sudoku.py +index a345593..7d28608 100644 +--- a/gnome-sudoku/src/lib/sudoku.py ++++ b/gnome-sudoku/src/lib/sudoku.py +@@ -130,7 +130,7 @@ class SudokuGrid(object): + for n, col in enumerate([[(x, y) for y in range(self.group_size)] for x in range(self.group_size)]): + self.col_coords[n] = col + if grid: +- if type(grid) == str: ++ if isinstance(grid, basestring): + g = re.split("\s+", grid) + side = int(math.sqrt(len(g))) + grid = [] +-- +cgit v0.9.0.2 -- cgit v1.2.3-54-g00ecf