# $Id: Portfile 53744 2009-07-13 06:07:45Z gwright@macports.org $

PortSystem 1.0
name		happy
version		1.18.4
categories	devel
maintainers	gwright
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://haskell.org/happy/
master_sites	http://hackage.haskell.org/packages/archive/${name}/${version}/

checksums	md5     614e3ef9623dbeefc4c8ca699912efb4 \
		sha1    86c6a61ed8b3909c476c27343f41cb12971d52bd \
		rmd160  846d90e2962c6053acae03ace90de3656ce271b5

depends_build	port:ghc

configure       {
                  system "cd ${worksrcpath} && runhaskell Setup configure --ghc --prefix=${prefix}"
                }

build           {
                  system "cd ${worksrcpath} && runhaskell Setup build -v"
                }

destroot        {
                  system "cd ${worksrcpath} && runhaskell Setup copy --copy-prefix=${destroot}${prefix}"
                }

