# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils subversion autotools STONE_SOUP_SVN_REPO_URI="https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk/crawl-ref" ESVN_REPO_URI="${STONE_SOUP_SVN_REPO_URI}" DESCRIPTION="a fun, free rogue-like game of exploration and treasure-hunting in dungeons filled with dangerous and unfriendly monsters in a quest for the mystifyingly fabulous Orb of Zot." HOMEPAGE="http://crawl-ref.sourceforge.net/" LICENSE="crawl" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="sys-libs/ncurses" RDEPEND="sys-libs/ncurses" S="${WORKDIR}" src_unpack() { subversion_src_unpack } src_compile() { cd source sed -i \ -e '/^# DATADIR :=/a DATADIR := ${GAMES_DATADIR}/crawl-data/' \ makefile.unix \ || die "sed failed" sed -i \ -e '/^# SAVEDIR :=/a SAVEDIR := ${GAMES_STATEDIR}/crawl-saves/' \ makefile.unix \ || die "sed failed" sed -i \ -e "s:morgue/:.:" \ initfile.cc \ || die "sed failed" emake || die "emake failed" } src_install() { cd source dogamesbin crawl || die "installing the binary failed" dodir ${GAMES_DATADIR}/crawl-data dodir ${GAMES_STATEDIR}/crawl-saves dodir ${GAMES_DATADIR}/crawl-data/settings dodir ${GAMES_DATADIR}/crawl-data/docs cp -r dat ${D}${GAMES_DATADIR}/crawl-data cd .. cp -r docs ${D}${GAMES_DATADIR}/crawl-data cp -r settings ${D}${GAMES_DATADIR}/crawl-data dodoc CREDITS README.txt cd docs dodoc crawl_manual.txt doman crawl.6 prepgamesdirs fperms 770 "${GAMES_STATEDIR}/crawl-saves" || die "fparms failed" }