Add FrobTADS live ebuild.
[gentoo-interactive-fiction.git] / games-engines / frobtads / frobtads-9999.ebuild
blob817b2dbe9a6fb4cd207c142ec79007f4a23935b8
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=2
6 inherit flag-o-matic games
7 [ "$PV" == "9999" ] && inherit git
9 DESCRIPTION="Curses-based interpreter and development tools for TADS 2 and TADS 3 text adventures"
10 HOMEPAGE="http://www.tads.org/frobtads.htm"
11 if [ "$PV" != "9999" ]; then
12 SRC_URI="http://www.tads.org/frobtads/${P}.tar.gz
13 tads2compiler? ( http://www.tads.org/frobtads/${PN}-t2compiler-${PV}.tar.gz )
14 tads3compiler? ( http://www.tads.org/frobtads/${PN}-t3compiler-${PV}.tar.gz )"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="debug tads2compiler tads3compiler"
17 RESTRICT="!tads3compiler? ( test )"
18 else
19 SRC_URI=""
20 EGIT_BRANCH="master"
21 EGIT_REPO_URI="git://git.assembla.com/frobtads.git"
22 KEYWORDS=""
23 IUSE="debug"
25 LICENSE="TADS2 TADS3"
26 SLOT="0"
28 DEPEND="sys-libs/ncurses"
29 RDEPEND="${DEPEND}"
30 if [ "$PV" == "9999" ]; then
31 # The package uses AM_SILENT_RULES which is only available
32 # in automake 1.11 and later.
33 DEPEND="${DEPEND}
34 >=sys-devel/automake-1.11"
37 src_unpack() {
38 if [ "${PV}" != "9999" ]; then
39 unpack ${A}
40 if use tads2compiler; then
41 mv t2compiler/* "${S}"/t2compiler || die "mv t2compiler failed"
43 if use tads3compiler; then
44 mv t3compiler/* "${S}"/t3compiler || die "mv t3compiler failed"
46 else
47 git_src_unpack
52 src_configure() {
53 if [ "$PV" == "9999" ]; then
54 einfo "Regenerating autotools files..."
55 "${S}/bootstrap" || die "${S}/bootstrap failed"
57 append-cxxflags -fno-strict-aliasing
58 egamesconf $(use_enable debug t3debug) || die "egamesconf failed"
61 src_test() {
62 if use debug; then
63 emake -j1 check || die "TADS 3 compiler test suite failed"
66 emake -j1 sample || die "Failed to build test game"
67 ./frob -i plain -p samples/sample.t3 <<- END_FROB_TEST
68 save
69 testsave.sav
70 restore
71 testsave.sav
72 END_FROB_TEST
73 [[ $? -eq 0 ]] || die "Failed to run test game"
76 src_install() {
77 emake DESTDIR="${D}" install || die "emake install failed"
78 dodoc doc/{AUTHORS,BUGS,ChangeLog,NEWS,README,SRC_GUIDELINES,THANKS}
79 prepgamesdirs