diff options
Diffstat (limited to 'devel/pmd/files/patch-cpd.sh')
-rw-r--r-- | devel/pmd/files/patch-cpd.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/devel/pmd/files/patch-cpd.sh b/devel/pmd/files/patch-cpd.sh new file mode 100644 index 000000000000..e26966e52dc1 --- /dev/null +++ b/devel/pmd/files/patch-cpd.sh @@ -0,0 +1,41 @@ +$FreeBSD$ + +. Use JARs from ${DATADIR} +. Use javavmwrapper + +--- bin/cpd.sh.orig Mon Apr 17 23:28:11 2006 ++++ bin/cpd.sh Tue Jul 11 07:47:13 2006 +@@ -20,26 +20,8 @@ + exit 1 + fi + +- +-SCRIPT_DIR=`dirname $0` +-CWD="$PWD" +- +-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 ++for jarfile in `ls %%DATADIR%%/*.jar`; do + classpath=$classpath:$jarfile + done + +@@ -62,4 +44,4 @@ + + # echo "CLASSPATH: $classpath" + +-java $HEAPSIZE -cp $classpath net.sourceforge.pmd.cpd.CPD --minimum-tokens $MINIMUM_TOKENS --files $DIRECTORY --language $LANGUAGE ++JAVA_VERSION="%%JAVA_VERSION%%" exec "%%LOCALBASE%%/bin/java" $HEAPSIZE -cp $classpath net.sourceforge.pmd.cpd.CPD --minimum-tokens $MINIMUM_TOKENS --files $DIRECTORY --language $LANGUAGE |