# $Id: Portfile,v 1.4 2005/06/23 17:51:43 gwright Exp $

PortSystem 1.0
name		hugs98-devel
version		Mar2005-patched
categories	lang
maintainers	gwright@opendarwin.org
platforms	darwin
description	The HUGS Haskell Interpreter, development snapshot.
long_description	\
		Hugs 98 is a functional programming system based \
		on Haskell 98, the de facto standard for non-strict \
		functional programming languages. Hugs 98 provides an \
		almost complete implementation of Haskell 98.

homepage	http://www.haskell.org/hugs/
master_sites	http://cvs.haskell.org/Hugs/downloads/Mar2005/

distfiles	hugs98-${version}${extract.suffix}

checksums	md5 f72c378251f0d488fff9871583d26843

depends_lib	lib:libreadline.5:readline

configure.env	LDFLAGS="-L${prefix}/lib"
configure.args	--libdir=${prefix}/lib/${name}	\
		--mandir=${prefix}/share/man

worksrcdir	hugs98-${version}

platform darwin 6 { ui_msg "Hugs no longer builds on Jaguar (10.2.x). Sorry"
		    exit 0
		}

post-destroot	{ cd ${destroot}${prefix}/bin
		  file rename cpphs-hugs  cpphs-hugs-devel
		  file rename ffihugs     ffihugs-devel
		  file rename hsc2hs-hugs hsc2hs-hugs-devel
		  file rename hugs        hugs-devel
		  file rename runhugs     runhugs-devel

		  cd ${destroot}${prefix}/share/man/man1
		  file rename hugs.1      hugs-devel.1
		  reinplace "s|hugs|hugs-devel|g" hugs-devel.1
}

