# $Id: Portfile,v 1.5 2005/02/20 22:32:56 gwright Exp $

PortSystem 1.0
name		happy
version		1.15
categories	devel
maintainers	gwright@opendarwin.org
platforms	darwin
description	The Parser Generator for Haskell
long_description	\
		Happy is a parser generator system for Haskell,		\
		similar to the tool `yacc' for C. Like `yacc', it	\
		takes a file containing an annotated BNF specification	\
		of a grammar and produces a Haskell module containing	\
		a parser for the grammar.				\
									\
		Happy is flexible: you can have several Happy parsers	\
		in the same program, and several entry points to a	\
		single grammar. Happy can work in conjunction with a	\
		lexical analyser supplied by the user (either		\
		hand-written or generated by another program), or it	\
		can parse a stream of characters directly (but this	\
		isn't practical in most cases).

homepage	http://www.haskell.org/happy/
master_sites	http://www.haskell.org/happy/dist/${version}/

distfiles	${name}-${version}-src${extract.suffix}

checksums	md5 02ceb122b904fa4a4290e6ea1072d59e

depends_build	bin:ghc:ghc

pre-configure	{ set cfg [open "${worksrcpath}/mk/build.mk" w]
		  puts $cfg "#"
		  puts $cfg "# Local configuration overrides for DarwinPorts"
		  puts $cfg "#"
		  puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L${prefix}/lib"
		  close $cfg
		}

configure.args  --prefix=${destroot}/${prefix}

post-destroot	{ reinplace s|${destroot}||g ${destroot}/${prefix}/bin/${name} }

