# $Id: Portfile 86157 2011-10-20 06:26:41Z ryandesign@macports.org $

PortSystem 1.0

name		byaccj
version		1.15
revision	1
categories	devel java
platforms	darwin
maintainers	mww
license		public-domain
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://byaccj.sourceforge.net/
master_sites	sourceforge
distname	byaccj${version}_src
checksums	sha1 eeabe2a3a3ca9cc56a777fa54238ab093fc525c7
patchfiles	patch-src-Makefile.diff

use_configure	no

variant universal {}

worksrcdir	byaccj${version}/src
build.args	CC="${configure.cc} [get_canonical_archflags]" \
		CFLAGS="${configure.cflags}" \
		LDFLAGS="${configure.ldflags}"

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/
	file copy ${worksrcpath}/../docs ${destroot}${prefix}/share/doc/${name}
	xinstall -W ${worksrcpath} new_features no_warranty \
		${destroot}${prefix}/share/doc/${name}/
	xinstall -m 755 ${worksrcpath}/yacc ${destroot}${prefix}/bin/byaccj
	xinstall -m 644 ${worksrcpath}/yacc.1 ${destroot}${prefix}/share/man/man1/byaccj.1
}

