Bump Glulxe to 0.5.1
[gentoo-interactive-fiction.git] / games-engines / glulxe / glulxe-0.5.1.ebuild
blob48bd60dd32503cc725cd55d2d32e2403ffbaecd8
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit eutils flag-o-matic games
7 MY_P=${P//./}
8 DESCRIPTION="An interpreter for the Glulx Virtual Machine"
9 HOMEPAGE="http://www.eblong.com/zarf/glulx/"
10 SRC_URI="mirror://ifarchive/programming/glulx/interpreters/${PN}/${MY_P}.tar.gz"
12 LICENSE="Zarf"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="profile"
17 RDEPEND="dev-games/glkloader"
18 DEPEND="${RDEPEND}
19 dev-games/glk-headers"
20 RDEPEND="${RDEPEND}
21 profile? ( =dev-lang/python-2* )"
23 S=${WORKDIR}/${PN}
25 src_unpack() {
26 unpack ${A}
27 cd "${S}"
29 epatch "${FILESDIR}"/glulxe-0.4.6-user-CFLAGS.patch
30 epatch "${FILESDIR}"/glulxe-0.5.1-gargoyle.patch
31 sed -i -e "s,@PV@,${PV}," unixstrt.c || die "sed failed"
33 sed -i \
34 -e '1s,/usr/bin/python,/usr/bin/python2,' \
35 -e 's/profile-analyze\.py/glulxe-&/g' \
36 profile-analyze.py || die "sed failed"
39 src_compile() {
40 use profile && append-flags -DVM_PROFILING=1
41 emake \
42 GLKINCLUDEDIR=/usr/include/glk \
43 GLKMAKEFILE=Make.glkloader \
44 || die "emake failed"
47 src_install() {
48 dogamesbin glulxe || die "dogamesbin failed"
49 if use profile; then
50 newgamesbin profile-analyze.py glulxe-profile-analyze.py || die "newgamesbin failed"
53 dodoc README || die "dodoc failed"
54 prepgamesdirs