# $Id: Portfile 47042 2009-02-20 16:57:33Z gwright@macports.org $

PortSystem 1.0

name		hs-Edison
set canonicalname	EdisonCore
version		1.2.1.3
categories	devel haskell
maintainers	gwright
platforms	darwin

description	A library of purely functional data structures for Haskell
long_description	\
		Edison is a library of purely function data structures	\
		for Haskell originally written by Chris Okasaki.	\
		Conceptually, it consists of two things:		\
									\
   			1. A set of type classes defining data the	\
			   following data structure abstractions:	\
			   sequences, collections and associative	\
			   collections,					\
   			2. Multiple concrete implementations of each	\
			   of the abstractions.

homepage	http://www.cs.princeton.edu/~rdockins/edison/home/index.html
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}
distname	${canonicalname}-${version}

checksums	md5     b496de63ef077887c1e48829eefe060d		\
		sha1    6f731fdf4a2ea14eb6b67eb825096dce97cd0050	\
		rmd160  e5f2b41fe0b8b7a91f0af4f09a6e4308f8491a64

depends_lib	port:ghc	\
		port:hs-EdisonAPI

pre-configure	{ system "cd ${worksrcpath} && ghc --make -o Setup Setup.hs" }

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

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

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" }

