# $Id: Portfile 64930 2010-03-17 22:54:25Z gwright@macports.org $

PortSystem 1.0

name		hs-happy
set canonicalname	happy
version		1.18.4
revision	1
categories	devel haskell
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/${canonicalname}/
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}/
distname	${canonicalname}-${version}

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

depends_build	port:ghc

configure       {
                  system "cd ${worksrcpath} && runhaskell Setup configure -v --ghc --with-gcc=${configure.cc} --prefix=${prefix} --program-suffix=\"-${version}\""
                }

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

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

