1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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 )"
21 EGIT_REPO_URI
="git://git.assembla.com/frobtads.git"
28 DEPEND
="sys-libs/ncurses"
30 if [ "$PV" == "9999" ]; then
31 # The package uses AM_SILENT_RULES which is only available
32 # in automake 1.11 and later.
34 >=sys-devel/automake-1.11"
38 if [ "${PV}" != "9999" ]; then
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"
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"
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
73 [[ $?
-eq 0 ]] || die
"Failed to run test game"
77 emake DESTDIR
="${D}" install || die
"emake install failed"
78 dodoc
doc
/{AUTHORS
,BUGS
,ChangeLog
,NEWS
,README
,SRC_GUIDELINES
,THANKS
}