# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils java-pkg-2 java-ant-2 DESCRIPTION="Open Source implementation of the JMX and JMX Remote API (JSR 160) specifications." HOMEPAGE="http://mx4j.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" # The ${S}/BUILD-HOWTO is a good source for dependencies # This package could also be built with 1.3 after the virtual # handling for java-config goes official RDEPEND="=virtual/jre-1.4* =dev-java/bcel-5.1* >=dev-java/commons-logging-1.0.4 dev-java/log4j" DEPEND="=virtual/jdk-1.4* ${RDEPEND} >=dev-java/ant-1.6 source? ( app-arch/zip )" LICENSE="mx4j" SLOT="2.1" KEYWORDS="~x86" IUSE="doc source" src_unpack() { unpack "${A}" cd "${S}" epatch "${FILESDIR}/${P}-split-javadoc-build.patch" cd "${S}/lib" java-pkg_jar-from bcel java-pkg_jar-from commons-logging java-pkg_jar-from log4j } src_compile() { eant -f build/build.xml compile.jmx compile.rjmx $(use_doc javadocs.core) } src_install() { java-pkg_dojar dist/lib/*.jar dodoc README use doc && java-pkg_dojavadoc dist/docs/api use source && java-pkg_dosrc "${S}/src/core/*" } pkg_postinst() { einfo einfo "If you need the MX4J examples built, add \"examples\" to your USE flags and" einfo "emerge dev-java/mx4j-tools." einfo }