# $Id: Portfile,v 1.5 2005/11/28 21:01:06 gwright Exp $

PortSystem 1.0
name		hat
version		2.04
revision	3
categories	devel
maintainers	gwright@opendarwin.org
platforms	darwin

description	hat is the Haskell Tracer
long_description	\
		Hat is a source-level tracer for Haskell 98, the	\
		standard lazy functional programming language. Hat is	\
		a tool that gives the user access to otherwise		\
		invisible information about a computation.		\
									\
		Hat is portable between compilers: it works with both	\
		ghc and nhc98. It also supports various language	\
		extensions, such as the FFI, multi-parameter type	\
		classes, functional dependencies, and hierarchical	\
		module namespaces.

homepage	http://www.cs.york.ac.uk/fp/hat/
master_sites	${homepage}

checksums	md5 11515d25ed8c760bfe1238fad36ad18f

patchfiles	patch-confhc-hat	\
		patch-hat.cabal

depends_build	bin:ghc:ghc \
		bin:hmake:hmake

depends_lib	lib:libglib.1:glib1

depends_run	bin:xterm:XFree86

#user_notes	Despite being compatible with both nhc98 and ghc, the \
#		port depends on the more featureful ghc.
#
#		If the message "resize: command not found" appears,
#		you need to add /usr/X11R6/bin to your PATH.
#

configure.args	--mandir=${prefix}/share/man/man1

post-destroot	{ file delete ${destroot}/${prefix}/bin/harch }

post-activate	{ set ghcversion [ exec ghc --version | sed "s|^.*version ||" ]
		  system "ranlib ${prefix}/lib/ghc-${ghcversion}/libHShat.a"

		  reinplace "s|${destroot}${prefix}|${prefix}|g" ${prefix}/lib/ghc-${ghcversion}/package.conf

		  ui_msg "hat requires that you add /usr/X11R6/bin to your PATH"
		}


# When the post-uninstall target is written, this should be executed:
#post-uninstall	{ system "ghc-pkg unregister ${name}-${version}" }

