# $Id: Portfile,v 1.2 2006/05/09 06:09:16 gwright Exp $

PortSystem 1.0
name		lhs2TeX
version		1.11
categories	print textproc
platforms	darwin
maintainers	gwright@opendarwin.org
description	Literate Haskell to LaTeX convertor
long_description	\
		lhs2TeX is a preprocessor to generate LaTeX code	\
		from literate Haskell sources.

homepage	http://www.cs.uu.nl/~andres/lhs2tex/
master_sites	${homepage}

distfiles	lhs2tex-${version}.tar.bz2
use_bzip2	yes

checksums	md5 16fb6a150bc1ab5e22c66f52f11cec54

depends_build	port:ghc	\
		port:teTeX

post-destroot	{ xinstall -d -m 755 ${destroot}${prefix}/share/${name}/doc
		  xinstall -c -m 644 ${worksrcpath}/doc/Guide2.pdf \
				     ${destroot}${prefix}/share/${name}/doc
		}

# run mktexlsr so the polytable files are found, then remind the
# user to set the LHS2TEX environment variable:

post-activate	{ system "mktexlsr"

		  ui_msg "You must set the environment variable LHS2TEX to"
		  ui_msg "${prefix}/share/lhs2tex so that the lhs2tex binary"
		  ui_msg "can find its style files."
		}

