# $Id: Portfile,v 1.3 2005/11/27 13:26:19 gwright Exp $

PortSystem 1.0
name		haskell-mode.el
version		2.1
revision	1
categories	lang editors
maintainers	gwright@opendarwin.org
platforms	darwin

description	An emacs major mode for editing haskell programs.
long_description	\
		Haskell-mode is a major Emacs mode for editing		\
		Haskell source code. It provides syntax highlighting	\
		and automatic indentation and comes with inf-haskell	\
		which allows interaction with an inferior Haskell	\
		interactive loop such as the one of Hugs  or GHCi.

distname	haskell-mode-${version}

homepage	//http://www-perso.iro.umontreal.ca/~monnier/elisp/
master_sites	${homepage}

checksums	md5 df6c6d62777c2ea6cdd5455a0010e7e2

depends_lib	port:emacs
depends_run	port:ghc

worksrcdir	${distname}

post-patch	{ reinplace s|ghci-program-path|${prefix}/bin/ghci|g ${worksrcpath}/inf-haskell.el }

variant devel	{ depends_lib-delete port:emacs
		  depends_lib-append port:emacs-devel
		}

use_configure	no
build		{}
destroot	{ file mkdir ${destroot}${prefix}/share/emacs/site-lisp
		  file copy  ${workpath}/${worksrcdir}	\
			     ${destroot}${prefix}/share/emacs/site-lisp
		}

post-activate	{ ui_msg "To use this, put the following into your ~/.emacs:"
		  ui_msg "(load \"${prefix}/share/emacs/site-lisp/${distname}/haskell-site-file\")"
		  ui_msg "(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)"
		  ui_msg "(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)"
		  ui_msg "(add-hook 'haskell-mode-hook 'font-lock-mode)"
		  ui_msg "(add-hook 'haskell-mode-hook 'imenu-add-menubar-index)"
		  ui_msg " "
}
