# -*- 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 fbac8a1dba039155875bdc6bac0678550f5146d3
        github.tarball_from archive
        version         20260816-[string range ${github.version} 0 7]
        revision        0
        checksums       rmd160  fdc4699c8db77a8af0a6bd7a0d8cc9591808defa \
                        sha256  1aa35680abc76b0fd616eccf8f9f93d2096dc4ffeb66bca68c05510caafc3340 \
                        size    14938854

        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}
    }
}
