# -*- 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        aflc editdistance 0.6.2 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
name                py-${github.project}

categories-append   textproc
license             MIT
maintainers         nomaintainer

description         Fast implementation of the edit distance (Levenshtein distance).
long_description    {*}${description} This library simply implements \
                    Levenshtein distance with C++ and Cython. The \
                    algorithm used in this library is proposed by \
                    Heikki Hyyrö, \"Explaining and extending the \
                    bit-parallel approximate string matching algorithm \
                    of Myers\", (2001).

checksums           rmd160  0c0c73f897aac2ef4c44e0c9f7af0ad040b40f3c \
                    sha256  46e831b628fc702ba522b2c02185ddbd76e8376a112954b451ee343d52da4d87 \
                    size    7405

python.versions     39 310 311 312

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

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst LICENSE \
            ${destroot}${docdir}
    }

    test.run        yes
}
