Wed Apr 4 16:07:21 2018 UTC ()
devel/cfr: Import version 0.125

CFR is a Java decompiler supporting modern language features.


(pho)
diff -r0 -r1.1 pkgsrc/devel/cfr/DESCR
diff -r0 -r1.1 pkgsrc/devel/cfr/Makefile
diff -r0 -r1.1 pkgsrc/devel/cfr/PLIST
diff -r0 -r1.1 pkgsrc/devel/cfr/distinfo

File Added: pkgsrc/devel/cfr/DESCR
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

File Added: pkgsrc/devel/cfr/Makefile
# $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<size>  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"

File Added: pkgsrc/devel/cfr/PLIST
@comment $NetBSD: PLIST,v 1.1 2018/04/04 16:07:21 pho Exp $
bin/cfr
lib/java/cfr/cfr_0_125.jar

File Added: pkgsrc/devel/cfr/distinfo
$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