# $Id$

PortSystem              1.0

name                    hmake
version                 3.14
revision                4
categories              devel
license                 GPL
maintainers             nomaintainer
platforms               darwin
description             A Make Tool for Haskell Programs
long_description        hmake is a compilation manager for Haskell programs.

homepage                http://www.haskell.org/hmake/
master_sites            ${homepage}

checksums               md5 7fb58d8e5c257869200d87cff19d7b15 \
                        sha1 c88e61a86053c2e2f600e534d1c323131b925e12 \
                        rmd160 b9f88e2ee4ed4bb6cc2df3d644864eb5e60c4a60

patchfiles              patch-configure.diff \
                        patch-ghc-pkg.diff

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

variant ghc conflicts nhc98 description {Build with ghc} {
    depends_build port:ghc
    depends_lib port:gmp \
                port:ncurses \
                port:readline
    configure.args-append --buildwith=ghc
}

variant nhc98 conflicts ghc description {Build with nhc98} {
    depends_build port:nhc98
    configure.args-append --buildwith=nhc98
}

if {![variant_isset nhc98]} {
    default_variants +ghc
}

post-patch {
    reinplace "s|-lreadline|-I${prefix}/include -L${prefix}/lib -lreadline|g" ${worksrcpath}/configure
}