# $Id: Portfile,v 1.1 2004/04/10 12:53:58 mww Exp $

PortSystem 1.0

name		javacc
version		3.2
categories	java lang devel
platforms	darwin
maintainers	mww@opendarwin.org
description	Java Compiler Compiler, a parser generator for use with Java
long_description	Java Compiler Compiler (JavaCC) is the most popular \
			parser generator for use with Java applications. A \
			parser generator is a tool that reads a grammar \
			specification and converts it to a Java program that \
			can recognize matches to the grammar. In addition to \
			the parser generator itself, JavaCC provides other \
			standard capabilities related to parser generation \
			such as tree building (via a tool called JJTree \
			included with JavaCC), actions, debugging, etc

homepage	https://javacc.dev.java.net
master_sites	${homepage}/files/documents/17/3616/
checksums	md5 bc0fe5d325e24f2e7c95e5c962813354

depends_lib	bin:java:kaffe
depends_build	bin:ant:apache-ant

configure	{
	reinplace "s|`dirname \$0`/lib|${prefix}/share/java|g" \
		${worksrcpath}/bin/javacc ${worksrcpath}/bin/jjtree \
		${worksrcpath}/bin/jjdoc
}

build.cmd	ant
build.target	jar

destroot	{
	xinstall -d -m 755 ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 ${worksrcpath}/bin/lib/javacc.jar \
		${destroot}${prefix}/share/java/
	xinstall -m 755 -W ${worksrcpath}/bin javacc jjdoc jjtree \
		${destroot}${prefix}/bin
	xinstall -m 644 -W ${worksrcpath} LICENSE README \
		${destroot}${prefix}/share/doc/${name}
}
