summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2011-04-11 01:26:56 +0000
committerSteve Arnold <nerdboy@gentoo.org>2011-04-11 01:26:56 +0000
commit8c675a837b00505c10cf4cc556f97e5da39cd231 (patch)
tree280562b94505538f3cd46e61413fe28232c751be /dev-util
parentBug #363013: version bump. (diff)
downloadgentoo-2-8c675a837b00505c10cf4cc556f97e5da39cd231.tar.gz
gentoo-2-8c675a837b00505c10cf4cc556f97e5da39cd231.tar.bz2
gentoo-2-8c675a837b00505c10cf4cc556f97e5da39cd231.zip
New ebuild for the findbugs CLI, a static analysis tool for Java
bytecode. (Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/findbugs/ChangeLog12
-rw-r--r--dev-util/findbugs/files/findbugs10
-rw-r--r--dev-util/findbugs/findbugs-1.3.9.ebuild112
-rw-r--r--dev-util/findbugs/metadata.xml9
4 files changed, 143 insertions, 0 deletions
diff --git a/dev-util/findbugs/ChangeLog b/dev-util/findbugs/ChangeLog
new file mode 100644
index 000000000000..84af48653241
--- /dev/null
+++ b/dev-util/findbugs/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-util/findbugs
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/findbugs/ChangeLog,v 1.1 2011/04/11 01:26:55 nerdboy Exp $
+
+*findbugs-1.3.9 (11 Apr 2011)
+
+ 11 Apr 2011; Steve Arnold <nerdboy@gentoo.org> +findbugs-1.3.9.ebuild,
+ +files/findbugs, +metadata.xml:
+ New ebuild for findbugs (which is not so new), a static analysis tool
+ for Java bytecode. This is the CLI version; there is also a plugin
+ for Eclipse (see the web site).
+
diff --git a/dev-util/findbugs/files/findbugs b/dev-util/findbugs/files/findbugs
new file mode 100644
index 000000000000..976599bd3535
--- /dev/null
+++ b/dev-util/findbugs/files/findbugs
@@ -0,0 +1,10 @@
+gjl_package=findbugs
+
+if [ "${1}" = "-help" ] ; then
+ gjl_main="edu.umd.cs.findbugs.ShowHelp"
+else
+ gjl_main="edu.umd.cs.findbugs.LaunchAppropriateUI"
+fi
+
+gjl_java_args="-Xmx512m -Dfindbugs.home=/usr/share/findbugs"
+source /usr/share/java-config-2/launcher/launcher.bash
diff --git a/dev-util/findbugs/findbugs-1.3.9.ebuild b/dev-util/findbugs/findbugs-1.3.9.ebuild
new file mode 100644
index 000000000000..71febd28be04
--- /dev/null
+++ b/dev-util/findbugs/findbugs-1.3.9.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/findbugs/findbugs-1.3.9.ebuild,v 1.1 2011/04/11 01:26:55 nerdboy Exp $
+
+EAPI=3
+
+WANT_ANT_TASKS="ant-nodeps ant-junit"
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Find Bugs in Java Programs"
+HOMEPAGE="http://findbugs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CDEPEND="dev-java/ant-core
+ dev-java/commons-lang:2.1
+ dev-java/apple-java-extensions-bin:0
+ >=dev-java/asm-3.1:3
+ dev-java/dom4j
+ dev-java/bcel[findbugs]
+ dev-java/jsr305
+ dev-java/jformatstring
+ =dev-java/jaxen-1.1*
+ =dev-java/jdepend-2.9*
+ doc? (
+ =dev-java/saxon-6.5*
+ app-text/docbook-xsl-stylesheets
+ )
+ dev-java/ant-junit
+ =dev-java/junit-4*
+"
+RDEPEND=">=virtual/jre-1.5
+ dev-java/icu4j:0
+ ${CDEPEND}"
+
+DEPEND=">=virtual/jdk-1.5
+ app-arch/unzip
+ ${CDEPEND}"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_DOC_TARGET="apiJavadoc"
+EANT_BUILD_TARGET="rebuild"
+EANT_GENTOO_CLASSPATH="ant-core,jdepend"
+EANT_ANT_TASKS="ant-nodeps,junit"
+ANT_OPTS="-Xmx256m"
+
+pkg_setup() {
+ use doc && ewarn "Installing javadocs does not pass sanity check."
+
+ java-pkg-2_pkg_setup
+}
+
+java_prepare() {
+ find -name "*.jar" | xargs rm -v
+ sed -i -e "s|this directory|the plugin directory|" \
+ "${S}"/plugin/README
+
+ cd "${S}"/lib
+ java-pkg_jar-from ant-core ant.jar
+ java-pkg_jar-from bcel bcel.jar bcel.jar
+ java-pkg_jar-from apple-java-extensions-bin
+ java-pkg_jar-from asm-3 asm.jar asm-3.1.jar
+ java-pkg_jar-from asm-3 asm-analysis.jar asm-analysis-3.1.jar
+ java-pkg_jar-from asm-3 asm-commons.jar asm-commons-3.1.jar
+ java-pkg_jar-from asm-3 asm-tree.jar asm-tree-3.1.jar
+ java-pkg_jar-from asm-3 asm-util.jar asm-util-3.1.jar
+ java-pkg_jar-from asm-3 asm-xml.jar asm-xml-3.1.jar
+ java-pkg_jar-from commons-lang-2.1 commons-lang.jar commons-lang-2.4.jar
+ java-pkg_jar-from dom4j-1 dom4j.jar dom4j-1.6.1.jar
+ java-pkg_jar-from jsr305
+ java-pkg_jar-from jformatstring
+ java-pkg_jar-from --with-dependencies jdepend
+ java-pkg_jar-from jaxen-1.1
+
+ use doc && java-pkg_jar-from saxon-6.5
+
+ # yes, this needed for the build
+ java-pkg_jar-from junit-4
+ java-pkg_jar-from ant-junit
+}
+
+src_test() {
+ ANT_TASKS="ant-nodeps ant-junit junit" eant runjunit
+}
+
+src_install() {
+ java-pkg_dojar "${S}"/lib/${PN}*.jar
+ java-pkg_dojar "${S}"/lib/annotations.jar "${S}"/lib/findbugs-ant.jar
+ # no plugins installed yet (see README.plugins)
+ dodir /usr/share/${PN}/plugin
+ newdoc "${S}"/plugin/README README.plugin
+ # "${S}"/plugin/*.jar
+ # dosym /usr/share/${PN}/lib/coreplugin.jar /usr/share/${PN}/plugin/
+ dobin "${FILESDIR}"/findbugs
+
+ use doc && java-pkg_dojavadoc "${S}"/apiJavaDoc
+ use source && java-pkg_dosrc "${S}"/src
+}
+
+pkg_postinst() {
+ elog
+ elog "Scanning large class files can take large amounts of memory, so"
+ elog "if you experiance out of memory errors, edit /usr/bin/findbugs"
+ elog "and increase the VM memory allocation (or buy more RAM ;)"
+ elog
+}
diff --git a/dev-util/findbugs/metadata.xml b/dev-util/findbugs/metadata.xml
new file mode 100644
index 000000000000..77c922690394
--- /dev/null
+++ b/dev-util/findbugs/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-tools</herd>
+ <maintainer>
+ <email>nerdboy@gentoo.org</email>
+ <description>Primary maintainer</description>
+ </maintainer>
+</pkgmetadata>