frobtads: Add 1.2.1
[gentoo-interactive-fiction.git] / games-engines / frobtads / frobtads-1.2.1.ebuild
blobc3e2561aed087093f857de6d81c607ed5fd8147d
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=2
6 if [ "$PV" == "9999" ]; then
7 # The package uses AM_SILENT_RULES which is only available in automake
8 # 1.11 and later.
9 WANT_AUTOMAKE="1.11"
10 SRC_URI=""
11 EGIT_REPO_URI="git://git.assembla.com/frobtads.git"
12 KEYWORDS=""
13 inherit autotools git-2
14 fi
15 inherit flag-o-matic games
17 DESCRIPTION="Curses-based interpreter and development tools for TADS 2 and TADS 3 text adventures"
18 HOMEPAGE="http://www.tads.org/frobtads.htm"
19 if [ "$PV" != "9999" ]; then
20 SRC_URI="http://www.tads.org/frobtads/${P}.tar.gz"
21 KEYWORDS="~amd64 ~x86"
22 fi
23 LICENSE="TADS2 TADS3"
24 SLOT="0"
25 RESTRICT="!tads3compiler? ( test )"
26 IUSE="debug +tads2compiler +tads3compiler"
28 DEPEND="sys-libs/ncurses
29 net-misc/curl"
30 RDEPEND="${DEPEND}"
32 src_unpack() {
33 if [ "${PV}" == "9999" ]; then
34 git-2_src_unpack
35 cd "${S}"
36 einfo "Regenerating autotools files..."
37 eautoreconf
38 else
39 base_src_unpack
40 fi
41 }
43 src_configure() {
44 append-cxxflags -fno-strict-aliasing -pthread
45 egamesconf \
46 $(use_enable debug t3debug) \
47 $(use_enable tads2compiler t2-compiler) \
48 $(use_enable tads3compiler t3-compiler) \
49 || die "egamesconf failed"
50 }
52 src_test() {
53 if use debug; then
54 emake check || die "TADS 3 compiler test suite failed"
55 fi
57 emake sample || die "Failed to build test game"
58 ./frob -i plain -p samples/sample.t3 <<- END_FROB_TEST
59 save
60 testsave.sav
61 restore
62 testsave.sav
63 END_FROB_TEST
64 [[ $? -eq 0 ]] || die "Failed to run test game"
65 }
67 src_install() {
68 emake DESTDIR="${D}" install || die "emake install failed"
69 dodoc doc/{AUTHORS,BUGS,NEWS,README,SRC_GUIDELINES,THANKS}
70 prepgamesdirs
71 }