Add a bunch of Glk library implementations.
[gentoo-interactive-fiction.git] / dev-games / cheapglk / cheapglk-0.9.0.ebuild
blob08042457620454c2aa7b8698247eb0a69ab0aa6a
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit eutils autotools
7 MY_P=${P//./}
8 DESCRIPTION="A stdio implementation of the Glk API"
9 HOMEPAGE="http://www.eblong.com/zarf/glk/"
10 SRC_URI="mirror://ifarchive/programming/glk/implementations/${MY_P}.tar.gz
11 http://www.eblong.com/zarf/glk/${MY_P}.tar.gz"
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~amd64"
16 IUSE=""
18 DEPEND="dev-games/glkloader"
19 RDEPEND=""
21 S=${WORKDIR}/${PN}
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
27 epatch "${FILESDIR}"/cheapglk-0.9.0-commandline.patch
28 epatch "${FILESDIR}"/cheapglk-0.9.0-garglk-extensions.patch
30 cp "${FILESDIR}"/cheapglk-0.9.0-configure.ac configure.ac || die "cp configure.ac failed"
31 cp "${FILESDIR}"/cheapglk-0.9.0-Makefile.am Makefile.am || die "cp Makefile.am failed"
32 sed -i -e "s,@PV@,${PV}," configure.ac || die "sed failed"
33 eautoreconf
35 rm glk.h gi_blorb.h gi_dispa.h glkstart.h || die "rm glk headers failed"
38 src_install() {
39 emake DESTDIR="${D}" install || die "emake install failed"
40 dodoc notes.txt || die "dodoc failed"
42 insinto /etc/glkloader.d
43 cat >"${T}"/cheapglk.rc <<-EOF
44 [Cheap]
45 path = /usr/$(get_libdir)/libcheapglk.so
46 EOF
47 doins "${T}"/cheapglk.rc || die "doins cheapglk.rc failed"