# $Id: Portfile 53251 2009-07-01 23:04:05Z raimue@macports.org $

PortSystem 1.0

name		haddock
version		2.4.2
categories	devel
maintainers	nomaintainer
platforms	darwin
description	A Haskell Documentation Tool
long_description	\
		This is Haddock, a tool for automatically generating	\
		documentation from annotated Haskell source code.	\
		It is primarily intended for documenting libraries,	\
		but it should be useful for any kind of Haskell code.	\
									\
		Like other systems (IDoc,HDoc), Haddock lets you write	\
		documentation annotations next to the definitions of	\
		functions and types in the source code, in a syntax	\
		that is easy on the eye when writing the source code	\
		(no heavyweight mark-up). The documentation generated	\
		by Haddock is fully hyperlinked - click on a type name	\
		in a type signature to go straight to the definition,	\
		and documentation, for that type.

homepage	http://www.haskell.org/haddock/
master_sites	http://hackage.haskell.org/packages/archive/${name}/${version}

checksums	md5     c1d5238faac72727921130eb792041a2 \
		sha1    cd1de409029bcabdf79b05b4c00c7702c836c765 \
		rmd160  18317b3ffd60f2b0925d635ce1ea2ab35825860c


depends_build	port:ghc
depends_lib	port:hs-ghc-paths

pre-configure   { system "cd ${worksrcpath} && ${prefix}/bin/ghc -o Setup Setup.lhs -package Cabal"
                }

configure       { system "cd ${worksrcpath} && ./Setup configure --ghc --prefix=${prefix}"
                }

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

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

livecheck.check regex
livecheck.regex {version ([0-9.]+) released}
