diff options
-rw-r--r-- | dev-util/pmd/ChangeLog | 4 | ||||
-rw-r--r-- | dev-util/pmd/Manifest | 6 | ||||
-rw-r--r-- | dev-util/pmd/files/pmd-4.2.2-build.xml.patch | 47 | ||||
-rw-r--r-- | dev-util/pmd/files/pmd-4.2.2-launcher-pre-commands | 6 | ||||
-rw-r--r-- | dev-util/pmd/pmd-4.2.2.ebuild | 85 |
5 files changed, 147 insertions, 1 deletions
diff --git a/dev-util/pmd/ChangeLog b/dev-util/pmd/ChangeLog index 706c6f2f..786f98c9 100644 --- a/dev-util/pmd/ChangeLog +++ b/dev-util/pmd/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 22 Jun 2008; Miroslav Šulc <fordfrog@gentoo.org> +pmd-4.2.2.ebuild, + +files/pmd-4.2.2-build.xml.patch, +files/pmd-4.2.2-launcher-pre-commands: + Version bump. + 06 Feb 2008; Miroslav Šulc <fordfrog@gentoo.org> pmd-4.1.ebuild: Fixed dependency on hamcrest diff --git a/dev-util/pmd/Manifest b/dev-util/pmd/Manifest index b0619316..4def360d 100644 --- a/dev-util/pmd/Manifest +++ b/dev-util/pmd/Manifest @@ -2,8 +2,12 @@ AUX pmd-4.0-build.xml.patch 1177 RMD160 f2283e2e3aa47dfd15cfb9e170cccb7993fe020d AUX pmd-4.0-launcher-pre-commands 171 RMD160 79aef0939954c457f7ec6bbbf7355eb7f2835626 SHA1 9462f785caaa2f36ce29cfb0e72636b1a24ba95a SHA256 d2e683d5512b7d102d595d6ef3a757bd21891f3257303506026e85f99bd2e8ad AUX pmd-4.1-build.xml.patch 2245 RMD160 60842874380c4152b9459a1fa5f94b686ceabd11 SHA1 3ce5587eab4ad0f2d599e5a80ce01d924ce01d07 SHA256 33d2c11828fe263542c7dd5fd3a74ed4f1392b56fe05a20fef8654df8465d90a AUX pmd-4.1-launcher-pre-commands 171 RMD160 79aef0939954c457f7ec6bbbf7355eb7f2835626 SHA1 9462f785caaa2f36ce29cfb0e72636b1a24ba95a SHA256 d2e683d5512b7d102d595d6ef3a757bd21891f3257303506026e85f99bd2e8ad +AUX pmd-4.2.2-build.xml.patch 2245 RMD160 60842874380c4152b9459a1fa5f94b686ceabd11 SHA1 3ce5587eab4ad0f2d599e5a80ce01d924ce01d07 SHA256 33d2c11828fe263542c7dd5fd3a74ed4f1392b56fe05a20fef8654df8465d90a +AUX pmd-4.2.2-launcher-pre-commands 171 RMD160 79aef0939954c457f7ec6bbbf7355eb7f2835626 SHA1 9462f785caaa2f36ce29cfb0e72636b1a24ba95a SHA256 d2e683d5512b7d102d595d6ef3a757bd21891f3257303506026e85f99bd2e8ad DIST pmd-src-4.0.zip 8667351 RMD160 e3a0a59cd0a9d7f4b0f6064e736151c18c8cee6b SHA1 50cb81ab56bdf832f2921a9c00ce375a47acf4e7 SHA256 d23e0debc16860937c4adcd0bf8639b2e8d903d6af635964fe7a6b1adbe5a9b0 DIST pmd-src-4.1.zip 9044312 RMD160 4202db4f12354b398d8513bff6c2eb4fa7a2ebe9 SHA1 329b100e980c070a12f3e05860052577d6849d45 SHA256 1ef4e631216ffeaf3e3c5bf187092cb211592f120ca642da765a69805aca44db +DIST pmd-src-4.2.2.zip 10405146 RMD160 9bce91bc0edf53c857c1f6b276e7e09e05d9a7d4 SHA1 a8290542ce2b1365e2d539cec17f8b042fcd00a7 SHA256 60ef46f3553941c94a012a4dda0f6cc98f43f0c9568957e3d8a476b41ecbab92 EBUILD pmd-4.0.ebuild 2052 RMD160 a7fd06335cbb8a643b1739ca9978e01a6a83e195 SHA1 f79c3fa8dba8cc1ab813ce387235914c50db958d SHA256 f8ae32e7df1e49bf41ce42c49bcbcc7bf3335f4b9958c15abc51d589a0a390dc EBUILD pmd-4.1.ebuild 2226 RMD160 209a52dd2e601bda2e7cf13d2d6cefe7415798d2 SHA1 41a416f7e18e700de7bba9bbbe46e4d9e6ae65e7 SHA256 c12df123692ae5fa4f8198fa42c5c934b1db467162437c50792ae4e75ce2bcf2 -MISC ChangeLog 610 RMD160 82fda6cf079bfb55fa935eff381e57060f6ce4b4 SHA1 db117bad03284ad41e22319f5ef06fad9b77442e SHA256 b3c75cbe6dc840084f1fd7407d20dece8f01739d3769f32205e972d04a47795f +EBUILD pmd-4.2.2.ebuild 2224 RMD160 e3e1473528827f1690ba48dae384392f7271c2f4 SHA1 beb9c4472a6b5677d057e67c372ada1c0755d8c4 SHA256 2d1625102ecb8ace4f538a45b2aeb009931d9b01cfd358c92bff02002a2347f0 +MISC ChangeLog 774 RMD160 8377cd48c83b465a9263747f4d3f60f1da04761b SHA1 b5a8bf64f7cc1e08c92700593fd017a2fe85c90c SHA256 4ca779131a67ad9bc5e90cf700728df69f2c6bc6fe18adfdc9ef92db58a49333 diff --git a/dev-util/pmd/files/pmd-4.2.2-build.xml.patch b/dev-util/pmd/files/pmd-4.2.2-build.xml.patch new file mode 100644 index 00000000..f909d2ab --- /dev/null +++ b/dev-util/pmd/files/pmd-4.2.2-build.xml.patch @@ -0,0 +1,47 @@ +--- build.xml.original 2007-11-25 16:27:02.000000000 +0100 ++++ build.xml 2007-11-25 16:38:10.000000000 +0100 +@@ -21,11 +21,7 @@ + + <path id="dependencies.path"> + <pathelement location="${dir.build}" /> +- <fileset dir="${dir.lib}"> +- <include name="jaxen-${jaxen.version}.jar" /> +- <include name="asm-${asm.version}.jar" /> +- <include name="junit-${junit.version}.jar" /> +- </fileset> ++ <fileset dir="${dir.lib}" includes="*.jar"/> + </path> + + <target name="delete" description="Deletes the build directory and the pmd-x.x jar file."> +@@ -72,22 +68,10 @@ + <jar jarfile="${dir.lib}/pmd-${version}.jar" includes="net/sourceforge/pmd/**/**,test/net/sourceforge/pmd/testframework/**/**,rulesets/**" basedir="${dir.build}"> + <manifest> + <attribute name="Main-Class" value="net.sourceforge.pmd.PMD" /> +- <attribute name="Class-Path" value="jaxen-${jaxen.version}.jar asm-${asm.version}.jar" /> + </manifest> + </jar> + </target> + +- <taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask"> +- <classpath> +- <pathelement location="${dir.lib14}/retroweaver-${retroweaver.version}.jar"/> +- <pathelement location="${dir.lib14}/retroweaver-rt-${retroweaver.version}.jar"/> +- <pathelement location="${dir.lib14}/backport-util-concurrent.jar"/> +- <pathelement location="${dir.lib14}/asm-commons-${asm.version}.jar"/> +- <pathelement location="${dir.lib14}/asm-util-${asm.version}.jar"/> +- <pathelement location="${dir.lib}/asm-${asm.version}.jar"/> +- </classpath> +- </taskdef> +- + <target name="weavejunit" depends="jar"> + <path id="retroweaverclasspath"> + <pathelement location="${dir.lib14}/retroweaver-rt-${retroweaver.version}.jar"/> +@@ -197,7 +181,7 @@ + <target name="test-execute" description="Runs the unit tests"> + <delete dir="${test.outputdir}" /> + <mkdir dir="${test.outputdir}/xml"/> +- <junit printsummary="${test.printsummary}" showoutput="no" filtertrace="yes" haltonfailure="no" jvm="${test.jvm}" forkmode="perBatch" ++ <junit printsummary="${test.printsummary}" showoutput="no" filtertrace="yes" haltonfailure="yes" jvm="${test.jvm}" forkmode="perBatch" + failureProperty="test.failure" + > + <sysproperty key="pmd.regress" value="${test.regression}"/> diff --git a/dev-util/pmd/files/pmd-4.2.2-launcher-pre-commands b/dev-util/pmd/files/pmd-4.2.2-launcher-pre-commands new file mode 100644 index 00000000..b2e48852 --- /dev/null +++ b/dev-util/pmd/files/pmd-4.2.2-launcher-pre-commands @@ -0,0 +1,6 @@ +if [ -z "$3" ]; then + script=`basename $0` + echo "Usage:" + echo " $script <java-src-file> html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]" + exit 1 +fi diff --git a/dev-util/pmd/pmd-4.2.2.ebuild b/dev-util/pmd/pmd-4.2.2.ebuild new file mode 100644 index 00000000..92b23d22 --- /dev/null +++ b/dev-util/pmd/pmd-4.2.2.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/pmd/pmd-3.9.ebuild,v 1.2 2007/05/24 13:38:03 flameeyes Exp $ + +JAVA_PKG_IUSE="doc source test" +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 ~x86-fbsd" +IUSE="" + +COMMON_DEPEND=" + dev-java/ant-core + >=dev-java/asm-3.0 + >=dev-java/jaxen-1.1_beta10" + +RDEPEND=">=virtual/jre-1.5 + ${COMMON_DEPEND}" + +# NOTE: they include regression tests in the main jar so junit is needed on the cp even for src_compile +DEPEND=">=virtual/jdk-1.5 + app-arch/unzip + >=dev-java/junit-4.4 + test? ( + dev-java/ant-junit + dev-java/ant-trax + dev-java/hamcrest + ) + ${COMMON_DEPEND}" + +pkg_setup() { + use test && ewarn "Please note that tests currently fail" + + java-pkg-2_pkg_setup +} + +src_unpack() { + unpack ${A} + + # We patch build.xml to include all jars in lib dir + cd "${S}/bin" + epatch "${FILESDIR}/${P}-build.xml.patch" + + cd "${S}" + find -name "*.jar" | xargs rm -v + + cd "${S}/lib" + java-pkg_jar-from ant-core + java-pkg_jar-from asm-3 asm.jar + java-pkg_jar-from jaxen-1.1 jaxen.jar + java-pkg_jar-from --build-only junit-4 + use test && java-pkg_jar-from --build-only hamcrest +} + +EANT_BUILD_XML="bin/build.xml" + +src_test() { + ANT_TASKS="ant-junit ant-trax" eant -f bin/build.xml test -DoutputTestResultsToFile=true +} + +src_install() { + java-pkg_newjar lib/${P}.jar + java-pkg_register-ant-task + + # Create launchers and copy rulesets + java-pkg_dolauncher ${PN} --main net.sourceforge.pmd.PMD --java_args "-Xmx512m" \ + -pre "${FILESDIR}"/${P}-launcher-pre-commands + java-pkg_dolauncher ${PN}-designer --main net.sourceforge.pmd.util.designer.Designer + cp -r rulesets "${D}"/usr/share/${PN} + mkdir "${D}"/usr/share/${PN}/etc + cp -r etc/xslt "${D}"/usr/share/${PN}/etc/ + + use doc && java-pkg_dojavadoc docs/api + use source && java-pkg_dosrc src/* +} + +pkg_postinst() { + elog "Example rulesets can be found under" + elog "/usr/share/pmd/rulesets/" +} |