diff --git a/devel/cfr/DESCR b/devel/cfr/DESCR new file mode 100644 index 000000000000..177dcbecbd2a --- /dev/null +++ b/devel/cfr/DESCR @@ -0,0 +1,12 @@ +CFR will decompile modern Java features - Java 8 lambdas (pre and post +Java beta 103 changes), Java 7 String switches etc, but is written +entirely in Java 6. (FAQ) + +To use, simply run the cfr command, with the class name you want to +decompile (either as a path to a class file, or as a fully qualified +classname on your classpath), and optionally the method name. (--help +to list arguments). + +Alternately, to decompile an entire jar, simply provide the jar path, +and if you want to emit files (which you probably do!) add --outputdir +/tmp/putithere diff --git a/devel/cfr/Makefile b/devel/cfr/Makefile new file mode 100644 index 000000000000..dcfae530f6f8 --- /dev/null +++ b/devel/cfr/Makefile @@ -0,0 +1,40 @@ +# $NetBSD: Makefile,v 1.1 2018/04/04 16:07:21 pho Exp $ + +DISTNAME= cfr_0_125 +PKGNAME= ${DISTNAME:S/_/-/:S/_/./g} +CATEGORIES= devel +MASTER_SITES= http://www.benf.org/other/cfr/ +EXTRACT_SUFX= .jar + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.benf.org/other/cfr/ +COMMENT= Another java decompiler +LICENSE= mit + +NO_CONFIGURE= yes +USE_JAVA= run +USE_JAVA2= 6 +WRKSRC= ${WRKDIR} +EXTRACT_CMD= ${CP} -f "$$extract_file" "${WRKSRC}" + +LIBDIR= lib/java/cfr +INSTALLATION_DIRS= bin ${LIBDIR} + +# CFR tends to consume a huge amount of memory: +# -Xmx maximum Java heap size +JVM_ARGS= -Xmx4G + +do-build: + ${PRINTF} '#!%s\nexec "%s" %s -jar "%s" "$$@"\n' \ + "${SH}" \ + "${JAVA_BINPREFIX}-java" \ + "${JVM_ARGS}" \ + "${PREFIX}/${LIBDIR}/${DISTNAME}${EXTRACT_SUFX}" \ + > "${WRKSRC}/cfr" + +do-install: + ${INSTALL_SCRIPT} "${WRKSRC}/cfr" "${DESTDIR}${PREFIX}/bin" + ${INSTALL_DATA} "${WRKSRC}/${DISTNAME}${EXTRACT_SUFX}" "${DESTDIR}${PREFIX}/${LIBDIR}" + +.include "../../mk/java-vm.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/cfr/PLIST b/devel/cfr/PLIST new file mode 100644 index 000000000000..56501b8c38b9 --- /dev/null +++ b/devel/cfr/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2018/04/04 16:07:21 pho Exp $ +bin/cfr +lib/java/cfr/cfr_0_125.jar diff --git a/devel/cfr/distinfo b/devel/cfr/distinfo new file mode 100644 index 000000000000..ae0c32e16c25 --- /dev/null +++ b/devel/cfr/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2018/04/04 16:07:21 pho Exp $ + +SHA1 (cfr_0_125.jar) = 25bef77dfac40ef69e5395ea4e721788e532d219 +RMD160 (cfr_0_125.jar) = 6658ffa2401123a6d02d1ffc3ec4c5b4c3c81ad7 +SHA512 (cfr_0_125.jar) = e00203568f3a09b69d77b559753d8d714b413291d81f2a7acfdad0dddd254da62813e4008ed81574d2a47549757228317d593529d3b785b7c6c4c1da66182be0 +Size (cfr_0_125.jar) = 1565730 bytes