# $Id: Portfile 65849 2010-04-02 03:49:11Z ryandesign@macports.org $

PortSystem 1.0

name		hs-platform-alex
set canonicalname	alex
version		2.3.1
categories	devel haskell
maintainers	gwright
platforms	darwin
description	A Lexical Analyzer Generator for Haskell (platform version)
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     a8c26af3370388297cee4b8c767d72d9 \
                sha1    0dbd9d34849602f9b59d30122b27727d6f79fc4f \
                rmd160  cee02283325638fc9929ca6ae40c153b626d4b69

depends_build	port:ghc

universal_variant	no

patchfiles	patch-alex.cabal.diff

# Since alex is an application I can't use the conveniences of the
# haskell PortGroup.  Just need to do everything by hand:

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

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

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

# Haskell Platform components should not be livecheck'ed.
livecheck.type	none

