DE is a java package containing a decompiler and an optimizer for

java. Can be used from command line or through the Swing-based GUI.
This commit is contained in:
Mikhail Teterin
2003-06-24 20:34:03 +00:00
parent 501d024ca1
commit 61c93d2ba2
7 changed files with 110 additions and 0 deletions

48
java/jode/Makefile Normal file
View File

@@ -0,0 +1,48 @@
# New ports collection makefile for: jode-regexp
# Date created: June 24th 2003
# Whom: mi
#
# $FreeBSD$
PORTNAME= jode
PORTVERSION= 1.1.1
CATEGORIES= java devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=${PORTNAME}
MAINTAINER= mi@aldan.algebra.com
COMMENT= A java package containing a decompiler and an optimizer for java
BUILD_DEPENDS= ${GETOPT_JAR}:${PORTSDIR}/java/java-getopt
RUN_DEPENDS= ${BUILD_DEPENDS}
USE_JAVA= 1.2+
NEED_JAVAC= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
GETOPT_JAR= ${JAVAJARDIR}/getopt.jar
CLASSLIB= ${JAVA_CLASSES}:${GETOPT_JAR}
CONFIGURE_ENV+= CLASSLIB=${CLASSLIB} JAR="${JAR}" \
JAVA="${JAVA}" JAVAC="${JAVAC}"
CONFIGURE_ARGS+=--datadir="${JAVAJARDIR}"
# Don't create the dependencies:
MAKE_ARGS+= JAVADEP=:
# Run two compilers in parallel -- faster even on a single CPU machine:
MAKE_ARGS+= -j2
PLIST_SUB+= VERSION=${PORTVERSION}
post-build:
cd ${WRKSRC} && ${JAR} cvf ${PORTNAME}-${PORTVERSION}.jar \
`${FIND} jode -name \*.class`
post-install:
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar \
${JAVAJARDIR}/
# Documentation HTML seems broken and out of date. Don't bother
#.ifndef (NOPORTDOCS)
# ${MKDIR} ${DOCSDIR}
# ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif ${DOCSDIR}/
#.endif
.include <bsd.port.mk>

1
java/jode/distinfo Normal file
View File

@@ -0,0 +1 @@
MD5 (jode-1.1.1.tar.gz) = 66e76ed2dd68d6b4a2c05f9af265f749

View File

@@ -0,0 +1,18 @@
--- 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,7 @@
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 javavm -cp @datadir@/jode-@VERSION@.jar:@datadir@/getopt.jar \
+ $CLAZZ $CP "$@"

View File

@@ -0,0 +1,16 @@
--- configure Sun Aug 12 16:34:31 2001
+++ configure Tue Jun 24 13:33:58 2003
@@ -1125,5 +1125,5 @@
withval="$with_java"
- if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
+ if test -n "${withval}" -a "${withval}" != "yes" -a "${withval}" != "no"; then
# set javac to user input value
@@ -1730,5 +1730,5 @@
{ echo "configure: error: You must only give one option --with-javac or --with-jikes" 1>&2; exit 1; }
fi
- if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
+ if test -n "${withval}" -a "${withval}" != "yes" -a "${withval}" != "no"; then
for ac_file in ${withval}
do

24
java/jode/pkg-descr Normal file
View File

@@ -0,0 +1,24 @@
JODE is a java package containing a decompiler and an optimizer for
java. This package is freely available under the GNU GPL. The bytecode
package and the core decompiler is now under GNU Lesser General Public
License, so you can integrate it in your project.
Can be used from command line or through the Swing-based GUI.
The decompiler reads in class files and produces something similar to
the original java file. Jode has support for all constructs of JDK-1.3
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
. Removing debugging information
. Removing dead code (classes, fields, methods) and constant
fields
. Optimizing local variable allocation
WWW: http://jode.sourceforge.net/

2
java/jode/pkg-plist Normal file
View File

@@ -0,0 +1,2 @@
bin/jode
share/java/classes/jode-%%VERSION%%.jar