# $Id: Portfile 40948 2008-10-18 20:05:04Z ryandesign@macports.org $

PortSystem 1.0

name		hs-dlist
set canonicalname	dlist
version		0.4.1
categories	devel haskell
maintainers	nomaintainer
platforms	darwin

description	Differences lists: a list-like type supporting O(1) append
long_description	\
		Differences lists: a list-like type supporting O(1)	\
		append. This is particularly useful for efficient	\
		logging and pretty printing, (e.g. with the Writer	\
		monad), where list append quickly becomes too expensive.

homepage	http://code.haskell.org/~dons/code/${canonicalname}
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}
distname	${canonicalname}-${version}

checksums	md5     c1d0bcebbb62a60f56a42cfdc1b32758		\
		sha1    5002191d9e122cf4d861bf046cc7494ebc8751e7	\
		rmd160  0d6b0844d2e602bd432f407d21335c3f52f3c237

depends_build	port:ghc

configure       { system "cd ${worksrcpath} && runhaskell Setup configure --ghc --prefix=${prefix} --with-compiler=${prefix}/bin/ghc --enable-library-profiling"
                }

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

destroot        { system "cd ${worksrcpath} && runhaskell Setup copy --copy-prefix=${destroot}${prefix}"
	          system "cd ${worksrcpath} && runhaskell Setup register   --gen-script"
		  system "cd ${worksrcpath} && runhaskell 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" }

