# $Id: Portfile,v 1.1 2006/04/17 20:56:19 gwright Exp $

PortSystem 1.0
name		hs-NewBinary
set shortname	NewBinary
version		2005-12-11
categories	devel
maintainers	gwright@opendarwin.org
platforms	darwin

description	The New Binary library for Haskell.
long_description	\
		A module for fast binary I/O in haskell. Features	\
		bit level I/O and byte level I/O

homepage	http://www.n-heptane.com/nhlab/
master_sites	${homepage}/${shortname}
distname	${shortname}-${version}

checksums	md5 615d0e4ef004c54e132ff35b37c5580a

depends_build	port:ghc

worksrcdir	${shortname}

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

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

build		{ cd ${worksrcpath}
		  system "./Setup build"
		}

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

post-activate   { cd ${worksrcpath}
		  catch {system "./Setup unregister"}
		  system "./Setup register"
                }


 
