# -*- 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

PortSystem          1.0

name                gauche-c-wrapper
version             0.6.1
revision            2
categories          lang
maintainers         nomaintainer
license             MIT

description         c-wrapper is a FFI (Foreign Function Interface) for Gauche.

long_description    c-wrapper is a FFI (Foreign Function Interface) for Gauche.

homepage            http://www.koguro.net/prog/c-wrapper/
master_sites        ${homepage}

distname            c-wrapper-$version
extract.suffix      .tgz

checksums           rmd160  b90db4d45fa887e8157425e6f3125c18dc6cfa97 \
                    sha256  d0f4037c29c149f385c12d7aa07deb5db7549029657fb60ee286f5942329d92b \
                    size    843981

depends_build       port:boehmgc \
                    port:texi2html

depends_lib         port:gauche

patchfiles          dynamic_lookup-11.patch \
                    libffi.patch

# The author stated on 2012-07-18 that c-wrapper is still not compatible with
# ObjectiveC 2.0 (i.e. on Leopard and up).
if {${os.platform} eq "darwin" && ${os.major} > 8} {
    configure.args-append --disable-objc
}

# error: ffi.h: No such file or directory
use_parallel_build  no

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 {*}[glob ${worksrcpath}/doc/*.html] ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.regex     c-wrapper-(\[0-9.\]+)${extract.suffix}
