summaryrefslogtreecommitdiff
path: root/dev-util/findbugs
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/findbugs')
-rw-r--r--dev-util/findbugs/Manifest14
-rw-r--r--dev-util/findbugs/files/0001-Support-bcel-6.0-RC3-instead-of-a-random-snapshot.patch48
-rw-r--r--dev-util/findbugs/files/0002-Don-t-bundle-anything-in-the-annotations-jar.patch25
-rw-r--r--dev-util/findbugs/files/0003-JDK-1.8-works-fine-for-me.patch30
-rw-r--r--dev-util/findbugs/files/0004-Don-t-clean-before-generating-docs.patch25
-rw-r--r--dev-util/findbugs/files/0005-Don-t-require-git-to-build.patch25
-rw-r--r--dev-util/findbugs/files/launchers/fb75
-rw-r--r--dev-util/findbugs/files/launchers/fbwrap3
-rw-r--r--dev-util/findbugs/files/launchers/findbugs83
-rw-r--r--dev-util/findbugs/files/launchers/findbugs289
-rw-r--r--dev-util/findbugs/findbugs-3.0.1.ebuild107
-rw-r--r--dev-util/findbugs/metadata.xml12
12 files changed, 536 insertions, 0 deletions
diff --git a/dev-util/findbugs/Manifest b/dev-util/findbugs/Manifest
new file mode 100644
index 000000000000..ef9b34884c1c
--- /dev/null
+++ b/dev-util/findbugs/Manifest
@@ -0,0 +1,14 @@
+AUX 0001-Support-bcel-6.0-RC3-instead-of-a-random-snapshot.patch 2267 SHA256 9194d96be8a9b64ed82cb478f868c39f777dcdea5d93f2f5cb34336122c83f08 SHA512 66ba7a8f9331b020e7edfae46ca80a1a914bc4ee61b30b2e5f0b18eaf1b60e6dce124e0a3908f588b2e7e240968dcde93125aa32bdf215388b7c3f195a274f83 WHIRLPOOL 1761d47cc064e7b807474b7da4b2d54a8e882005672712e0f134c4024a778a5e67df4c480a1e663fd95522235262d124392964c89cd73bb841a6300289ea28c1
+AUX 0002-Don-t-bundle-anything-in-the-annotations-jar.patch 785 SHA256 df1b73a3743d38a2391722b75f1c848cce60fc2bab8dc1d17b740763387f7f55 SHA512 7810ac73d039bbaf74b6302e73879ac1c13edbe747e400d3d32570f7eeeb89dac5d41c05d2dd5babee4769bb3528bdf826dcb2e244e3a15d8342b9d8f45a6752 WHIRLPOOL 24e500ee5df830a114799ef6a2d835eb667d7c09f52ded9c07b8b0d10d5221b64c7a1e008a9c2f4e7c8b71fb7de479e2fa9e8ac8137c214ffcdbeb5dac6542a6
+AUX 0003-JDK-1.8-works-fine-for-me.patch 932 SHA256 982ae953eccec2713d8cc7a6780446899c0f5d331861adfe78b1a2b658ba2226 SHA512 44dcfc2a45307b71a6106f2c2a8b8343f718816c04614acf9e212cf274f33d0796bab44714c66f75a193d09666269e9e2bdc16b63daad66548faa326780e3fa0 WHIRLPOOL 4b07a37c4511ac837bf770124737a46fee72881c1f24b94c72b1c8eed0beaa8910d8aca20161d527da34d2e99b92fd1268b8845c18b7659b04ccc81a4a4cd357
+AUX 0004-Don-t-clean-before-generating-docs.patch 623 SHA256 bab289bd17f094a2a6fee7bc54b4816aa99aaed9b43e7c5372ec21741a47b3f0 SHA512 4b5eed349a60d78dee3417e20798e8bb6a1054b655438e078d217942379529cb283f36e500b78ab15a893790277111c2ec94ed8c8fe37882aaef126c0af56981 WHIRLPOOL 595a2c0aa6e47181bb9e4d5d97d2b11c22e6f84d4e0e584dd1098fd7eb0b861d67797bab96ff10dc23cd40b8c2b85180bdb69fa8cc175bbd2acd2a8662d5db9c
+AUX 0005-Don-t-require-git-to-build.patch 700 SHA256 a590ca9d60ebce7a4bba98db820afb5af9c0aafd73c7b8f51ebf7826c776bb1f SHA512 84858e4c64bd3778cc604102df7e8ebb45c5fe4d7f64f065960d78f81c082a11e7037fcf0481d3b7d033bbcec8e24de78bead4d155672092f096029b5239d9bc WHIRLPOOL 8748f09569dd8a4977e40c3d87f5a67e926c184b557c93c705a25a75ea99d166deac1ac83278aac79dc35f05c4103e610330207d301e5f78df9c385cb78c8ec5
+AUX launchers/fb 1190 SHA256 4bbc11fcac3065b8503988043488ba70a7347de5231a045c58182fd05586ab94 SHA512 1e14856fa31f1115509f5efaa0bde86ba4d82fa195a0b2e5218e955f8c51a0b7d5868c2078e6b6fa72d05145395df63b1aa6e923af4008aa555d43c4de6231cf WHIRLPOOL cffbf923669dafea0b38358c4e1cf1ebdff2cf6d52424511c740b0e8c82d28fc27a6029dd515e7cd4c2531daa18582ce66ca32ffb003db25472a2ca490dcc918
+AUX launchers/fbwrap 41 SHA256 c8cb79523ce39f4790258ea6d85a2559cafe48169a66081b48240e462605a709 SHA512 d7b8cb9e8bbb7509b25abfa4f91efca154239f4b107680e4f6125fb236030a3eaae513b89252b7cb6e5893d52bcd3d4706e44733dc0e08a6a99e30865ea30202 WHIRLPOOL d71fce6937f6954070190abc00716e07d2debe0ea15d3a2e1c0e69645d79abe2b68d1864018e8187bdd4a3735b006c22f34a80fcbeda993a686f2bdc6ffdeb03
+AUX launchers/findbugs 1298 SHA256 75c5633e7951471d07695fda7fba2749df3c93e907e98e1c02ab8bc3313588c2 SHA512 24ba47e65452e36f885a864ae645e58b3a773570bde12371026203d3ca2cd20c2538f4acccf1159b52d2b52d2be913d6ebad794b3f17ab99d4fc3baaa47d1d82 WHIRLPOOL c75a1c36b4ee01c20873cd047f445e0d8cb3b5910e7393d8dd4ae0fa1678c3177e58bece2cdc363947ddf0505769e3a6dd980d4c9a531b5884f6b99f1ef82672
+AUX launchers/findbugs2 1290 SHA256 231464c1b31de2f1cf3defe3857c47f6b3200bee03db278858ea8a3fcd80d65a SHA512 de0eec2986596e67654ef17771c397c30b064d99d8d78dc89bd61ae309c61233091d82ee56b1965005d2dbfd9afb466b3b98554e602df43ffbf72fec60e764ab WHIRLPOOL 11675e234c755558e8bca9080608a9ac9e9b6247518f7a7ed1bb0b637e50e6baf58698f250f9668dd679604cbcfee8cc587555f550435e17097c60c4eb71b320
+DIST findbugs-3.0.1-source.zip 9625065 SHA256 bd8ec66550d419ed40283bd78a6268f9af57dcad20b732a9309fd1835abd33ff SHA512 d967769f2356f28b34d92c7451cf3e2ac004e667bfc3b049b5b10b1c19d7be2cfa0db132a77698d042300330f77a2bb5dd8c4baa0d67c37b7e5ae6da9e83a64f WHIRLPOOL 9e407cb5733560d6a548da37becdf1b1b120459a2453d85d4a345a7ff30a3ba1d92179a2586ebfac3c23c6d20f591aed6429b501d6ec791f4b1a390ab77ce387
+EBUILD findbugs-3.0.1.ebuild 2955 SHA256 cb48742b7b5285ede3a51cc35e269d610c22d5a52b16f852353a7823cb8f8591 SHA512 c47b1f6a097d9a5d0dd74764bbf109d82c9d3069af9cae10ed6910c48e33545ed9421768268650c908aeaa0edc06e5b06afcf61d2af19d80d2b31b5362742b9c WHIRLPOOL f12f61bf8f7e15fd1f501b886e2d7e7f451724202a31045761d9f26d69391614fbb2e230d197abe0439e70c6d7707ef6d7c1e19f671e50d56907abafec08676a
+MISC ChangeLog 2821 SHA256 669de51deee8469edf56fc083010cd31f6c52ca36967274b13e2d69d1e727cb1 SHA512 5e97366de7d9eb5176d09ee03a2218083265500113b8a58151397877c979943afb9dbe5bb0d2e2514b7ca52fe0981dca1ceefa495a62db4e4727110025ed2acd WHIRLPOOL be485e4497e5776a826537d4b31943d46fc43af724da2079603a66534232798d3c49474aa5d9fae772a89b8a9113447100e46830defe0d1c9b57fb97400ff5ee
+MISC ChangeLog-2015 1693 SHA256 cbc720f3b4a75678f627e2b6fcc6045e3a975bc43e27935c9b280bda7f3d5d20 SHA512 a0523efbc0801a0667a981e2f8d75ebfae505179ad714e10d5cd08de5643801a55ba292b772223441400e01d5c56ff2f486d4530d283cebd57d475a458f9ac30 WHIRLPOOL 1ec01528688b88569b31f2a90568fc45a43fd95bce432f7832678fd0f51d6f074f66ba5e5313bc55fb39e5661c94211fffc09d57f827bf42213087750097ca28
+MISC metadata.xml 1055 SHA256 0e99a8ee52cad17b195b5983c79c520b5a35278d5c5170311a252388c9d59ba4 SHA512 82e70de38547ae7e6005e773c0144a131e30737bce6c2768cca4f8264a884cc5166bdd018d1e9474bf5e81421ae61651ee9c2ec285f443fb704c67d1876da039 WHIRLPOOL 1077b703cfef75da5de378bd268168cfea761cc670084f036d88d8aaaf53174f6ae2b1dbff246905d8272eed70330efb1e208609afbe4f8e542dc66c1b6d57c2
diff --git a/dev-util/findbugs/files/0001-Support-bcel-6.0-RC3-instead-of-a-random-snapshot.patch b/dev-util/findbugs/files/0001-Support-bcel-6.0-RC3-instead-of-a-random-snapshot.patch
new file mode 100644
index 000000000000..c92e18741ae1
--- /dev/null
+++ b/dev-util/findbugs/files/0001-Support-bcel-6.0-RC3-instead-of-a-random-snapshot.patch
@@ -0,0 +1,48 @@
+From d4ef7a75e6d0e50f6417825d851ad9e5ed757985 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Tue, 10 Mar 2015 23:47:00 +0000
+Subject: [PATCH 1/2] Support bcel 6.0 RC3 instead of a random snapshot
+
+---
+ .../src/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java | 2 +-
+ findbugs/src/java/edu/umd/cs/findbugs/visitclass/BetterVisitor.java | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/findbugs/src/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java b/findbugs/src/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java
+index 52468c9..d7cbd0e 100644
+--- a/findbugs/src/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java
++++ b/findbugs/src/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java
+@@ -50,7 +50,7 @@ import edu.umd.cs.findbugs.bcel.generic.NULL2Z;
+ * @see Frame
+ * @see DataflowAnalysis
+ */
+-public abstract class AbstractFrameModelingVisitor<Value, FrameType extends Frame<Value>> implements VisitorSupportsInvokeDynamic {
++public abstract class AbstractFrameModelingVisitor<Value, FrameType extends Frame<Value>> extends EmptyVisitor {
+ private FrameType frame;
+
+ private Location location;
+diff --git a/findbugs/src/java/edu/umd/cs/findbugs/visitclass/BetterVisitor.java b/findbugs/src/java/edu/umd/cs/findbugs/visitclass/BetterVisitor.java
+index 5d62092..a36abac 100644
+--- a/findbugs/src/java/edu/umd/cs/findbugs/visitclass/BetterVisitor.java
++++ b/findbugs/src/java/edu/umd/cs/findbugs/visitclass/BetterVisitor.java
+@@ -56,7 +56,7 @@ import org.apache.bcel.classfile.StackMap;
+ import org.apache.bcel.classfile.StackMapEntry;
+ import org.apache.bcel.classfile.Synthetic;
+ import org.apache.bcel.classfile.Unknown;
+-import org.apache.bcel.classfile.Visitor;
++import org.apache.bcel.classfile.EmptyVisitor;
+
+ /**
+ * Fixedup of from org.apache.bcel.classfile.Visitor
+@@ -64,7 +64,7 @@ import org.apache.bcel.classfile.Visitor;
+ * @author <A HREF="http://www.cs.umd.edu/~pugh">William Pugh</A>
+ * @version 980818
+ */
+-public abstract class BetterVisitor implements Visitor {
++public abstract class BetterVisitor extends EmptyVisitor {
+
+ /**
+ * clone() is overridden to change access control from protected to public.
+--
+2.0.4
+
diff --git a/dev-util/findbugs/files/0002-Don-t-bundle-anything-in-the-annotations-jar.patch b/dev-util/findbugs/files/0002-Don-t-bundle-anything-in-the-annotations-jar.patch
new file mode 100644
index 000000000000..67938e4e371c
--- /dev/null
+++ b/dev-util/findbugs/files/0002-Don-t-bundle-anything-in-the-annotations-jar.patch
@@ -0,0 +1,25 @@
+From c956ffd82e5b88be74dca187dc80afcf6559a78f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Wed, 11 Mar 2015 21:41:36 +0000
+Subject: [PATCH 2/2] Don't bundle anything in the annotations jar
+
+---
+ findbugs/build.xml | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/findbugs/build.xml b/findbugs/build.xml
+index 698b91f..3eac5d6 100644
+--- a/findbugs/build.xml
++++ b/findbugs/build.xml
+@@ -298,8 +298,6 @@
+ <fileset dir="${src.dir}">
+ <include name="**/annotations/*.java"/>
+ </fileset>
+- <zipfileset src="${jar.dir}/jcip-annotations.jar" excludes="META-INF/**,**/*.html"/>
+- <zipfileset src="${jar.dir}/jsr305.jar" excludes="META-INF/**,**/*.html"/>
+ </jar>
+ </target>
+
+--
+2.0.4
+
diff --git a/dev-util/findbugs/files/0003-JDK-1.8-works-fine-for-me.patch b/dev-util/findbugs/files/0003-JDK-1.8-works-fine-for-me.patch
new file mode 100644
index 000000000000..ce4e186f0aca
--- /dev/null
+++ b/dev-util/findbugs/files/0003-JDK-1.8-works-fine-for-me.patch
@@ -0,0 +1,30 @@
+From af7e19734c9bbd21d2f1bf8a66b5ca1c131eeacd Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Fri, 13 Mar 2015 00:20:20 +0000
+Subject: [PATCH 3/3] JDK 1.8 works fine for me
+
+---
+ findbugs/build.xml | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/findbugs/build.xml b/findbugs/build.xml
+index 3eac5d6..48c8f2b 100644
+--- a/findbugs/build.xml
++++ b/findbugs/build.xml
+@@ -122,13 +122,6 @@
+ </javac>
+ </target>
+ <target name="classes" depends="init">
+- <echo>Requires JDK 7.x (not 8!), using: ${ant.java.version}</echo>
+- <fail message="Requires JDK 7.x (not 8!), using: ${ant.java.version}">
+- <condition>
+- <equals arg1="1.8" arg2="${ant.java.version}"/>
+- </condition>
+- </fail>
+-
+ <!-- Compile Java source files. -->
+ <echo level="info" message="compiling findbugs"/>
+ <javac
+--
+2.0.4
+
diff --git a/dev-util/findbugs/files/0004-Don-t-clean-before-generating-docs.patch b/dev-util/findbugs/files/0004-Don-t-clean-before-generating-docs.patch
new file mode 100644
index 000000000000..670f497e507b
--- /dev/null
+++ b/dev-util/findbugs/files/0004-Don-t-clean-before-generating-docs.patch
@@ -0,0 +1,25 @@
+From c73984b12bb3c80a67d993a30c894ee05613d422 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Fri, 13 Mar 2015 13:59:22 +0000
+Subject: [PATCH 4/4] Don't clean before generating docs
+
+---
+ findbugs/build.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/findbugs/build.xml b/findbugs/build.xml
+index 48c8f2b..d0cbc04 100644
+--- a/findbugs/build.xml
++++ b/findbugs/build.xml
+@@ -652,7 +652,7 @@
+ </target>
+
+
+- <target name="checkdocs" depends="clean">
++ <target name="checkdocs">
+ <!-- FIXME: check whether docs are up to date -->
+ </target>
+
+--
+2.0.4
+
diff --git a/dev-util/findbugs/files/0005-Don-t-require-git-to-build.patch b/dev-util/findbugs/files/0005-Don-t-require-git-to-build.patch
new file mode 100644
index 000000000000..acdff2ce96d2
--- /dev/null
+++ b/dev-util/findbugs/files/0005-Don-t-require-git-to-build.patch
@@ -0,0 +1,25 @@
+From cbf9d81dba1ef0a42f79391c87845d7875a13993 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Mon, 18 May 2015 20:41:58 +0100
+Subject: [PATCH 5/5] Don't require git to build
+
+---
+ findbugs/build.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/findbugs/build.xml b/findbugs/build.xml
+index d0cbc04..42c6d09 100644
+--- a/findbugs/build.xml
++++ b/findbugs/build.xml
+@@ -636,7 +636,7 @@
+ </target>
+
+
+- <target name="version" depends="classes,-get-git-revision" >
++ <target name="version" depends="classes" >
+ <echo>${gitrnum}</echo>
+ <java classpathref="tools.classpath"
+ output="${version.props.file}"
+--
+2.3.3
+
diff --git a/dev-util/findbugs/files/launchers/fb b/dev-util/findbugs/files/launchers/fb
new file mode 100644
index 000000000000..79d44a41681d
--- /dev/null
+++ b/dev-util/findbugs/files/launchers/fb
@@ -0,0 +1,75 @@
+escape_arg() {
+ echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g"
+}
+
+# Set defaults
+fb_mainclass="edu.umd.cs.findbugs.workflow.FB"
+user_jvmargs=''
+ea_arg=''
+debug_arg=''
+conservespace_arg=''
+user_props=''
+
+# Handle command line arguments.
+while [ $# -gt 0 ]; do
+ case $1 in
+ -textui)
+ fb_mainclass="edu.umd.cs.findbugs.FindBugs2"
+ ;;
+
+ -jvmArgs)
+ shift
+ user_jvmargs="$1"
+ ;;
+
+ -ea)
+ ea_arg='-ea'
+ ;;
+
+ -maxHeap)
+ shift
+ fb_maxheap="-Xmx$1m"
+ ;;
+
+ -debug)
+ debug_arg="-Dfindbugs.debug=true"
+ ;;
+
+ -conserveSpace)
+ conservespace_arg="-Dfindbugs.conserveSpace=true"
+ ;;
+
+ -property)
+ shift
+ user_props="-D$1 $user_props"
+ ;;
+
+ -D*=*)
+ user_props="$1 $user_props"
+ ;;
+
+ -version)
+ fb_mainclass=edu.umd.cs.findbugs.Version
+ fb_appargs="-release"
+ while [ $# -gt 0 ]; do
+ shift
+ done
+ ;;
+
+ -help)
+ fb_mainclass="edu.umd.cs.findbugs.ShowHelp"
+ ;;
+
+ # All unrecognized arguments will be accumulated and
+ # passed to the application.
+ *)
+ fb_appargs="$fb_appargs `escape_arg "$1"`"
+ ;;
+ esac
+
+ shift
+done
+
+fb_maxheap=${fb_maxheap:-"-Xmx768m"}
+fb_jvmargs="$fb_maxheap $user_jvmargs $debug_arg $conservespace_arg $user_props $ea_arg"
+gjl_pkg_args="$fb_appargs"
diff --git a/dev-util/findbugs/files/launchers/fbwrap b/dev-util/findbugs/files/launchers/fbwrap
new file mode 100644
index 000000000000..7d208611c13c
--- /dev/null
+++ b/dev-util/findbugs/files/launchers/fbwrap
@@ -0,0 +1,3 @@
+fb_mainclass="$1"
+unset fb_jvmargs
+shift
diff --git a/dev-util/findbugs/files/launchers/findbugs b/dev-util/findbugs/files/launchers/findbugs
new file mode 100644
index 000000000000..e557ce516212
--- /dev/null
+++ b/dev-util/findbugs/files/launchers/findbugs
@@ -0,0 +1,83 @@
+escape_arg() {
+ echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g"
+}
+
+# Set defaults
+fb_mainclass="edu.umd.cs.findbugs.LaunchAppropriateUI"
+user_jvmargs=''
+ea_arg=''
+debug_arg=''
+conservespace_arg=''
+user_props=''
+
+# Handle command line arguments.
+while [ $# -gt 0 ]; do
+ case $1 in
+ -gui)
+ # this is the default
+ ;;
+
+ -gui1)
+ user_props="-Dfindbugs.launchUI=1 $user_props"
+ ;;
+
+ -textui)
+ fb_mainclass="edu.umd.cs.findbugs.FindBugs2"
+ ;;
+
+ -jvmArgs)
+ shift
+ user_jvmargs="$1"
+ ;;
+
+ -ea)
+ ea_arg='-ea'
+ ;;
+
+ -maxHeap)
+ shift
+ fb_maxheap="-Xmx$1m"
+ ;;
+
+ -debug)
+ debug_arg="-Dfindbugs.debug=true"
+ ;;
+
+ -conserveSpace)
+ conservespace_arg="-Dfindbugs.conserveSpace=true"
+ ;;
+
+ -property)
+ shift
+ user_props="-D$1 $user_props"
+ ;;
+
+ -D*=*)
+ user_props="$1 $user_props"
+ ;;
+
+ -version)
+ fb_mainclass=edu.umd.cs.findbugs.Version
+ fb_appargs="-release"
+ while [ $# -gt 0 ]; do
+ shift
+ done
+ ;;
+
+ -help)
+ fb_mainclass="edu.umd.cs.findbugs.ShowHelp"
+ ;;
+
+ # All unrecognized arguments will be accumulated and
+ # passed to the application.
+ *)
+ fb_appargs="$fb_appargs `escape_arg "$1"`"
+ ;;
+ esac
+
+ shift
+done
+
+fb_maxheap=${fb_maxheap:-"-Xmx768m"}
+fb_jvmargs="$fb_maxheap $user_jvmargs $debug_arg $conservespace_arg $user_props $ea_arg"
+gjl_pkg_args="$fb_appargs"
diff --git a/dev-util/findbugs/files/launchers/findbugs2 b/dev-util/findbugs/files/launchers/findbugs2
new file mode 100644
index 000000000000..d87ea82c0907
--- /dev/null
+++ b/dev-util/findbugs/files/launchers/findbugs2
@@ -0,0 +1,89 @@
+# Default UI is GUI2
+fb_launchui="2"
+
+#
+# Stuff we're going to pass to the JVM as JVM arguments.
+#
+jvm_debug=""
+jvm_maxheap="-Xmx768m"
+jvm_ea=""
+jvm_conservespace=""
+jvm_user_props=""
+
+#
+# Process command line args until we hit one we don't recognize.
+#
+finishedArgs=false
+while [ $# -gt 0 ] && [ "$finishedArgs" = "false" ]; do
+
+ arg=$1
+
+ case $arg in
+ -textui)
+ shift
+ fb_launchui="0"
+ ;;
+
+ -gui)
+ shift
+ fb_launchui="2"
+ ;;
+
+ -gui1)
+ shift
+ fb_launchui="1"
+ ;;
+
+ -maxHeap)
+ shift
+ jvm_maxheap="-Xmx$1m"
+ shift
+ ;;
+
+ -ea)
+ shift
+ jvm_ea="-ea"
+ ;;
+
+ -debug)
+ shift
+ jvm_debug="-Dfindbugs.debug=true"
+ ;;
+
+ -conserveSpace)
+ shift
+ jvm_conservespace="-Dfindbugs.conserveSpace=true"
+ ;;
+
+ -property)
+ shift
+ jvm_user_props="-D$1 $jvm_user_props"
+ shift
+ ;;
+
+ -D*=*)
+ jvm_user_props="$1 $user_props"
+ shift
+ ;;
+
+ -version)
+ shift
+ fb_launchui="version"
+ ;;
+
+ -help)
+ shift
+ fb_launchui="help"
+ ;;
+
+ # All arguments starting from the first unrecognized arguments
+ # are passed on to the Java app.
+ *)
+ finishedArgs=true
+ ;;
+ esac
+
+done
+
+fb_mainclass="edu.umd.cs.findbugs.LaunchAppropriateUI"
+fb_jvmargs="$jvm_debug $jvm_maxheap $jvm_ea $jvm_conservespace $jvm_user_props -Dfindbugs.launchUI=$fb_launchui"
diff --git a/dev-util/findbugs/findbugs-3.0.1.ebuild b/dev-util/findbugs/findbugs-3.0.1.ebuild
new file mode 100644
index 000000000000..2498e2e3a9e4
--- /dev/null
+++ b/dev-util/findbugs/findbugs-3.0.1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils 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="test"
+
+CDEPEND="dev-java/ant-core:0
+ dev-java/apple-java-extensions-bin:0
+ >=dev-java/asm-5:4
+ >=dev-java/bcel-6:0
+ dev-java/commons-lang:2.1
+ dev-java/dom4j:1
+ dev-java/hamcrest-core:1.3
+ dev-java/jaxen:1.1
+ dev-java/jcip-annotations:0
+ dev-java/jdepend:0
+ >=dev-java/jformatstring-2.0.3:0
+ dev-java/jsr305:0
+ dev-java/junit:4"
+
+RDEPEND=">=virtual/jre-1.7
+ ${CDEPEND}"
+
+DEPEND=">=virtual/jdk-1.7
+ app-arch/unzip
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-java/saxon:6.5
+ )
+ test? ( dev-java/ant-junit:0 )
+ ${CDEPEND}"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_BUILD_TARGET="build"
+EANT_DOC_TARGET="apiJavadoc docs"
+EANT_TEST_TARGET="runjunit"
+EANT_GENTOO_CLASSPATH="ant-core,apple-java-extensions-bin,asm-4,bcel,commons-lang-2.1,dom4j-1,hamcrest-core-1.3,jaxen-1.1,jcip-annotations,jdepend,jformatstring,jsr305,junit-4"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ use doc && EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --build-only --with-dependencies saxon-6.5)"
+ EANT_EXTRA_ARGS="-Dgitrnum=gentoo -Dxsl.stylesheet.home=${EROOT}usr/share/sgml/docbook/xsl-stylesheets"
+}
+
+java_prepare() {
+ epatch \
+ "${FILESDIR}/0001-Support-bcel-6.0-RC3-instead-of-a-random-snapshot.patch" \
+ "${FILESDIR}/0002-Don-t-bundle-anything-in-the-annotations-jar.patch" \
+ "${FILESDIR}/0003-JDK-1.8-works-fine-for-me.patch" \
+ "${FILESDIR}/0004-Don-t-clean-before-generating-docs.patch" \
+ "${FILESDIR}/0005-Don-t-require-git-to-build.patch"
+
+ # Remove bundled jars.
+ find -name "*.jar" -delete || die
+}
+
+src_install() {
+ java-pkg_dojar lib/{${PN},${PN}-ant,annotations}.jar
+
+ insinto "/usr/share/${PN}/plugin"
+ doins plugin/README
+
+ use source && java-pkg_dosrc src/*/edu
+
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/html/web"
+ doins -r build/doc/*
+ java-pkg_dojavadoc apiJavaDoc
+ fi
+
+ local SCRIPT CLASS
+ local ARGS="-Dfindbugs.home=${EROOT}usr/share/findbugs"
+
+ ls src/scripts/standard | grep -E -v '^(findbugs2?|fb|fbwrap)$' | while read SCRIPT; do
+ CLASS=$(grep '^fb_mainclass=' "src/scripts/standard/${SCRIPT}" | sed 's/^.*=//')
+ java-pkg_dolauncher "findbugs-${SCRIPT#findbugs-}" \
+ --java_args "${ARGS}" --main "${CLASS}"
+ done
+
+ for SCRIPT in findbugs{,2} fb{,wrap}; do
+ java-pkg_dolauncher "${SCRIPT}" \
+ --java_args "\$fb_jvmargs ${ARGS}" --main '$fb_mainclass' \
+ -pre "${FILESDIR}/launchers/${SCRIPT}"
+ done
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+pkg_postinst() {
+ elog "findbugs ships with many launcher scripts. Most of these have been"
+ elog "installed with a findbugs- prefix to avoid conflicts and confusion"
+ elog "with other executables in the PATH."
+}
diff --git a/dev-util/findbugs/metadata.xml b/dev-util/findbugs/metadata.xml
new file mode 100644
index 000000000000..7f5d054caa9f
--- /dev/null
+++ b/dev-util/findbugs/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <longdescription>FindBugs uses static analysis to inspect Java bytecode for occurrences of bug patterns. Static analysis means that FindBugs can find bugs by simply inspecting a program's code: executing the program is not necessary. This makes FindBugs very easy to use: in general, you should be able to use it to look for bugs in your code within a few minutes of downloading it. FindBugs works by analyzing Java bytecode (compiled class files), so you don't even need the program's source code to use it. Because its analysis is sometimes imprecise, FindBugs can report false warnings, which are warnings that do not indicate real errors. In practice, the rate of false warnings reported by FindBugs is less than 50%.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">findbugs</remote-id>
+ </upstream>
+</pkgmetadata>