diff options
author | Mounir Lamouri <volkmar@gentoo.org> | 2009-01-20 00:07:39 +0000 |
---|---|---|
committer | Mounir Lamouri <volkmar@gentoo.org> | 2009-01-20 00:07:39 +0000 |
commit | de80668a9bb1bdceaf39aee2499cb2313afd3c20 (patch) | |
tree | d61b2ba76423f957d89a6b4bec107192e0f1c779 /games-misc/fretsonfire/fretsonfire-1.3.110.ebuild | |
parent | net-dns/nsd: version bump (diff) | |
download | sunrise-de80668a9bb1bdceaf39aee2499cb2313afd3c20.tar.gz sunrise-de80668a9bb1bdceaf39aee2499cb2313afd3c20.tar.bz2 sunrise-de80668a9bb1bdceaf39aee2499cb2313afd3c20.zip |
games-misc/fretsonfire: New Ebuild for bug 143388
svn path=/sunrise/; revision=7738
Diffstat (limited to 'games-misc/fretsonfire/fretsonfire-1.3.110.ebuild')
-rw-r--r-- | games-misc/fretsonfire/fretsonfire-1.3.110.ebuild | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/games-misc/fretsonfire/fretsonfire-1.3.110.ebuild b/games-misc/fretsonfire/fretsonfire-1.3.110.ebuild new file mode 100644 index 000000000..6147d67d2 --- /dev/null +++ b/games-misc/fretsonfire/fretsonfire-1.3.110.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +NEED_PYTHON="2.4" + +inherit eutils python games + +MY_PN="Frets on Fire" +MY_PN_URI="FretsOnFire" +DESCRIPTION="A game of musical skill and fast fingers" +HOMEPAGE="http://fretsonfire.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_PN_URI}-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="doc glew guitarhero psyco" + +# NOTES : +# numeric is not mentionned but looks needed +# glewpy is probably not needed anymore. Waiting for a confirmation. +# pyopengl-2.0.0.44 (stable) makes the game crash with some configs +DEPEND="" +RDEPEND="dev-python/pygame + >=dev-python/pyopengl-2.0.1.09-r1 + dev-python/imaging + dev-python/numeric + dev-python/numpy + media-libs/sdl-mixer[vorbis] + doc? ( >=dev-python/epydoc-3.0.1 ) + psyco? ( dev-python/psyco ) + guitarhero? ( media-sound/vorbis-tools ) + glew? ( dev-python/glewpy )" + +S=${WORKDIR}/${MY_PN}-${PV} + +DOCS="readme.txt todo.txt PKG-INFO MANIFEST" + +src_prepare() { + # change main game executable path + sed -i -e "s:\(FretsOnFire.py\):$(games_get_libdir)/${PN}/\1:" \ + src/FretsOnFire.py || die "patching src/FretsOnFire.py failed" + + # change data path + sed -i -e \ + "s:os.path.join(\"..\", \"\(data\)\"):\"${GAMES_DATADIR}/${PN}/\1\":" \ + src/Version.py || die "patching src/Version.py failed" +} + +src_compile() { + # NOTE : there is a Makefile but it has not te be run + + if use doc; then + epydoc --html -o "doc/html" -n "Frets on Fire" src/*.py src/midi/*.py \ + || die "documentation generation failed" + fi +} + +src_install() { + insinto "$(games_get_libdir)/${PN}" + # we have to ignore .pyc files + doins src/*.py src/*.pot || die "installation failed" + + insinto "$(games_get_libdir)/${PN}/midi" + # we have to ignore .pyc files + doins src/midi/*.py || die "installation failed" + + insinto "${GAMES_DATADIR}/${PN}" + # removes useless files + rm -fr data/win32 + # removes useless file that is throwing a QA notice + rm -f data/PyOpenGL__init__.pyc + doins -r data || die "data installation failed" + + games_make_wrapper \ + ${PN} "python FretsOnFire.py" "$(games_get_libdir)/${PN}" \ + || die "games wrapper installation failed" + + if use doc; then + dohtml -r doc/html/* || die "documentation installation failed" + fi + + dodoc ${DOCS} || die "documentation installation failed" + + newicon data/icon.png ${PN}.png + make_desktop_entry ${PN} "Frets on Fire" + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + python_mod_optimize "${ROOT}$(games_get_libdir)/${PN}" +} + +pkg_postrm() { + python_mod_cleanup "${ROOT}$(games_get_libdir)/${PN}" +} |