# $Id: Portfile,v 1.3 2005/03/23 14:50:28 gwright Exp $

PortSystem 1.0
name		alex
version		2.0.1
categories	devel
maintainers	gwright@opendarwin.org
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/alex/
master_sites	http://www.haskell.org/alex/dist/

distfiles	${name}-${version}-src${extract.suffix}

checksums	md5 edb62560e29c8de23913c65c52adbf19

depends_build	bin:ghc:ghc

pre-configure	{ set cfg [open "${worksrcpath}/mk/build.mk" w]
		  puts $cfg "#"
		  puts $cfg "# Local configuration overrides for DarwinPorts"
		  puts $cfg "#"
		  puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L${prefix}/lib"
		  close $cfg
		}

configure.args	--prefix=${destroot}/${prefix}

post-destroot	{ reinplace s|${destroot}||g ${destroot}/${prefix}/bin/${name} }

