# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header:$ S=${WORKDIR}/${P}-src DESCRIPTION="A lib to make the setup of Java Management Extensions easier" SRC_URI="http://apache.mirrors.rossfell.co.uk/dist/jakarta/commons/modeler/source/modeler-1.1-src.tar.gz" HOMEPAGE="http://jakarta.apache.org/commons/modeler.html" LICENSE="Apache-1.1" DEPEND=">=virtual/jdk-1.4 >=dev-java/jmx-1.2.1 >=dev-java/commons-logging-1.0.3 >=dev-java/commons-digester-1.4.1 >=dev-java/xalan-2.5.1" KEYWORDS="x86" IUSE="doc jikes" src_unpack() { unpack "modeler-${PV}-src.tar.gz" cd "${S}" # Setup the build environment echo "commons-digester.jar=`java-config --classpath=commons-digester | sed s/":"/"\n"/g | tail -n 1`" >> build.properties echo "commons-logging.jar=`java-config --classpath=commons-logging | sed s/":"/"\n"/g | tail -n 1`" >> build.properties echo "jmx.jar=`java-config --classpath=jmx | sed s/":"/"\n"/g | head -n1`" >> build.properties echo "jmxtools.jar=`java-config --classpath=jmx | sed s/":"/"\n"/g | tail -n1`" >> build.properties echo "jaxp.xalan.jar=`java-config --classpath=xalan`" >> build.properties echo "junit.jar=`java-config --classpath=junit`" >> build.properties #We need to apply a small patch to the build that stops a copy thats broken epatch ${FILESDIR}/commons-modeler-1.1-Fix-build.patch } src_compile() { if [ -n"`use jikes`" ]; then buildopts="${buildopts} -Dbuild.compiler=jikes" fi ANT_OPTS=${buildopts} ant dist } src_install () { cd dist dojar commons-modeler.jar || die "Unable to install" dodoc LICENSE.txt RELEASE-NOTES-1.1.txt RELEASE-NOTES.txt use doc && dohtml -r docs/* }