# -*- 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
PortGroup           github 1.0
PortGroup           waf 1.0

github.setup        jubatus jubatus_core 1.1.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

categories          devel math textproc
maintainers         nomaintainer

description         Jubatus algorithm component

long_description    {*}${description}

homepage            http://jubat.us/
license             {LGPL-2.1 MPL-2}

checksums           rmd160  fc67340fd09fae95b2fa687080e35b027e4d8e64 \
                    sha256  6d945e92b494f88155a25518d208ead5cc835f352164a5111de39b51f0971843 \
                    size    1301339

depends_build-append port:pkgconfig

depends_lib         port:msgpack0 \
                    port:oniguruma6

platform darwin {
    if {${os.major} <= 10} {
        known_fail  yes
        pre-fetch {
            ui_error "$name does not build on Snow Leopard or earlier."
            error "unsupported platform"
        }
    }
}

# shipped waf does not recognize --nocache
configure.post_args-delete \
                    --nocache

post-destroot {
    # install an additional document.
    set doc_dir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${doc_dir}
    xinstall -m 644 -W ${worksrcpath} \
        CONTRIBUTING.md \
        ChangeLog.rst \
        LICENSE \
        LICENSE.MPL2 \
        README.rst \
        ${doc_dir}
}
