# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P1E="RealTimeBattle-${PV}-Ext" MY_P1S="RealTimeBattle-${PV}-Std" DESCRIPTION="A programming game in which robots controlled by programs fight each other." HOMEPAGE="http://realtimebattle.sourceforge.net/" SRC_URI="examples? ( mirror://sourceforge/${PN}/${MY_P1E}.tar.gz) !examples? ( mirror://sourceforge/${PN}/${MY_P1S}.tar.gz)" LICENSE="GPL-2" KEYWORDS="x86" IUSE="perl nls java debug doc examples" DEPEND=">=x11-libs/gtk+-2.0.3 perl? ( >=dev-lang/perl-5.6.1 ) nls? ( sys-devel/gettext ) java? ( virtual/jre )" RDEPEND="${DEPEND}" src_unpack() { unpack ${A} use examples && MY_P="${MY_P1E}" || MY_P="${MY_P1S}" #S="${WORKDIR}/${MY_P}" it does not run :( cd ${WORKDIR} && mv ${MY_P} ${P} } src_compile() { use nls || myconf="--disable-nls" econf $(use_enable debug) ${myconf} || die "Configure failed" emake || die "Compile failed" } src_install(){ make DESTDIR="${D}" install || die "Install failed" mkdir -p ${D}/usr/share/games ${D}/usr/games/bin mv ${D}/usr/bin/* ${D}/usr/games/bin/ use doc || rm -Rf ${D}/usr/games/RealTimeBattle/Documentation mv ${D}/usr/games/RealTimeBattle ${D}/usr/share/games/ rm -R ${D}/usr/bin }