--- singularity-0.30c.ebuild.orig 2011-09-04 19:13:16.318141365 +0100 +++ singularity-0.30c.ebuild 2011-09-04 19:13:54.910274191 +0100 @@ -2,8 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-simulation/singularity/singularity-0.30c.ebuild,v 1.3 2011/08/07 03:11:59 phajdan.jr Exp $ -EAPI=2 -inherit eutils games +EAPI=3 +PYTHON_DEPEND="2:2.4" +inherit eutils games python MUSIC=endgame-${PN}-music-006 DESCRIPTION="A simulation of a true AI. Go from computer to computer, pursued by the entire world" @@ -21,6 +22,10 @@ DEPEND="${RDEPEND} app-arch/unzip" +pkg_setup() { + python_set_active_version 2 +} + src_prepare() { rm -f code/{,*}/*.pyc data/*.html # Remove unecessary files } @@ -31,7 +36,15 @@ if use music ; then doins -r ../${MUSIC}/music || die "doins failed" fi - games_make_wrapper ${PN} "python ${PN}.py" "${GAMES_DATADIR}/${PN}" + games_make_wrapper ${PN} "python2 ${PN}.py" "${GAMES_DATADIR}/${PN}" dodoc README.txt TODO Changelog AUTHORS prepgamesdirs } + +pkg_postinst() { + python_mod_optimize /usr/share/games/singularity/code +} + +pkg_postrm() { + python_mod_cleanup /usr/share/games/singularity/code +}