diff options
author | Joshua Nichols <nichoj@gentoo.org> | 2006-09-29 01:22:31 +0000 |
---|---|---|
committer | Joshua Nichols <nichoj@gentoo.org> | 2006-09-29 01:22:31 +0000 |
commit | 62c76914b5e74918e34c362e549eb7cf4b4f1fb1 (patch) | |
tree | 3db49294d87f8875902e2cdcfcfe01dd6b3c3347 /dev-util/pmd | |
parent | Needs gtk+-2.10 and glib-2.12 (diff) | |
download | gentoo-2-62c76914b5e74918e34c362e549eb7cf4b4f1fb1.tar.gz gentoo-2-62c76914b5e74918e34c362e549eb7cf4b4f1fb1.tar.bz2 gentoo-2-62c76914b5e74918e34c362e549eb7cf4b4f1fb1.zip |
Version bump, bug #122023. Contributed by Miroslav Sulc <miroslav.sulc@startnet.cz>.
(Portage version: 2.1.2_pre1)
Diffstat (limited to 'dev-util/pmd')
-rw-r--r-- | dev-util/pmd/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/pmd/files/digest-pmd-3.7 | 3 | ||||
-rw-r--r-- | dev-util/pmd/files/pmd-3.7-gentoo.patch | 121 | ||||
-rw-r--r-- | dev-util/pmd/pmd-3.7.ebuild | 71 |
4 files changed, 203 insertions, 1 deletions
diff --git a/dev-util/pmd/ChangeLog b/dev-util/pmd/ChangeLog index e45939b536fb..75882e82717e 100644 --- a/dev-util/pmd/ChangeLog +++ b/dev-util/pmd/ChangeLog @@ -1,6 +1,13 @@ # 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.13 2006/01/08 03:21:52 nichoj Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/pmd/ChangeLog,v 1.14 2006/09/29 01:22:31 nichoj Exp $ + +*pmd-3.7 (29 Sep 2006) + + 29 Sep 2006; Joshua Nichols <nichoj@gentoo.org> + +files/pmd-3.7-gentoo.patch, +pmd-3.7.ebuild: + Version bump, bug #122023. Contributed by Miroslav Sulc + <miroslav.sulc@startnet.cz>. *pmd-3.4 (08 Jan 2006) diff --git a/dev-util/pmd/files/digest-pmd-3.7 b/dev-util/pmd/files/digest-pmd-3.7 new file mode 100644 index 000000000000..b4c122c3d2fa --- /dev/null +++ b/dev-util/pmd/files/digest-pmd-3.7 @@ -0,0 +1,3 @@ +MD5 0d4390017f2467345ca7b91b1437fef9 pmd-src-3.7.zip 10756798 +RMD160 451bace491bc46cd6b3db4a5ac11b48bfa8e3b18 pmd-src-3.7.zip 10756798 +SHA256 a35de76cd8049fd91b3c4e2031b7b03f849e03e2facba1e32ea1cb27cacdb5ff pmd-src-3.7.zip 10756798 diff --git a/dev-util/pmd/files/pmd-3.7-gentoo.patch b/dev-util/pmd/files/pmd-3.7-gentoo.patch new file mode 100644 index 000000000000..df69782d037e --- /dev/null +++ b/dev-util/pmd/files/pmd-3.7-gentoo.patch @@ -0,0 +1,121 @@ +diff -ru pmd-3.7.orig/bin/build.xml pmd-3.7/bin/build.xml +--- pmd-3.7.orig/bin/build.xml 2006-09-25 01:17:08.000000000 +0200 ++++ pmd-3.7/bin/build.xml 2006-09-25 01:29:36.000000000 +0200 +@@ -12,12 +12,7 @@ + + <path id="dependencies.path"> + <pathelement location="${dir.build}" /> +- <fileset dir="${dir.lib}"> +- <include name="jaxen-1.1-beta-7.jar" /> +- <include name="jakarta-oro-2.0.8.jar" /> +- <include name="xercesImpl-2.6.2.jar" /> +- <include name="xmlParserAPIs-2.6.2.jar" /> +- </fileset> ++ <fileset dir="${dir.lib}" includes="*.jar"/> + </path> + + <target name="delete" description="Deletes the build directory and the pmd-x.x jar file."> +@@ -62,7 +57,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-beta-7.jar jakarta-oro-2.0.8.jar" /> + </manifest> + </jar> + </target> +diff -ru pmd-3.7.orig/bin/designer.sh pmd-3.7/bin/designer.sh +--- pmd-3.7.orig/bin/designer.sh 2006-09-25 01:17:08.000000000 +0200 ++++ pmd-3.7/bin/designer.sh 2006-09-25 01:27:59.000000000 +0200 +@@ -1,34 +1,11 @@ + #!/bin/bash + +-SCRIPT_DIR=`dirname $0` +-CWD="$PWD" ++cp=$(java-config -p xerces-2,saxpath,jaxen,pmd,xml-commons) + +-cd "$SCRIPT_DIR/../lib" +-LIB_DIR=`pwd -P` +- +-classpath=$CLASSPATH +- +-build_dir="$SCRIPT_DIR/../build" +- +-if [ -d "$build_dir" ]; then +- cd "$build_dir" +- build_dir=`pwd -P` +- classpath=$classpath:$build_dir +-fi +- +-cd "$CWD" +- +-for jarfile in `ls $LIB_DIR/*.jar`; do +- classpath=$classpath:$jarfile +-done +- +- +-FILE=$1 ++FILE=${1} + shift +-FORMAT=$1 ++FORMAT=${1} + shift +-RULESETFILES="$@" +- +-# echo "CLASSPATH: $classpath" ++RULESETFILES="${@}" + +-java -cp $classpath net.sourceforge.pmd.util.designer.Designer ++java -cp ${cp} net.sourceforge.pmd.util.designer.Designer +diff -ru pmd-3.7.orig/bin/pmd.sh pmd-3.7/bin/pmd.sh +--- pmd-3.7.orig/bin/pmd.sh 2006-09-25 01:17:08.000000000 +0200 ++++ pmd-3.7/bin/pmd.sh 2006-09-25 01:27:44.000000000 +0200 +@@ -1,41 +1,20 @@ + #!/bin/bash + +-if [ -z "$3" ]; then +- script=`basename $0` ++if [ -z "${3}" ]; then ++ script=$(basename $0) + echo "Usage:" +- echo " $script <java-src-file> html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]" ++ echo " ${script} <java-src-file> html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]" + exit 1 + fi + +-SCRIPT_DIR=`dirname $0` +-CWD="$PWD" ++cp=$(java-config -p xerces-2,saxpath,jaxen,pmd,xml-commons) + +-cd "$SCRIPT_DIR/../lib" +-LIB_DIR=`pwd -P` +- +-classpath=$CLASSPATH +- +-build_dir="$SCRIPT_DIR/../build" +- +-if [ -d "$build_dir" ]; then +- cd "$build_dir" +- build_dir=`pwd -P` +- classpath=$classpath:$build_dir +-fi +- +-cd "$CWD" +- +-for jarfile in `ls $LIB_DIR/*.jar`; do +- classpath=$classpath:$jarfile +-done +- +- +-FILE=$1 ++FILE=${1} + shift +-FORMAT=$1 ++FORMAT=${1} + shift +-RULESETFILES="$@" ++RULESETFILES="${@}" + + # echo "CLASSPATH: $classpath" + +-java -cp $classpath net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES ++exec $(java-config --java) -cp ${cp} net.sourceforge.pmd.PMD ${FILE} ${FORMAT} ${RULESETFILES} diff --git a/dev-util/pmd/pmd-3.7.ebuild b/dev-util/pmd/pmd-3.7.ebuild new file mode 100644 index 000000000000..3d299ea3aa63 --- /dev/null +++ b/dev-util/pmd/pmd-3.7.ebuild @@ -0,0 +1,71 @@ +# 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.7.ebuild,v 1.1 2006/09/29 01:22:31 nichoj 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 ~sparc ~x86" +IUSE="doc source" + +RDEPEND=">=virtual/jre-1.3 + =dev-java/jaxen-1.0* + dev-java/saxpath + dev-java/xml-commons + >=dev-java/xerces-2.6 + =dev-java/jakarta-oro-2.0* + " +DEPEND=">=virtual/jdk-1.3 + ${RDEPEND} + app-arch/unzip + dev-java/ant-core + dev-java/junit + source? ( app-arch/zip )" + +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 xercesImpl.jar + java-pkg_jar-from xml-commons + java-pkg_jar-from 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 javadoc) +} + +src_install() { + java-pkg_newjar lib/${P}.jar ${PN}.jar + dodir /usr/share/ant-core/lib/ + dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant-core/lib/ant-${PN}.jar + + # TODO should try to use dolauncher + newbin bin/${PN}.sh ${PN} + newbin bin/designer.sh ${PN}-designer + cp -r rulesets ${D}/usr/share/${PN} + + use doc && java-pkg_dohtml -r docs/api + use source && java-pkg_dosrc src/* +} + +pkg_postinst() { + einfo "" + einfo "Example rulesets can be found under" + einfo "/usr/share/pmd/rulesets/" + einfo "" +} |