Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=20a38c6b01b3ed2a2ef8584a1415c900f1335168

commit 20a38c6b01b3ed2a2ef8584a1415c900f1335168
Author: Devil505 <devil505li...@gmail.com>
Date:   Wed Oct 26 13:01:44 2011 +0200

childsplay-1.6-1-i686
* new package
* closes #2941
* for bouleetbil's kids :)

diff --git a/source/games-extra/childsplay/FrugalBuild 
b/source/games-extra/childsplay/FrugalBuild
new file mode 100644
index 0000000..6b121aa
--- /dev/null
+++ b/source/games-extra/childsplay/FrugalBuild
@@ -0,0 +1,31 @@
+# Compiling Time: 0.01 SBU
+# Maintainer: Devil505 <devil505li...@gmail.com>
+
+pkgname=childsplay
+pkgver=1.6
+pkgrel=1
+pkgdesc="A suite of educational games for young children"
+depends=('pygame' 'pygtk' 'sqlalchemy' 'numpy')
+groups=('games-extra')
+archs=('i686')
+_F_sourceforge_ext=".tgz"
+_F_sourceforge_dirname="schoolsplay"
+Finclude sourceforge
+options=('nostrip')
+source=($source setup.py.diff fix-sqlalchemy-exceptions-import.diff)
+sha1sums=('4f96ff0555f57ed4e4598f3dd9b74ba35231a876' \
+          'b7789865f675cd3f8cb395be77efdb8f783247e7' \
+          '9fdb5a66c47420493a37b225acf106bf018a0528')
+
+_F_desktop_name="Childsplay"
+_F_desktop_desc="Suite of educational games for young children"
+_F_desktop_icon="$pkgname"
+_F_desktop_categories="Game;KidsGame"
+
+build() {
+  Fcd
+  Fpatchall
+  PREFIX="$Fdestdir/usr" python setup.py install --root="$Fdestdir" 
--optimize=1 || Fdie
+  Fdesktop
+  Finstallrel 644 lib/SPData/menu/default/logo_cp_32x32.xpm 
usr/share/pixmaps/childsplay.xpm
+}
diff --git 
a/source/games-extra/childsplay/fix-sqlalchemy-exceptions-import.diff 
b/source/games-extra/childsplay/fix-sqlalchemy-exceptions-import.diff
new file mode 100644
index 0000000..757e60f
--- /dev/null
+++ b/source/games-extra/childsplay/fix-sqlalchemy-exceptions-import.diff
@@ -0,0 +1,28 @@
+Description: Fix sqlalchemy.exceptions import.
+ Use ‘exceptions’ as a normal attribute of the ‘sqlalchemy’ module, 
don't
+ try to import it. (The ‘sqlalchemy.exceptions’ alias in sys.modules was
+ removed in SQLAlchemy 0.7.)
+Author: Jakub Wilk <jw...@debian.org>
+Bug-Debian: http://bugs.debian.org/638747
+Forwarded: no
+Last-Update: 2011-09-16
+
+--- a/SPDataManager.py
++++ b/SPDataManager.py
+@@ -38,7 +38,6 @@
+
+ try:
+     import sqlalchemy as sqla
+-    import sqlalchemy.exceptions as sqlae
+     import SQLTables
+ except ImportError:
+     module_logger.exception("No sqlalchemy package found")
+@@ -82,7 +81,7 @@
+                 sqltb = SQLTables.SqlTables(self.metadata)
+                     # returns lookup table to get table objects by name and 
creates tables
+                 self.tables = sqltb._create_tables(self.metadata, self.engine)
+-            except (AttributeError, sqlae.SQLAlchemyError), info:
++            except (AttributeError, sqla.exceptions.SQLAlchemyError), info:
+                 self.logger.exception("Failed to start the DBase, %s" % info)
+                 raise MyError, info
+             else:
diff --git a/source/games-extra/childsplay/setup.py.diff 
b/source/games-extra/childsplay/setup.py.diff
new file mode 100644
index 0000000..9b603c1
--- /dev/null
+++ b/source/games-extra/childsplay/setup.py.diff
@@ -0,0 +1,54 @@
+--- setup.py   2010-04-12 09:26:52.000000000 -0400
++++ setup.py   2010-04-13 09:11:53.813204216 -0400
+@@ -37,7 +37,7 @@
+ 
-------------------------------------------------------------------------------
+
+ """
+-import os.path
++import os
+ import sys
+ # we check for the special 'uninstall' option, other options are handled by
+ # the distutils stuff.
+@@ -53,13 +53,12 @@
+ else:
+     UNINSTALL = False
+     print __doc__
+-    raw_input("Hit any key to continue\n")
+
+ # Change this if you want to install all the non-python stuff in a different
+ # location.
+-PREFIX = '/usr/local'
+-#PREFIX = '/tmp'
+
++#PREFIX = '/tmp'
++PREFIX = os.environ.get('PREFIX', '/usr/local')
+ # Don't change anything below this line unless you fully understand why you 
want
+ # to make changes.
+
+@@ -277,10 +276,6 @@
+     pdest = os.path.join(get_python_lib(), 'childsplay_sp')
+ print "Looking for previous childsplay python install in %s" % pdest
+ modulepaths['PYTHONCPDIR'] = pdest
+-if os.path.exists(pdest):
+-    print "Found old childsplay_sp python package in %s, removing it..." % 
pdest,
+-    shutil.rmtree(pdest)
+-    print " done"
+
+ #---------- copy starters
+ dest = os.path.join(PREFIX, 'bin')
+@@ -328,13 +323,13 @@
+ if ARE_WE_WINDOWS:
+     src = os.path.join(os.getcwd(), 'windows', 'SPBasePaths.py')
+     dest = os.getcwd()
+-    shutil.copy(src, dest)
++    shutil.copy(src, PREFIX[:-4] + pdest)
+ else:
+     print "Writing the SPBasePaths module...",
+     filelines = ["# AUTO-GENERATED MODULE, DON'T EDIT", \
+         "# This module holds all the paths needed for childsplay_sp.\n"]
+     for k, v in modulepaths.items():
+-        filelines.append("%s = '%s'" % (k, v))
++        filelines.append("%s = '%s'" % (k, v.replace(PREFIX[:-4], '')))
+     f = open(module, 'w')
+     f.write("\n".join(filelines))
+     f.close()
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to