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

github.setup        polm fugashi 1.1.0 v
revision            0
name                py-${github.project}
categories-append   textproc
fetch.type          git

license             MIT
maintainers         nomaintainer
platforms           darwin

description         A Cython MeCab wrapper for fast, pythonic Japanese tokenization.

long_description    fugashi is a Cython wrapper for MeCab, a Japanese \
                    tokenizer and morphological analysis tool.

python.versions     37 38 39

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools_scm_git_archive \
                    port:py${python.version}-wheel

    depends_lib-append \
                    path:lib/libmecab.dylib:mecab-base \
                    port:py${python.version}-cython \
                    port:py${python.version}-setuptools

    depends_test-append \
                    port:py${python.version}-pytest

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target     ${github.project}/tests

    livecheck.type      none
}
