# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/app-editors/jedit/jedit-4.1.ebuild,v 1.8 2004/02/17 07:59:23 absinthe Exp $ inherit eutils games MY_PV=${PV//\./_} S="${WORKDIR}/${PN}_${MY_PV}" DESCRIPTION="TripleA is an open source clone of the popular Axis and Allies boardgame" HOMEPAGE="http://triplea.sf.net" SRC_URI="mirror://sourceforge/${PN}/${PN}_source_${MY_PV}.zip" LICENSE="GPL-2" KEYWORDS="x86" SLOT="0" IUSE="jikes" RDEPEND="|| ( >=virtual/jdk-1.4 >=virtual/jre-1.4 )" DEPEND="${RDEPEND} app-arch/unzip >=dev-java/ant-1.4.1 jikes? ( >=dev-java/jikes-1.17 )" src_unpack() { unzip -qn ${DISTDIR}/${PN}_source_${MY_PV}.zip cd ${S} # Change saved games directory to ~/.triplea/savedGames epatch "${FILESDIR}/triplea-savedgamesdir.patch" } src_compile() { local antflags if [ -z "$JAVA_HOME" ]; then einfo einfo "\$JAVA_HOME not set!" einfo "Please use java-config to configure your JVM and try again." einfo die "\$JAVA_HOME not set." fi antflags="" if [ `use jikes` ] ; then antflags="${antflags} -Dbuild.compiler=jikes" fi ant ${antflags} || die "compile problem" jar cf lib/${P}.jar -C classes . || die "jar problem" } src_install () { dodir "${GAMES_DATADIR}/${PN}" dodir "${GAMES_BINDIR}" cp -R data games lib ${D}${GAMES_DATADIR}/${PN} # The sourcecode currently assumes the game is being run from a directory # one level below the installation root. cat >${D}${GAMES_DATADIR}/${PN}/${PN}.sh <<-EOF #!/bin/bash cd ${GAMES_DATADIR}/${PN}/lib java -mx96M -cp \ ../data:../lib/plastic-1.2.0.jar:../lib/${P}.jar \ games.strategy.engine.framework.GameRunner EOF chmod 755 ${D}${GAMES_DATADIR}/${PN}/${PN}.sh ln -s ${GAMES_DATADIR}/${PN}/${PN}.sh ${D}${GAMES_BINDIR}/${PN} prepgamesdirs }