Add FrobTADS.
[gentoo-interactive-fiction.git] / games-engines / frobtads / frobtads-0.11.ebuild
blob02e3bd07b829ccd58a18c64f8d6ed631735bdce4
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit games
7 DESCRIPTION="Curses-based interpreter and development tools for TADS 2 and TADS 3 text adventures"
8 HOMEPAGE="http://www.tads.org/frobtads.htm"
9 SRC_URI="http://www.tads.org/frobtads/${P}.tar.gz
10 tads2compiler? ( http://www.tads.org/frobtads/${PN}-t2compiler-${PV}.tar.gz )
11 tads3compiler? ( http://www.tads.org/frobtads/${PN}-t3compiler-${PV}.tar.gz )"
13 LICENSE="TADS"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="debug tads2compiler tads3compiler"
18 RESTRICT="!tads3compiler? ( test )"
20 DEPEND="sys-libs/ncurses"
22 src_unpack() {
23 unpack ${A}
24 if use tads2compiler; then
25 mv t2compiler/* "${S}"/t2compiler || die "mv t2compiler failed"
27 if use tads3compiler; then
28 mv t3compiler/* "${S}"/t3compiler || die "mv t3compiler failed"
32 src_compile() {
33 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
34 egamesconf $(use_enable debug t3debug) || die "egamesconf failed"
35 emake || die "emake failed"
38 src_test() {
39 if use debug; then
40 emake -j1 check || die "TADS 3 compiler test suite failed"
43 emake -j1 sample || die "Failed to build test game"
44 ./frob -i plain -p samples/sample.t3 <<- END_FROB_TEST
45 save
46 testsave.sav
47 restore
48 testsave.sav
49 END_FROB_TEST
50 [ $? -eq 0 ] || die "Failed to run test game"
53 src_install() {
54 emake DESTDIR="${D}" install || die "Install failed"
55 dodoc doc/{AUTHORS,BUGS,ChangeLog,NEWS,README,SRC_GUIDELINES,THANKS} || die "dodoc failed"
56 prepgamesdirs