# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 106872 2013-06-09 13:23:06Z cal@macports.org $

PortSystem          1.0
PortGroup           haskell 1.0

haskell.setup       c2hs 0.16.4 ghc no
checksums           rmd160  bc3ebe30c95828ffe8da9c0d0e4bcc1c6239c5b2 \
                    sha256  f1b15c18de884273eeab4400097a6fad8373849835e2a943d4583d9602fb1555

maintainers         nomaintainer
platforms           darwin
license             GPL-2

description         C->Haskell FFI tool that gives some cross-language type safety
long_description    \
    C->Haskell assists in the development of Haskell bindings to C libraries. \
    It extracts interface information from C header files and generates Haskell \
    code with foreign imports and marshaling. Unlike writing foreign imports by \
    hand (or using hsch2s), this ensures that C functions are imported with the \
    correct Haskell types.

depends_lib-append  port:hs-language-c-03

pre-activate {
    # deactivate hack added 2013-06-09
    if {![catch {set installed [lindex [registry_active c2hs] 0]}]} {
        # this port used to be called c2hs
        registry_deactivate_composite c2hs "" [list ports_nodepcheck 1]
    }
}
