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

name                py-triangle
github.setup        drufat triangle 20230923 v
github.tarball_from archive
revision            0

categories-append   science math
# See https://github.com/macports/macports-ports/pull/45, the triangle source
# code shipped with py-triangle has a non-free license.
license             LGPL-3 Noncommercial Restrictive
maintainers         {fusion.gat.com:smithsp @smithsp} openmaintainer

description         Python binding to the triangle library
long_description    {*}${description}. See documentation at: https://rufat.be/triangle

python.versions     312

if {${subport} ne ${name}} {
    fetch.type      git

    post-fetch {
        system -W ${worksrcpath} "git submodule update --init --recursive"
    }

    depends_lib-append  port:triangle \
                        port:py${python.version}-numpy

    test.run        yes
}
