Fix a long-standing problem of the jode-script trying to use the wrong

getopt JAR. Bump PORTREVISION.

While here improve various bits a bit and add the regression-test target
using the bundled tests.
This commit is contained in:
Mikhail Teterin
2015-01-15 23:28:09 +00:00
parent 22db5e666d
commit ea89cb4258
4 changed files with 21 additions and 20 deletions
+8 -2
View File
@@ -3,7 +3,7 @@
PORTNAME= jode
PORTVERSION= 1.1.1.1
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= java devel
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/1.1.2-pre1
DISTNAME= ${PORTNAME}-${VENDOR_VERSION}
@@ -29,6 +29,8 @@ CONFIGURE_ENV+= CLASSLIB=${CLASSLIB} JAR="${JAR}" \
CONFIGURE_ARGS+=--datadir="${JAVALIBDIR}"
# Don't create the dependencies:
MAKE_ARGS+= JAVADEP=:
SUB_LIST+= GETOPT_JAR=${GETOPT_JAR}
SUB_FILES= jode
PLIST_FILES= bin/jode %%JAVAJARDIR%%/jode-${VENDOR_VERSION}.jar
post-patch:
@@ -41,8 +43,12 @@ post-build:
cd ${WRKSRC} && ${JAR} cvf ${PORTNAME}-${VENDOR_VERSION}.jar \
`${FIND} jode -name \*.class`
post-install:
do-install:
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${VENDOR_VERSION}.jar \
${STAGEDIR}/${JAVAJARDIR}/
${INSTALL_SCRIPT} ${WRKDIR}/jode ${STAGEDIR}/${PREFIX}/bin/
test check regression-test: build
${MAKE} -C ${WRKSRC}/test check-TESTS
.include <bsd.port.mk>
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
case $1 in
[Ss]wi*) CLAZZ=jode.swingui.Main; shift ;;
[Dd]ec*) CLAZZ=jode.decompiler.Main; shift ;;
[Oo]bf*) CLAZZ=jode.obfuscator.Main; shift ;;
*) CLAZZ=jode.decompiler.Main ;;
esac
# This will only set CP if CLASSPATH is non-empty:
CP=`echo $CLASSPATH | sed -e 's/:/,/g' -e 's/..*/--classpath &/'`
exec java -cp %%JAVAJARDIR%%/jode-1.1.2-pre1.jar:%%GETOPT_JAR%% $CLAZZ $CP "$@"
-17
View File
@@ -1,17 +0,0 @@
--- bin/jode.in Mon Oct 2 09:08:36 2000
+++ bin/jode.in Tue Jun 24 16:13:17 2003
@@ -1,4 +1,3 @@
#!@SHELL@
-prefix=@prefix@
case $1 in
@@ -9,6 +8,6 @@
esac
+# This will only set CP if CLASSPATH is non-empty:
+CP=`echo $CLASSPATH | sed -e 's/:/,/g' -e 's/..*/--classpath &/'`
-CP=`echo $CLASSPATH | sed s/:/,/`
-CLASSPATH=@datadir@/jode-@VERSION@.jar:@CLASSPATH@ \
-@JAVA@ $CLAZZ --classpath $CP $*
+exec @prefix@/bin/java -cp @datadir@/jode-@VERSION@.jar:@datadir@/getopt.jar $CLAZZ $CP "$@"
-1
View File
@@ -12,7 +12,6 @@ including inner and anonymous classes.
The optimizer transforms class files in various ways with can be
controlled by a script file. It supports the following operations:
. Renaming class, method, field and local names to shorter,
obfuscated, or unique names or according to a given
translation table