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

name                py-kiwisolver
version             1.4.9
revision            0

categories-append   math
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         Kiwi is an efficient C++ implementation of the Cassowary constraint solving algorithm.
long_description    Kiwi is an implementation of the algorithm based on the\
                    seminal Cassowary paper. It is not a refactoring of the\
                    original C++ solver. Kiwi has been designed from the ground\
                    up to be lightweight and fast. Kiwi ranges from 10x to 500x\
                    faster than the original Cassowary solver with typical use\
                    cases gaining a 40x improvement. Memory savings are\
                    consistently > 5x.

checksums           rmd160  974a72ff9a53c78af39847a6863ff6d011f48799 \
                    sha256  c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d \
                    size    97564

homepage            https://github.com/nucleic/kiwi

python.versions     27 39 310 311 312 313 314

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version     1.1.0
        revision    0
        checksums   rmd160  c048a5a4c5c843b4b6dd9a3a7aff361e6f5969be \
                    sha256  53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75 \
                    size    30847

        depends_build-append \
                    port:py${python.version}-setuptools
    } else {
        compiler.cxx_standard   2011

        depends_build-append \
                    port:py${python.version}-cppy \
                    port:py${python.version}-setuptools_scm
    }

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst ${destroot}${docdir}
        if {${python.version} != 27} {
            xinstall -m 0644 -W ${worksrcpath} LICENSE ${destroot}${docdir}
        }
    }

    test.run        yes
}
