# $Id: Portfile,v 1.3 2006/04/17 20:54:54 gwright Exp $

PortSystem 1.0
name		HaXml
version		1.13
revision	1
categories	devel
maintainers	gwright@opendarwin.org
platforms	darwin

description	XML utilities for haskell
long_description	\
		HaXml is a collection of utilities for parsing,		\
		filtering, transforming, and generating XML documents	\
		using Haskell. Its basic facilities include:		\
									\
		    * a parser for XML,					\
		    * a separate error-correcting parser for HTML,	\
		    * an XML validator,					\
		    * pretty-printers for XML and HTML.

homepage	http://www.cs.york.ac.uk/fp/${name}
master_sites	http://www.haskell.org/${name}/

checksums	md5 9801b55ea599ed426d8034b156afa304

depends_build	port:ghc

post-patch	{ cd ${worksrcpath}
		  file delete src/Text/PrettyPrint/HughesPJ.hs
		  file delete src/Text/PrettyPrint
		}

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

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

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


 
