# $Id: Portfile,v 1.6 2006/06/17 09:30:52 mww Exp $

PortSystem 1.0

name			antlr
version			2.7.6
revision		1
categories		lang java
platforms		darwin
maintainers		mww@opendarwin.org
description		antlr is ANother Tool for Language Recognition
long_description	ANTLR, ANother Tool for Language Recognition, is a \
					language tool that provides a framework for constructing \
					recognizers, compilers, and translators from grammatical \
					descriptions containing Java, C#, or C++ actions. 

homepage		http://www.antlr.org/
master_sites	${homepage}/download/
checksums		md5 17d8bf2e814f0a26631aadbbda8d7324
patchfiles		patch-configure.diff

configure.env	CLASSPATH=.
configure.pre_args	--prefix=${destroot}${prefix}
configure.args	--disable-csharp

destroot.args	versioneddir=java
post-destroot	{
	reinplace "s|antlr-2.7.3/|java/|g" ${destroot}${prefix}/bin/antlr
	reinplace "s|^prefix=.*|prefix=\"${prefix}\"|g" \
		${destroot}${prefix}/bin/antlr
}
