# $Id: Portfile,v 1.5 2006/06/20 15:13:07 gwright Exp $

PortSystem 1.0
name		c2hs
version		0.14.5
categories	devel
maintainers	gwright@opendarwin.org
platforms	darwin

description	Yet Another Interface Generator for Haskell
long_description	\
		C->Haskell is an interface generator that simplifies	\
		the development of Haskell bindings to C libraries.	\
		The tool processes existing C header files that		\
		determine data layout and function signatures on the	\
		C side in conjunction with Haskell modules that specify	\
		Haskell-side type signatures and marshaling details. 

homepage	http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
master_sites	${homepage}/

checksums	md5 8e04c1dfffbd4d27776fc406f15d24e5

depends_build	port:ghc

patchfiles	patch-Setup.hs

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

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

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

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

