# $Id: Portfile 70420 2010-08-08 23:55:43Z gwright@macports.org $

PortSystem 1.0

name		hs-happy
set canonicalname	happy
version		1.18.5
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     9e77b67df7b6a4d7273383cc890f39e8 \
		sha1    f1f352650b49c4411330f866f7b59f5126d45d43 \
		rmd160  735e42bcb897bf7b1407df7b191f7d0c2ef49114

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}"
                }

