# $Id: Portfile 64772 2010-03-15 17:27:19Z gwright@macports.org $

PortSystem 1.0
name		hs-alex
set canonicalname	alex
version		2.3.2
revision	1
categories	devel haskell
maintainers	gwright
platforms	darwin
description	A Lexical Analyzer Generator for Haskell
long_description	\
		Alex is a tool for generating lexical analysers		\
		in Haskell, given a description of the tokens to be	\
		recognised in the form of regular expressions.		\
		It is similar to the tools lex or flex for C/C++.       

homepage	http://www.haskell.org/${canonicalname}/
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}
distname	${canonicalname}-${version}

checksums	md5     4ec089744917129d7354f56c901e2c76 \
		sha1    fe6b23f894d3e0c029a8e3e6f26a8cc106ff1d1e \
		rmd160  864616a2d2406da475af8c7473743e2ed45ae244

depends_build	port:ghc

patchfiles	patch-alex.cabal.diff

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

livecheck.type  regex
livecheck.regex "version (.+) released"
