[RFC] New Port: Eclipse Java Compiler, java/eclipse-ecj

Greg Lewis glewis at eyesbeyond.com
Mon Mar 19 15:58:00 UTC 2012


G'day Jason,

On Sun, Mar 18, 2012 at 11:02:25AM -0700, Jason Helfman wrote:
> Hello All,
> 
> I was looking through this pr:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/151923
> 
> And saw the final idea was to just build icedtea. I found one of the build
> requirements to be the the Eclipse Java Compiler, but didn't find this in
> the tree.
> 
> I've used the ecj.jar for sometime now compiling outside of the Eclipse
> environment, and thought it would be a good idea to get this into the tree,
> if it isn't already there.
> 
> I didn't see the compiler in the tree, and thought it could help in getting
> a final solution together for not just this pr, but I believe it would move
> along some other efforts, as well.
> 
> If this does nothing at all, I would hope it just provides the bare minimum
> compiler.
> 
> Attached is the shell archive of Eclipse Java Compiler. If there are no
> objections I was going to put this into the tree this week.

I'd like to see ECJ in the ports tree.

One question on the port.  It looks like it only installs ecj.jar.
Wouldn't it also be useful to install a script to run it?  I can certainly
manually type 'java -jar /usr/local/share/java/classes/ecj.jar -classpath
rt.jar Foo.java', but it would be simpler if there was an ecj script that
maybe just let me do 'ecj Foo.java'.  Is there a good reason not to write
such a script?

> # This is a shell archive.  Save it in a file, remove anything before
> # this line, and then unpack it by entering "sh file".  Note, it may
> # create directories; files and directories will be owned by you and
> # have default permissions.
> #
> # This archive contains:
> #
> #	eclipse-ecj
> #	eclipse-ecj/distinfo
> #	eclipse-ecj/pkg-descr
> #	eclipse-ecj/Makefile
> #
> echo c - eclipse-ecj
> mkdir -p eclipse-ecj > /dev/null 2>&1
> echo x - eclipse-ecj/distinfo
> sed 's/^X//' >eclipse-ecj/distinfo << '27ed093420439a3d65d596e0d66970e8'
> XSHA256 (ecjsrc-3.7.2.jar) = 755d871c3066f15cfaf5ea84075527eb97c92f9685058c3a326057e797f69e6b
> XSIZE (ecjsrc-3.7.2.jar) = 1366333
> 27ed093420439a3d65d596e0d66970e8
> echo x - eclipse-ecj/pkg-descr
> sed 's/^X//' >eclipse-ecj/pkg-descr << '5e63e2bc465f52087a5812903c8d3088'
> XAn incremental Java compiler. Implemented as an Eclipse builder, it is based on
> Xtechnology evolved from VisualAge for Java compiler. In particular, it allows to
> Xrun and debug code which still contains unresolved errors.
> X
> XWWW: http://www.eclipse.org/
> 5e63e2bc465f52087a5812903c8d3088
> echo x - eclipse-ecj/Makefile
> sed 's/^X//' >eclipse-ecj/Makefile << '49fe9533f9d01977b527412915f89826'
> X# New ports collection:		eclipse-ecj
> X# Date created:			17 March 2012
> X# Whom:				Jason Helfman
> X#
> X# $FreeBSD$
> X
> XPORTNAME=	ecj
> XPORTVERSION=	3.7.2
> XCATEGORIES=	java devel
> XMASTER_SITES=	ECLIPSE
> XMASTER_SITE_SUBDIR=	R-${PORTVERSION}-${DROPDATE}
> XPKGNAMEPREFIX=	eclipse-
> XDISTNAME=	ecjsrc-${PORTVERSION}
> XEXTRACT_SUFX=	.jar
> X
> XMAINTAINER=	jgh at FreeBSD.org
> XCOMMENT=	Eclipse Java Compiler
> X
> XLICENSE=	EPL
> X
> XEXTRACT_CMD=	${TAR}
> XEXTRACT_BEFORE_ARGS=	xf
> XEXTRACT_AFTER_ARGS=	-C ${WRKDIR}
> X
> XUSE_ANT=	yes
> XUSE_JAVA=	yes
> XBUILD_WRKSRC=	${WRKDIR}
> X
> XDROPDATE=	201202080800
> XPLIST_FILES=	%%JAVAJARDIR%%/${PORTNAME}.jar
> X
> Xdo-install:
> X	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.jar ${JAVAJARDIR}/${PORTNAME}.jar
> X
> X.include <bsd.port.mk>
> 49fe9533f9d01977b527412915f89826
> exit
> 




-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the freebsd-java mailing list