From: Vlastimil Babka Date: Fri, 8 Dec 2006 00:54:45 +0000 (+0000) Subject: Version bump, -r1 so that overlay users upgrade too. Tweaked deps, added junit testin... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8b5aa85d4477139639f88d849be07bd51e65aeb7;p=gentoo.git Version bump, -r1 so that overlay users upgrade too. Tweaked deps, added junit testing, using dolauncher and better docs handling. Package-Manager: portage-2.1.2_rc2-r5 --- diff --git a/dev-util/pmd/ChangeLog b/dev-util/pmd/ChangeLog index 2221ed429ba9..a383f5eb4755 100644 --- a/dev-util/pmd/ChangeLog +++ b/dev-util/pmd/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-util/pmd # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/pmd/ChangeLog,v 1.16 2006/11/30 16:06:11 caster Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/pmd/ChangeLog,v 1.17 2006/12/08 00:54:45 caster Exp $ + +*pmd-3.8-r1 (08 Dec 2006) + + 08 Dec 2006; Vlastimil Babka + -files/pmd-3.1-gentoo.patch, -files/pmd-3.3-gentoo.patch, + +files/pmd-3.8-gentoo.patch, +files/pmd-pre, -pmd-3.1.ebuild, + -pmd-3.3.ebuild, -pmd-3.4.ebuild, +pmd-3.8-r1.ebuild: + Version bump, -r1 so that overlay users upgrade too. Tweaked deps, added + junit testing, using dolauncher and better docs handling. 30 Nov 2006; Vlastimil Babka pmd-1.5-r1.ebuild, pmd-3.1.ebuild, pmd-3.3.ebuild, pmd-3.4.ebuild, pmd-3.7.ebuild: diff --git a/dev-util/pmd/files/digest-pmd-3.8-r1 b/dev-util/pmd/files/digest-pmd-3.8-r1 new file mode 100644 index 000000000000..b3c91b698b8b --- /dev/null +++ b/dev-util/pmd/files/digest-pmd-3.8-r1 @@ -0,0 +1,3 @@ +MD5 49c4f6341d035173ba6a7d5d899bb2b1 pmd-src-3.8.zip 11032057 +RMD160 193a25fb5e2ab21bc31f52d667c2f9fa8eebd09b pmd-src-3.8.zip 11032057 +SHA256 a31247adbf06dd71b6e10231a92d04ca87206f214ee8d1ec59650cf2f108333a pmd-src-3.8.zip 11032057 diff --git a/dev-util/pmd/files/pmd-3.8-gentoo.patch b/dev-util/pmd/files/pmd-3.8-gentoo.patch new file mode 100644 index 000000000000..6a61ca0925ec --- /dev/null +++ b/dev-util/pmd/files/pmd-3.8-gentoo.patch @@ -0,0 +1,51 @@ +--- bin/build.xml 2006-12-07 17:11:47.000000000 +0100 ++++ bin/build.xml 2006-12-07 17:17:13.000000000 +0100 +@@ -12,12 +12,7 @@ + + + +- +- +- +- +- +- ++ + + + +@@ -28,7 +23,7 @@ + + + +- ++ + + + +@@ -60,7 +55,6 @@ + + + +- + + + +@@ -87,7 +81,16 @@ + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/dev-util/pmd/files/pmd-pre b/dev-util/pmd/files/pmd-pre new file mode 100644 index 000000000000..b2e48852597d --- /dev/null +++ b/dev-util/pmd/files/pmd-pre @@ -0,0 +1,6 @@ +if [ -z "$3" ]; then + script=`basename $0` + echo "Usage:" + echo " $script html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]" + exit 1 +fi diff --git a/dev-util/pmd/pmd-3.8-r1.ebuild b/dev-util/pmd/pmd-3.8-r1.ebuild new file mode 100644 index 000000000000..04fc0226d47e --- /dev/null +++ b/dev-util/pmd/pmd-3.8-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/pmd/pmd-3.8-r1.ebuild,v 1.1 2006/12/08 00:54:45 caster Exp $ + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="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 ~ppc ~x86" +IUSE="doc source test" + +CDEPEND="=dev-java/jaxen-1.1* + =dev-java/xml-commons-external-1.3* + >=dev-java/xerces-2.7 + =dev-java/jakarta-oro-2.0*" +RDEPEND=">=virtual/jre-1.4 + ${CDEPEND}" +DEPEND=">=virtual/jdk-1.4 + app-arch/unzip + =dev-java/junit-3* + !test? ( dev-java/ant-core ) + test? ( dev-java/ant ) + source? ( app-arch/zip ) + ${CDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-gentoo.patch" + + rm -rf docs/apidocs docs/cgi docs/clover docs/xref* + cd lib + rm -f *.jar + java-pkg_jar-from jaxen-1.1 + java-pkg_jar-from xerces-2 xercesImpl.jar + java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar + java-pkg_jar-from --build-only ant-core ant.jar + java-pkg_jar-from jakarta-oro-2.0 + java-pkg_jar-from --build-only junit +} + +src_compile() { + cd "${S}/bin" + eant jar $(use_doc) +} + +src_test() { + cd "${S}/bin" + eant test +} + +src_install() { + java-pkg_newjar lib/${P}.jar + dodir /usr/share/ant-core/lib/ + dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant-core/lib/${PN}.jar + + java-pkg_dolauncher ${PN} --main net.sourceforge.pmd.PMD \ + -pre "${FILESDIR}/${PN}-pre" --java_args -Xmx512m + java-pkg_dolauncher ${PN}-designer \ + --main net.sourceforge.pmd.util.designer.Designer + cp -r rulesets ${D}/usr/share/${PN} + + dodoc etc/readme.txt etc/changelog.txt + + use doc && java-pkg_dohtml -r docs/* + use source && java-pkg_dosrc src/net +} + +pkg_postinst() { + einfo "" + einfo "Example rulesets can be found under" + einfo "/usr/share/pmd/rulesets/" + einfo "" +}