# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="Curses based interpreter for TADS 2 and TADS 3 text adventures." HOMEPAGE="http://www.tads.org/frobtads.htm" SRC_URI="http://www.tads.org/frobtads/${P}.tar.gz tads2compiler? ( http://www.tads.org/frobtads/t2comp-${PV}.tar.gz ) tads3compiler? ( http://www.tads.org/frobtads/t3comp-${PV}.tar.gz )" LICENSE="TADS" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="tads2compiler tads3compiler" DEPEND="sys-libs/ncurses" src_unpack() { unpack ${A} use tads2compiler && mv -f t2compiler/* "${P}"/t2compiler use tads3compiler && mv -f t3compiler/* "${P}"/t3compiler cd "${S}" } src_compile() { CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" # Normally we would just use egamesconf, but it results in a # sandbox violation for some reason. See bug 149764. # egamesconf || die "configure failed" econf --bindir=${GAMES_BINDIR} --datadir=${GAMES_DATADIR} \ || die "econf failed" emake || die "emake failed" } src_test() { if ! use tads3compiler; then einfo "Skipping test. Add the tads3compiler USE flag to enable it." return fi # Build the sample game. emake -j1 sample || die "Failed to build test game" # We run the sample game in plain (non-curses) mode and # test a few commands. ./frob -i plain -p samples/sample.t3 <<- END_FROB_TEST take all. drop all END_FROB_TEST [ $? -eq 0 ] || die "Failed to run test game" } src_install() { emake DESTDIR="${D}" install || die "Install failed" dodoc doc/{AUTHORS,BUGS,COMPILERS,ChangeLog,NEWS,README,THANKS} prepgamesdirs }