# $Id$

PortSystem 1.0

name                hugs98
version             plus-Sep2006
revision            2
categories          lang
maintainers         mww
platforms           darwin
license             BSD
description         The HUGS Haskell Interpreter
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/2006-09/

checksums           md5     e03e0ad79750d037237c47ebe33fa20e \
                    sha1    1464a80c715bc5f786ea5a4e4257b2ff0dc7e1e9 \
                    rmd160  4a7e744360a29fbf94f5ac86ea559e80f12205a5
patchfiles          patch-configure.ac.diff

depends_lib         port:libedit port:xorg-libX11

if {${os.platform} eq "darwin" && ${os.major} >= 10} {
    # This fixes the 'Undefined symbols: "_environ"' error
    patchfiles-append patch-packages-base-include-HsBase.h.diff
    # This fixes the 'Undefined symbols: "renameFile_17' and 'readdir_40' errors
    patchfiles-append patch-libraries-tools-make-bootlib.diff
}

# This project's build system fails
compiler.blacklist  *clang*

use_autoconf        yes

livecheck.type      none
#livecheck.type      regex
#livecheck.url       ${master_sites}
#livecheck.regex     hugs98-\(plus-\[A-Za-z\]+200\[6-9\]\)\.tar.gz