summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-kids/childsplay/ChangeLog8
-rw-r--r--games-kids/childsplay/childsplay-0.90.2.ebuild36
-rw-r--r--games-kids/childsplay/files/childsplay-0.90.2-gentoo.patch21
3 files changed, 49 insertions, 16 deletions
diff --git a/games-kids/childsplay/ChangeLog b/games-kids/childsplay/ChangeLog
index 54ef4bc5b51d..19b0b68c74b0 100644
--- a/games-kids/childsplay/ChangeLog
+++ b/games-kids/childsplay/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-kids/childsplay
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-kids/childsplay/ChangeLog,v 1.16 2009/11/26 21:07:05 maekke Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-kids/childsplay/ChangeLog,v 1.17 2010/04/26 10:27:00 tupone Exp $
+
+ 26 Apr 2010; Tupone Alfredo <tupone@gentoo.org> childsplay-0.90.2.ebuild,
+ +files/childsplay-0.90.2-gentoo.patch:
+ Force python2 fixing bug #312251 by arfrever@gentoo.org
26 Nov 2009; Markus Meier <maekke@gentoo.org> childsplay-0.90.2.ebuild:
x86 stable, bug #294562
diff --git a/games-kids/childsplay/childsplay-0.90.2.ebuild b/games-kids/childsplay/childsplay-0.90.2.ebuild
index 09ed2bd65941..70010da556fd 100644
--- a/games-kids/childsplay/childsplay-0.90.2.ebuild
+++ b/games-kids/childsplay/childsplay-0.90.2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-kids/childsplay/childsplay-0.90.2.ebuild,v 1.2 2009/11/26 21:07:05 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-kids/childsplay/childsplay-0.90.2.ebuild,v 1.3 2010/04/26 10:27:00 tupone Exp $
EAPI=2
+PYTHON_DEPEND="2"
inherit eutils python games
DESCRIPTION="A suite of educational games for young children"
@@ -18,27 +19,33 @@ SLOT="0"
KEYWORDS="~amd64 x86"
IUSE=""
-DEPEND=">=dev-lang/python-2.1
- >=dev-python/pygame-1.7.1
+DEPEND=">=dev-python/pygame-1.7.1
>=media-libs/sdl-image-1.2[gif,jpeg,png]
>=media-libs/sdl-ttf-2.0
>=media-libs/sdl-mixer-1.2[vorbis]
media-libs/libogg"
-src_unpack() {
+pkg_setup() {
+ python_set_active_version 2
+ games_pkg_setup
+}
+
+src_prepare() {
local DIR
# Copy the plugins into the main package.
- unpack ${A}
+ mv ../${PN}_plugins-${PLUGINS_VERSION}/Data/AlphabetSounds Data || die
+ mv ../${PN}_plugins-${PLUGINS_VERSION}/add-score.py . || die
for DIR in ${PN}_plugins-${PLUGINS_VERSION} ${PN}_plugins_lfc-${PLUGINS_LFC_VERSION}; do
- cp -r ${DIR}/Data/*.icon.png ${P}/Data/icons || die
- cp -r ${DIR}/lib/* ${P}/lib || die
- cp -r ${DIR}/assetml/* ${P}/assetml || die
+ mv ../${DIR}/Data/*.icon.png Data/icons || die
+ cp -r ../${DIR}/lib/* lib || die
+ mv ../${DIR}/assetml/${PN}/* assetml/${PN} || die
+ rm -rf ../${DIR}
done
- cp -r ${PN}_plugins-${PLUGINS_VERSION}/Data/AlphabetSounds ${P}/Data || die
- cp ${PN}_plugins-${PLUGINS_VERSION}/add-score.py ${P} || die
- cd "${S}"
gunzip man/childsplay.6.gz
+ epatch "${FILESDIR}"/${P}-gentoo.patch \
+ || die "epatch failed"
+ python_convert_shebangs -r 2 .
}
src_install() {
@@ -105,10 +112,10 @@ EOF
# initialize the score file
cp Data/childsplay.score "${D}/${_SCOREFILE}" || die
SCORE_GAMES="Packid,Numbers,Soundmemory,Fallingletters,Findsound,Findsound2,Billiard"
- python add-score.py "${D}/${_SCOREDIR}" $SCORE_GAMES
+ $(PYTHON) add-score.py "${D}/${_SCOREDIR}" $SCORE_GAMES
# translate for the letters game
- python letters-trans.py "${D}/${_ASSETMLDIR}"
+ $(PYTHON) letters-trans.py "${D}/${_ASSETMLDIR}"
doman man/childsplay.6
dodoc doc/README* doc/Changelog doc/copyright
@@ -117,6 +124,7 @@ EOF
dogamesbin "${FILESDIR}"/childsplay || die
sed -i \
-e "s:GENTOO_DIR:${_CPDIR}:" \
+ -e "s:python:$(PYTHON):" \
"${D}${GAMES_BINDIR}"/childsplay \
|| die "sed failed"
diff --git a/games-kids/childsplay/files/childsplay-0.90.2-gentoo.patch b/games-kids/childsplay/files/childsplay-0.90.2-gentoo.patch
new file mode 100644
index 000000000000..742e3e02ee3c
--- /dev/null
+++ b/games-kids/childsplay/files/childsplay-0.90.2-gentoo.patch
@@ -0,0 +1,21 @@
+--- letters-trans.py.old 2010-04-26 12:13:12.000000000 +0200
++++ letters-trans.py 2010-04-26 12:13:49.000000000 +0200
+@@ -39,7 +39,7 @@
+ import os,fnmatch,operator,sys,locale
+ from CPConstants import ASSETMLROOT
+
+-if os.environ['USER'] != 'root':
++if os.environ['LOGNAME'] != 'root':
+ print "\nOnly root can use this script, sorry.\n"
+ sys.exit(1)
+
+@@ -69,7 +69,8 @@
+ sys.exit(0)
+
+ # get description names from memory assetml, these are the words used by letters.py
+-parser = pyassetml.AssetmlParser('childsplay/memory-136x136/memory-136x136.assetml')
++assetmlfile = os.path.join(cwd,'memory-136x136.assetml')
++parser = pyassetml.AssetmlParser(assetmlfile)
+ loc = parser.get_locale()# get current locale setting, only the first two chars !!
+ wlist_org = parser.find_names((('file','.'),('description',"en")))
+ wlist = parser.find_names((('file','.'),('description',loc)))