Portfile

# $Id: Portfile 22478 2007-03-02 05:16:40Z pipping@macports.org $

PortSystem 1.0
name haskell-mode.el
version 2.3
categories lang editors
maintainers nomaintainer@macports.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 83b966f84e00f593f490680c5302021d

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