# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit games DESCRIPTION="Create as many words as you can before the time runs out" HOMEPAGE="http://www.coralquest.com/anagramarama/" SRC_URI="http://www.omega.clara.net/anagramarama/dist/${P}.tar.gz" KEYWORDS="x86" LICENSE="GPL" SLOT="0" IUSE="" DEPEND=">=media-libs/libsdl-1.2 >=media-libs/sdl-mixer-1.2 >=media-libs/sdl-image-1.2" RDEPEND="${DEPEND} sys-apps/miscfiles" S="${WORKDIR}/${PN}" src_unpack () { unpack ${A} cd ${WORKDIR} # Edit the path for wordlist.txt sed -i -e \ "s:wordlist.txt:${GAMES_DATADIR}\/${PN}\/wordlist.txt:" \ ${PN}/src/ag.c ${PN}/src/dlb.c || die "sed failed to edit source" # Audio paths sed -i -e \ "s:\"audio\/:\"${GAMES_DATADIR}\/${PN}\/audio\/:" \ ${PN}/src/ag.c || die "sed failed to change audio path in source" # Images sed -i -e \ "s:\"images\/:\"${GAMES_DATADIR}\/${PN}\/images\/:" \ ${PN}/src/ag.c || die "sed failed to change image path in source" } src_install() { newgamesbin ag ${PN} || die "newgamesbin failed" dodir "${GAMES_DATADIR}/${PN}" || die "failed to create ${GAMES_DATADIR}/${PN}" cp wordlist.txt "${D}${GAMES_DATADIR}/${PN}/wordlist.txt" || die "failed to copy game data" dodir "${GAMES_DATADIR}/${PN}/images" cp -r images/ "${D}${GAMES_DATADIR}/${PN}" || die "failed to copy game data" dodir "${GAMES_DATADIR}/${PN}/audio" cp -r audio/ "${D}${GAMES_DATADIR}/${PN}" || die "failed to copy game data" dodoc readme gpl.txt prepgamesdirs }