# $Id: Portfile,v 1.1 2003/10/30 16:53:33 mww Exp $

PortSystem 1.0

name		byaccj
version		1.1
categories	devel java
maintainers	mww@opendarwin.org
description	yacc compatible parser generator with Java extension
long_description	byacc/j is an extension to the Berkeley v1.8 yacc \
		compatible parser generator. byacc/j not only can produce \
		C/C++ source for a LALR-grammar parser, but also Java source.

homepage	http://troi.lincom-asg.com/~rjamison/byacc/
master_sites	${homepage}
distname	${name}${version}
checksums	md5 f47267af6d9dfe6914be3c08ffc7713c
platforms	darwin

use_configure	no

build.dir	${worksrcpath}/src

destroot	{ file mkdir ${destroot}${prefix}/share/doc/${name}
		system "install -m 755 ${worksrcpath}/src/yacc \
			${destroot}${prefix}/bin/yacc \
		&& install -m 644 ${worksrcpath}/README \
			${destroot}${prefix}/share/doc/${name}"
}

variant darwin {
	patchfiles	patch-defs.h.diff \
			patch-lalr.c.diff \
			patch-lr0.c.diff \
			patch-main.c.diff \
			patch-mkpar.c.diff \
			patch-output.c.diff \
			patch-reader.c.diff \
			patch-symtab.c.diff \
			patch-verbose.c.diff
}
