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

name                py-fdsnwsscripts
version             2025.286
revision            0
categories-append   science
platforms           {darwin any}
supported_archs     noarch
license             GPL-3
maintainers         {petr @petrrr} openmaintainer

description         Scripts for working with (EIDA) FDSN web services
long_description    {*}${description}

homepage            https://geofon.gfz-potsdam.de/software/fdsnws_scripts

checksums           rmd160  bd9d7f35352c77e952f509ae43dfde27573c06e1 \
                    sha256  1f3b4ab533c381d2795cc90a760e370ef460fdb68512e66fff04460d5bab0f47 \
                    size    68015

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_lib-append      port:py${python.version}-dateutil \
                            port:py${python.version}-requests \
                            port:py${python.version}-sphinx_rtd_theme

    depends_run-append  port:${python.rootname}_select

    select.group    ${python.rootname}
    select.file     ${filespath}/${python.rootname}-${python.version}

    notes-append "
To make this Python ${python.branch} version of this port the default \
(i.e, use its script by their default names, e.g. fdsnws_fetch, etc.),
run:

sudo port select --set ${select.group} [file tail ${select.file}]
    "
}
