diff options
Diffstat (limited to 'dev-util/pmd/pmd-3.1.ebuild')
-rw-r--r-- | dev-util/pmd/pmd-3.1.ebuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-util/pmd/pmd-3.1.ebuild b/dev-util/pmd/pmd-3.1.ebuild new file mode 100644 index 000000000000..bc6fc58d55c2 --- /dev/null +++ b/dev-util/pmd/pmd-3.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/pmd/pmd-3.1.ebuild,v 1.1 2005/05/20 18:48:34 luckyduck Exp $ + +inherit java-pkg eutils + +DESCRIPTION="PMD is a Java source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation and so forth." +HOMEPAGE="http://pmd.sourceforge.net" +SRC_URI="mirror://sourceforge/pmd/${PN}-src-${PV}.zip" + +LICENSE="pmd" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~ppc ~sparc" +IUSE="doc jikes source" + +DEPEND=">=virtual/jdk-1.3 + app-arch/unzip + dev-java/ant-core + source? ( app-arch/zip )" +RDEPEND=">=virtual/jre-1.3 + =dev-java/jaxen-1.0* + dev-java/junit + dev-java/saxpath + =dev-java/xerces-2.6*" + +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/${P}-gentoo.patch + + cd ${S}/lib/ + rm -f *.jar + java-pkg_jar-from saxpath + java-pkg_jar-from jaxen + java-pkg_jar-from xerces-2 +} + +src_compile() { + cd ${S}/bin + + local antflags="dist" + use jikes && antflags="${antflags} -Dbuild.compiler=jikes" + ant ${antflags} || die "died on ant" +} + +src_install() { + java-pkg_dojar lib/${PN}.jar + + newbin bin/pmd.sh pmd + newbin bin/designer.sh pmd-designer + cp -r rulesets ${D}/usr/share/${PN} + + use doc && java-pkg_dohtml -r docs/* + use source && java-pkg_dosrc src/* +} + +pkg_postinst() { + einfo "" + einfo "Various example rulesets can be found under" + einfo "/usr/share/pmd/rulesets/" + einfo "" +} |