aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2007-07-29 00:33:41 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2007-07-29 00:33:41 +0000
commitf248a63361db7a17c2fcc29e1dba18345c96dac2 (patch)
tree243c0356d03094a4b9abc7919d33ec6aa9ef433f /dev-util
parentcommons-configuration: added ~amd64 (diff)
downloadjava-f248a63361db7a17c2fcc29e1dba18345c96dac2.tar.gz
java-f248a63361db7a17c2fcc29e1dba18345c96dac2.tar.bz2
java-f248a63361db7a17c2fcc29e1dba18345c96dac2.zip
Version bump. Cannot go to the main tree as it needs junit-4.
svn path=/java-overlay/; revision=5279
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/pmd/ChangeLog9
-rw-r--r--dev-util/pmd/Manifest5
-rw-r--r--dev-util/pmd/files/pmd-4.0-build.xml.patch31
-rw-r--r--dev-util/pmd/files/pmd-4.0-launcher-pre-commands6
-rw-r--r--dev-util/pmd/pmd-4.0.ebuild75
5 files changed, 126 insertions, 0 deletions
diff --git a/dev-util/pmd/ChangeLog b/dev-util/pmd/ChangeLog
new file mode 100644
index 00000000..0af9724f
--- /dev/null
+++ b/dev-util/pmd/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-util/pmd
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 29 Jul 2007; Miroslav Šulc <fordfrog@gentoo.org>
+ +files/pmd-4.0-build.xml.patch, +files/pmd-4.0-launcher-pre-commands,
+ +pmd-4.0.ebuild:
+ Version bump. Cannot go to the main tree as it needs junit-4.
+
diff --git a/dev-util/pmd/Manifest b/dev-util/pmd/Manifest
new file mode 100644
index 00000000..67ed322e
--- /dev/null
+++ b/dev-util/pmd/Manifest
@@ -0,0 +1,5 @@
+AUX pmd-4.0-build.xml.patch 1177 RMD160 f2283e2e3aa47dfd15cfb9e170cccb7993fe020d SHA1 7086ea76ef67056322a363fc305f7562d24ffa52 SHA256 78b5c5b4394dbee501cae3a9d3864f5fc0be084aefe7fe919199ecd0e4955881
+AUX pmd-4.0-launcher-pre-commands 171 RMD160 79aef0939954c457f7ec6bbbf7355eb7f2835626 SHA1 9462f785caaa2f36ce29cfb0e72636b1a24ba95a SHA256 d2e683d5512b7d102d595d6ef3a757bd21891f3257303506026e85f99bd2e8ad
+DIST pmd-src-4.0.zip 8667351 RMD160 e3a0a59cd0a9d7f4b0f6064e736151c18c8cee6b SHA1 50cb81ab56bdf832f2921a9c00ce375a47acf4e7 SHA256 d23e0debc16860937c4adcd0bf8639b2e8d903d6af635964fe7a6b1adbe5a9b0
+EBUILD pmd-4.0.ebuild 1970 RMD160 5f9c85790a08c46f8473db25b3fb6e708ebdee77 SHA1 190434705aae2386cd7174d5fc7c5ac2de60dca0 SHA256 833ef17dbc8931f912cee4de2ace5310c84421371b1307c40b44987a79a2f26c
+MISC ChangeLog 321 RMD160 7b43076098154c4639f77372a47da4b2b86023e8 SHA1 6b29536d145c2c8c7ca5468a81c7da2404a199be SHA256 880433975a4f0f9c2a5bbdb15ac4ebd7fa1c2b98cd9a99f58e92ecd23ce86cbb
diff --git a/dev-util/pmd/files/pmd-4.0-build.xml.patch b/dev-util/pmd/files/pmd-4.0-build.xml.patch
new file mode 100644
index 00000000..e3da1b5e
--- /dev/null
+++ b/dev-util/pmd/files/pmd-4.0-build.xml.patch
@@ -0,0 +1,31 @@
+--- build.xml.original 2007-07-29 02:07:36.000000000 +0200
++++ build.xml 2007-07-29 02:22:57.000000000 +0200
+@@ -17,10 +17,7 @@
+
+ <path id="dependencies.path">
+ <pathelement location="${dir.build}" />
+- <fileset dir="${dir.lib}">
+- <include name="jaxen-1.1.jar" />
+- <include name="asm-3.0.jar" />
+- </fileset>
++ <fileset dir="${dir.lib}" includes="*.jar"/>
+ </path>
+
+ <target name="delete" description="Deletes the build directory and the pmd-x.x jar file.">
+@@ -66,7 +63,6 @@
+ <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-1.1.jar asm-3.0.jar" />
+ </manifest>
+ </jar>
+ </target>
+@@ -178,7 +174,7 @@
+ <istrue value="${outputTestResultsToFile}"/>
+ </condition>
+
+- <junit printsummary="yes" haltonfailure="no" forkmode="perBatch">
++ <junit printsummary="yes" haltonfailure="yes" forkmode="perBatch">
+ <classpath>
+ <path refid="dependencies.path" />
+ </classpath>
diff --git a/dev-util/pmd/files/pmd-4.0-launcher-pre-commands b/dev-util/pmd/files/pmd-4.0-launcher-pre-commands
new file mode 100644
index 00000000..b2e48852
--- /dev/null
+++ b/dev-util/pmd/files/pmd-4.0-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.0.ebuild b/dev-util/pmd/pmd-4.0.ebuild
new file mode 100644
index 00000000..69041500
--- /dev/null
+++ b/dev-util/pmd/pmd-4.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2007 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
+ test? (
+ dev-java/ant-junit
+ dev-java/ant-trax
+ )
+ ${COMMON_DEPEND}"
+
+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
+}
+
+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}
+
+ 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/"
+}