# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils flag-o-matic games DESCRIPTION="A 2D Zelda-like game" HOMEPAGE="http://lgc.tuxfamily.org" SRC_URI="http://lgc.tuxfamily.org/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="mp3" # As of 17-Sep-2005, allegromp3-2.0.4 is not in portage # See INSTALL.txt DEPEND=">=media-libs/allegro-4.0.3" # mp3? ( >=media-libs/allegromp3-2.0.4 )" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} cd ${S} # mp3 defaults to off in Makefile use mp3 && sed -i "s/MP3=off/MP3=on/" Makefile # From fixlinux.sh cp -f makefile.linux makefile.dep echo "TARGET=LINUX_STATIC" > alfont/makefile.dep cd ${S}/alfont # Change the march flag local MARCH=`get-flag -march` sed -i "s/-march=pentium/${MARCH}/" Makefile cd ${S}/misc # Fix desktop entry mv Lgc.desktop ${PN}.desktop } src_compile() { cd ${S}/alfont emake || die "emake of alfont failed" cd ${S} emake || die "emake failed" } src_install() { cd ${S} # Game binary games_make_wrapper ${PN} \ "${GAMES_BINDIR}/${PN}.bin" \ "${GAMES_DATADIR}/${PN}" newgamesbin ${PN} ${PN}.bin # Icon newicon icons/icon.png ${PN}.png # Desktop menu item insinto /usr/share/applications doins misc/${PN}.desktop dodoc AUTHORS.txt COPYING.txt README.txt THANKS.txt # Game files insinto ${GAMES_DATADIR}/${PN} doins *.dat insinto ${GAMES_DATADIR}/${PN}/map doins map/* insinto ${GAMES_DATADIR}/${PN}/fonts doins fonts/* insinto ${GAMES_DATADIR}/${PN}/lang doins lang/* prepgamesdirs }