# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit toolchain-funcs games EAPI="2" DESCRIPTION="Short-term-memory training \"N-Back\" game, remember positions and sounds. Believed to increase working memory and \"fluid\" intelligence." HOMEPAGE="http://${PN}.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.zip" # "The code is GPL licensed (http://www.gnu.org/copyleft/gpl.html)" # Version not specified, but link currently points to GPL-3. LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64 ~ppc ~x86" IUSE="" RDEPEND="|| ( >=dev-python/pyglet-1.1.4[openal] >=dev-python/pyglet-1.1.4[alsa] ) dev-python/pyopenal" src_unpack() { #unpack ${A} # Unzip manually, ignoring weird length mismatch errors. local a for a in ${A} ; do echo ">>> Unpacking ${a} to ${WORKDIR}" #gzip -dc "${DISTDIR}"/${a} | tar xf - unzip -qo "${DISTDIR}"/${a} #assert done mv ${PN} ${P} cd "${S}" epatch "${FILESDIR}"/brainworkshop-4.8.1-fix-paths.patch || die "epatch failed" } src_compile() { sed $'s/\r//' < ${PN}.pyw > ${PN} # Remove extension and filter ^Ms, so that app is run by python, not by python^M. } src_install() { dogamesbin ${PN} || die "dogamesbin failed" insinto "${GAMES_DATADIR}"/${PN} doins -r res/* || die "doins failed" dodoc Readme.txt dodoc data/Readme-stats.txt doicon res/misc/brain/brain.png make_desktop_entry ${PN} Brain\ Workshop brain.png prepgamesdirs }