# $Id: Portfile 32765 2008-01-13 10:31:44Z ryandesign@macports.org $

PortSystem 1.0
name		missingh
version		0.16.3
categories	devel
maintainers	nomaintainer
platforms	darwin
description	Haskell utility functions
long_description	\
		MissingH is a library of Haskell utility functions,	\
		including ones for working with lists, logging, I/O	\
		and strings.

homepage	http://quux.org/devel/${name}
master_sites	${homepage}

distfiles	${name}_${version}${extract.suffix}

checksums	md5 75202f45dbf928d7c112a79ab5028d33

depends_build	port:ghc

worksrcdir	${name}

pre-configure	{ system "cd ${worksrcpath} && make setup"
		}

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

build		{ system "cd ${worksrcpath} && ./setup build"
		}

test.run	yes
test		{ system "cd ${worksrcpath} && make test-ghc6"
		}

destroot	{ system "cd ${worksrcpath} && ./setup copy --copy-prefix=${destroot}${prefix}"
                  system "cd ${worksrcpath} && ./Setup register   --gen-script"
                  system "cd ${worksrcpath} && ./Setup unregister --gen-script"

                  file mkdir ${destroot}${prefix}/libexec/${name}
                  file copy ${worksrcpath}/register.sh \
                            ${destroot}${prefix}/libexec/${name}
                  file copy ${worksrcpath}/unregister.sh \
                            ${destroot}${prefix}/libexec/${name}
                }

post-activate   { system "${prefix}/libexec/${name}/register.sh" }

#pre-deactivate { system "${prefix}/libexec/${name}/unregister.sh" }

