# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: Samuel BAUER $ EAPI="2" inherit games DESCRIPTION="Alizarin tetris" HOMEPAGE="http://www.cs.virginia.edu/~weimer/atris/" SRC_URI="http://www.cs.virginia.edu/~weimer/atris/${PF}.tar.gz sounds? ( http://www.cs.virginia.edu/~weimer/atris/${PN}-sounds-1.0.1.tar.gz )" LICENSE="" SLOT="0" KEYWORDS="x86 amd64" IUSE="doc +sounds" DEPEND="media-libs/freetype media-libs/libsdl media-libs/sdl-ttf" RESTRICT="nomirror" src_unpack() { unpack ${A}; cd "${S}" sed -ie "/GAME_INSTALLDIR/ s:\\\\\$(prefix)/games/\$PACKAGE:${GAMES_DATADIR}/${PN}:" configure || die "Cannot fix configure file"; } src_compile() { egamesconf `use_with sdl` --datadir="${GAMES_DATADIR}/${PN}" || die "egameconf: Cannot configure game"; emake || die "emake: Cannot compile game"; } src_install() { dogamesbin atris || die "dogamesbin failed" insinto "${GAMES_DATADIR}/${PN}" doins -r styles graphics doins Atris.* if use sounds; then cd "${WORKDIR}/${PN}-sounds-1.0.1" doins -r sounds cd "${S}" fi mv icon.xpm ${PN}.xpm doicon ${PN}.xpm make_desktop_entry ${PN} Atris ${PN} BlocksGame if use doc; then insinto /usr/share/doc/${PF}/html doins Docs/*.html Docs/*.jpg fi dodoc AUTHORS COPYING NEWS README prepgamesdirs fperms 664 ${GAMES_DATADIR}/${PN}/Atris.* }