mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
. Add a port of FindBugs:
FindBugs looks for bugs in Java programs. It is based on the concept of bug patterns. A bug pattern is a code idiom that is often an error. Bug patterns arise for a variety of reasons: * Difficult language features * Misunderstood API methods * Misunderstood invariants when code is modified during maintenance * Garden variety mistakes: typos, use of the wrong boolean operator FindBugs uses static analysis to inspect Java bytecode for occurrences of bug patterns. WWW: http://findbugs.sourceforge.net/
This commit is contained in:
parent
5b9d071b43
commit
d30d06eb65
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=270825
@ -673,6 +673,7 @@
|
||||
SUBDIR += jakelib2
|
||||
SUBDIR += jam
|
||||
SUBDIR += jansson
|
||||
SUBDIR += java-findbugs
|
||||
SUBDIR += java-util-concurrent
|
||||
SUBDIR += javolution
|
||||
SUBDIR += jclassinfo
|
||||
|
79
devel/java-findbugs/Makefile
Normal file
79
devel/java-findbugs/Makefile
Normal file
@ -0,0 +1,79 @@
|
||||
# New ports collection makefile for: findbugs
|
||||
# Date created: 19 December 2010
|
||||
# Whom: glewis
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= findbugs
|
||||
PORTVERSION= 1.3.9
|
||||
CATEGORIES= devel java
|
||||
MASTER_SITES= SF
|
||||
PKGNAMEPREFIX= java-
|
||||
|
||||
MAINTAINER= glewis@FreeBSD.org
|
||||
COMMENT= Find Bugs in Java Programs
|
||||
|
||||
RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
|
||||
|
||||
LICENSE= LGPL21
|
||||
USE_JAVA= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
JAR_FILES= annotations.jar \
|
||||
ant.jar \
|
||||
asm-3.1.jar \
|
||||
asm-analysis-3.1.jar \
|
||||
asm-commons-3.1.jar \
|
||||
asm-tree-3.1.jar \
|
||||
asm-util-3.1.jar \
|
||||
asm-xml-3.1.jar \
|
||||
bcel.jar \
|
||||
commons-lang-2.4.jar \
|
||||
dom4j-1.6.1.jar \
|
||||
${PORTNAME}.jar \
|
||||
${PORTNAME}-ant.jar \
|
||||
jFormatString.jar \
|
||||
jaxen-1.1.1.jar \
|
||||
jdepend-2.9.jar \
|
||||
jsr305.jar \
|
||||
mysql-connector-java-5.1.7-bin.jar
|
||||
|
||||
.for f in ${JAR_FILES}
|
||||
PLIST_FILES+= %%DATADIR%%/lib/${f}
|
||||
.endfor
|
||||
PLIST_FILES+= %%DATADIR%%/bin/${PORTNAME} \
|
||||
bin/${PORTNAME}
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
PORTDOCS= *
|
||||
.endif
|
||||
|
||||
.if !defined(NOPORTEXAMPLES)
|
||||
PORTEXAMPLES= *
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
@-${MKDIR} ${DATADIR}/lib
|
||||
.for f in ${JAR_FILES}
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/${f} ${DATADIR}/lib/
|
||||
.endfor
|
||||
@-${MKDIR} ${DATADIR}/bin
|
||||
@${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" \
|
||||
-e "s:%%JAVAJARDIR%%:${JAVAJARDIR}:" ${WRKSRC}/bin/${PORTNAME}2
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/${PORTNAME}2 ${DATADIR}/bin/${PORTNAME}
|
||||
${LN} -sf ${DATADIR}/bin/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
|
||||
.if !defined(NOPORTDOCS)
|
||||
@-${MKDIR} ${DOCSDIR}
|
||||
.for f in LICENSE* README*
|
||||
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
||||
.endfor
|
||||
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR}/
|
||||
.endif
|
||||
.if !defined(NOPORTEXAMPLES)
|
||||
@-${MKDIR} ${EXAMPLESDIR}
|
||||
@cd ${WRKSRC}/src && ${COPYTREE_SHARE} . ${EXAMPLESDIR}/
|
||||
@cd ${WRKSRC}/bin && ${COPYTREE_BIN} . ${EXAMPLESDIR}/
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/java-findbugs/distinfo
Normal file
2
devel/java-findbugs/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (findbugs-1.3.9.tar.gz) = 6805754cb7933855695d56a4626227ba0320c8e36687b37362e99a59c80a5052
|
||||
SIZE (findbugs-1.3.9.tar.gz) = 7481095
|
75
devel/java-findbugs/files/patch-findbugs2
Normal file
75
devel/java-findbugs/files/patch-findbugs2
Normal file
@ -0,0 +1,75 @@
|
||||
--- bin/findbugs2.orig 2010-12-26 13:57:04.000000000 -0800
|
||||
+++ bin/findbugs2 2010-12-26 14:00:48.000000000 -0800
|
||||
@@ -27,27 +27,11 @@
|
||||
dir=`dirname "$program"`
|
||||
findbugs_home="$dir/.."
|
||||
|
||||
-# Handle FHS-compliant installations (e.g., Fink)
|
||||
-if [ -d "$findbugs_home/share/findbugs" ]; then
|
||||
- findbugs_home="$findbugs_home/share/findbugs"
|
||||
-fi
|
||||
-
|
||||
# Make absolute
|
||||
findbugs_home=`cd "$findbugs_home" && pwd`
|
||||
|
||||
fb_pathsep=':'
|
||||
|
||||
-# Handle cygwin, courtesy of Peter D. Stout
|
||||
-fb_osname=`uname`
|
||||
-if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
|
||||
- findbugs_home=`cygpath --mixed "$findbugs_home"`
|
||||
- fb_pathsep=';'
|
||||
-fi
|
||||
-# Handle MKS, courtesy of Kelly O'Hair
|
||||
-if [ "${fb_osname}" = "Windows_NT" ]; then
|
||||
- fb_pathsep=';'
|
||||
-fi
|
||||
-
|
||||
if [ ! -d "$findbugs_home" ]; then
|
||||
echo "The path $findbugs_home,"
|
||||
echo "which is where I think FindBugs is located,"
|
||||
@@ -56,14 +40,7 @@
|
||||
fi
|
||||
|
||||
# Choose default java binary
|
||||
-fb_javacmd=java
|
||||
-if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
|
||||
- if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
|
||||
- fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java
|
||||
- else
|
||||
- fb_javacmd="$JAVA_HOME/bin/java"
|
||||
- fi
|
||||
-fi
|
||||
+fb_javacmd="%%LOCALBASE%%/bin/java"
|
||||
|
||||
# Default UI is GUI2
|
||||
fb_launchui="2"
|
||||
@@ -133,7 +110,7 @@
|
||||
jvm_user_props="-D$1 $jvm_user_props"
|
||||
shift
|
||||
;;
|
||||
-
|
||||
+
|
||||
-D*=*)
|
||||
jvm_user_props="$1 $user_props"
|
||||
shift
|
||||
@@ -158,17 +135,9 @@
|
||||
|
||||
done
|
||||
|
||||
-# Extra JVM args for MacOSX.
|
||||
-if [ $fb_osname = "Darwin" ]; then
|
||||
- fb_jvmargs="$fb_jvmargs \
|
||||
- -Xdock:name=FindBugs -Xdock:icon=${findbugs_home}/lib/buggy.icns \
|
||||
- -Dapple.laf.useScreenMenuBar=true"
|
||||
-fi
|
||||
-
|
||||
#
|
||||
# Launch JVM
|
||||
#
|
||||
-exec "$fb_javacmd" \
|
||||
- -classpath "$fb_appjar$fb_pathsep$CLASSPATH" \
|
||||
+JAVA_VERSION="1.5+" exec "$fb_javacmd" \
|
||||
-Dfindbugs.home="$findbugs_home" \
|
||||
$jvm_debug $jvm_maxheap $jvm_ea $jvm_conservespace $jvm_user_props \
|
||||
-Dfindbugs.launchUI=$fb_launchui \
|
13
devel/java-findbugs/pkg-descr
Normal file
13
devel/java-findbugs/pkg-descr
Normal file
@ -0,0 +1,13 @@
|
||||
FindBugs looks for bugs in Java programs. It is based on the concept of bug
|
||||
patterns. A bug pattern is a code idiom that is often an error. Bug patterns
|
||||
arise for a variety of reasons:
|
||||
|
||||
* Difficult language features
|
||||
* Misunderstood API methods
|
||||
* Misunderstood invariants when code is modified during maintenance
|
||||
* Garden variety mistakes: typos, use of the wrong boolean operator
|
||||
|
||||
FindBugs uses static analysis to inspect Java bytecode for occurrences of
|
||||
bug patterns.
|
||||
|
||||
WWW: http://findbugs.sourceforge.net/
|
Loading…
Reference in New Issue
Block a user