# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=1 inherit java-pkg-2 eutils DESCRIPTION="An Infinity Engine Browser & Editor" SRC_URI="http://www.idi.ntnu.no/~joh/ni/NearInfinity.jar http://www.idi.ntnu.no/~joh/ni/NearInfinitySource.zip" HOMEPAGE="http://www.idi.ntnu.no/~joh/ni/download.html" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" IUSE="" RDEPEND=">=virtual/jre-1.4" DEPEND=">=virtual/jdk-1.4" S="${WORKDIR}" src_unpack() { # Remove all classes but those from JGoodies. # (Ideally we'd depend upon its package.) # Leave the source and icons behind. unpack ${A} einfo einfo Note: We use a built-in, precompiled version of JGoodies. einfo einfo Removing precompiled classes... find . -path ./com -prune -not -path ./com -o -iname '*.class' | xargs rm eend $? || die einfo Patching for Java 5 and case-sensitive filesystem... for F in ${FILESDIR}/*.patch; do epatch "$F" done } src_compile() { einfo Compiling... find infinity/ -type f -iname '*.java' | xargs javac eend $? || die einfo Assembling JAR... find infinity/ com/ -type f -not -iname '*.java' \ | xargs jar -cmf META-INF/MANIFEST.MF "${PN}.jar" eend $? || die } src_install() { java-pkg_newjar "${PN}.jar" "${PN}.jar" # Has Main-Class and no deps java-pkg_dolauncher }