# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils games MY_P="8Kingdoms" MY_PN="kralovstvi" DESCRIPTION="3D turn-based fantasy strategic game in which players become kings, build their empires and conquer enemy kingdoms." HOMEPAGE="http://kralovstvi.sourceforge.net/" SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}-${PV}.tar.gz" LICENSE="GPL-2" IUSE="X" KEYWORDS="~x86 ~amd64" DEPEND="media-libs/libsdl media-libs/sdl-mixer dev-libs/expat dev-lang/tcl" S=${WORKDIR}/${MY_P}-${PV} dir=${GAMES_DATADIR}/${PN} src_unpack() { unpack ${A} cd "${S}" || die "cd ${S} failed" mv 8Kingdoms.cpp 8kingdoms.cpp sed -i \ -e "s:\${prefix}/games/8Kingdoms:${dir}:" \ -e "s/8Kingdoms/8kingdoms/g" \ Makefile.{am,in} || die "sed Makefiles failed" sed -i \ -e "s:\$data/res/:${dir}/res/:" \ -e "s/8Kingdoms/8kingdoms/g" \ configure.in || die "sed configure.in failed" sed -i \ -e "s/8Kingdoms/8kingdoms/g" \ configure || die eautoreconf || die "eautoreconf failed" } src_compile() { egamesconf \ $(use_with X x) \ || die "egamesconf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" }