# -*- 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-nmrglue
version             0.12
revision            0

categories-append   science
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         A module for working with NMR data in Python
long_description    nmrglue is a module for working with NMR data in Python. \
                    When used with the Numpy, Scipy, and matplotlib packages \
                    nmrglue provides a robust interpreted environment for processing, \
                    analysing, and inspecting NMR data.

homepage            https://nmrglue.com

checksums           rmd160  5798efbc90240c2749d26754e9ac092dd2f29a7e \
                    sha256  446ef5f81c90ee15adab6e5d6e9b7a64872eca468076c151fda997eea759e07c \
                    size    223132

python.versions     310 311 312 313 314

conflicts           ${subport}-devel

foreach pver [list {*}${python.versions} ""] {
    subport py${pver}-nmrglue-devel {
        PortGroup       github 1.0

        github.setup    jjhelmus nmrglue 5e2f095705bb90c6dc2f6a916abdfda82bac8e04
        github.tarball_from archive
        version         20260921-[string range ${github.version} 0 7]
        revision        0
        checksums       rmd160  a14ae3ee9ba2a51242afff6803affaaca37ddeff \
                        sha256  2fb04914ae6233b7dd6f8fd9b344846799092e9349ef0f2b2aefc8e7f7ce4ebf \
                        size    14939852

        conflicts       py${pver}-nmrglue

        if {${pver} ne ""} {
            livecheck.type  none
        } else {
            PortGroup   stub 1.0
        }
    }
}

if {${subport} ni [list ${name} ${name}-devel]} {
    depends_lib-append \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy

    test.run        yes
    test.args       --pyargs nmrglue

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