]> Pileus Git - ~andy/sunrise/commitdiff
games-misc/fretsonfire: New Ebuild for bug 143388
authorMounir Lamouri <volkmar@gentoo.org>
Tue, 20 Jan 2009 00:07:39 +0000 (00:07 +0000)
committerMounir Lamouri <volkmar@gentoo.org>
Tue, 20 Jan 2009 00:07:39 +0000 (00:07 +0000)
svn path=/sunrise/; revision=7738

games-misc/fretsonfire/ChangeLog [new file with mode: 0644]
games-misc/fretsonfire/Manifest [new file with mode: 0644]
games-misc/fretsonfire/fretsonfire-1.3.110.ebuild [new file with mode: 0644]
games-misc/fretsonfire/metadata.xml [new file with mode: 0644]

diff --git a/games-misc/fretsonfire/ChangeLog b/games-misc/fretsonfire/ChangeLog
new file mode 100644 (file)
index 0000000..511536a
--- /dev/null
@@ -0,0 +1,8 @@
+# ChangeLog for games-misc/fretsonfire
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  20 Jan 2009; Mounir Lamouri (volkmar) <mounir.lamouri@gmail.com>
+  +fretsonfire-1.3.110.ebuild, +metadata.xml:
+  New Ebuild for bug 143388
+
diff --git a/games-misc/fretsonfire/Manifest b/games-misc/fretsonfire/Manifest
new file mode 100644 (file)
index 0000000..8356215
--- /dev/null
@@ -0,0 +1,4 @@
+DIST FretsOnFire-1.3.110.tar.gz 31676132 RMD160 348a7c443e2ee770f2bd6665f22ee6a9e818d00f SHA1 7c4922cd47304f983f7ae9fb063111ebe1122cbb SHA256 c8cca75a897a8c4cadac06f92fd85b417ac41fc19fc719e89ddcd91a3c29f9da
+EBUILD fretsonfire-1.3.110.ebuild 2629 RMD160 fd9db4736e1989ad3b860127664724faaf58e966 SHA1 5e47615bba444262e29608234642974b3b6da75f SHA256 3afae0c769d4b394765de53f0ea25cbd90e9abf4c7bfc45550d0a3abf6570389
+MISC ChangeLog 265 RMD160 b6c82887a1c3972cef98c467ff662f6cfae4241d SHA1 801efe6068f39b876f12c3d5ef1ce9e7ebc4a4fd SHA256 8088510b541dd93109f3f6f416e8c8f2fb31679e3c47018d59b6cd6bddd5ed93
+MISC metadata.xml 377 RMD160 6b117226857a0863f6acab2bf3be8b169e682d99 SHA1 9a326bc25af824f8d6d720e894b8bfbd6ad79b9f SHA256 a2720a742360115335fc0219ba5b11fb84be3cdfeaf09771ffa4582eef6a9b09
diff --git a/games-misc/fretsonfire/fretsonfire-1.3.110.ebuild b/games-misc/fretsonfire/fretsonfire-1.3.110.ebuild
new file mode 100644 (file)
index 0000000..6147d67
--- /dev/null
@@ -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}"
+}
diff --git a/games-misc/fretsonfire/metadata.xml b/games-misc/fretsonfire/metadata.xml
new file mode 100644 (file)
index 0000000..4721ecd
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd>maintainer-wanted</herd>
+       <use>
+               <flag name='glew'>Enable GLEW OpenGL extension wrangler</flag>
+               <flag name='guitarhero'>Enable Guitar Hero song importer</flag>
+               <flag name='psyco'>Enable psyco python accelerator</flag>
+       </use>
+</pkgmetadata>