--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ --- singularity-0.30c.ebuild.orig +++ singularity-0.30c.ebuild @@ -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,11 @@ DEPEND="${RDEPEND} app-arch/unzip" +pkg_setup() { + python_set_active_version 2 + games_pkg_setup +} + src_prepare() { rm -f code/{,*}/*.pyc data/*.html # Remove unecessary files } @@ -31,7 +37,18 @@ 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 "${GAMES_DATADIR}/${PN}"/code + gamesowners -R "${GAMES_DATADIR}/${PN}"/code + gamesperms -R "${GAMES_DATADIR}/${PN}"/code + games_pkg_postinst +} + +pkg_postrm() { + python_mod_cleanup "${GAMES_DATADIR}/${PN}"/code +}