# $Id: Portfile 70421 2010-08-09 00:04:47Z gwright@macports.org $

PortSystem 1.0
name		hs-alex
set canonicalname	alex
version		2.3.3
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     bc5d90c932470ee8a64e6cda162ca05e \
		sha1    6b70d5a42559d654993e9b4218c7ac68aa1335ec \
		rmd160  c703459cb39731592f0a6e8d6fe887111a6bd611

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

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