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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Astro-satpass 0.133 ../../authors/id/W/WY/WYANT
revision            0
maintainers         nomaintainer
license             {Artistic-1 GPL}
description         Astro-satpass - Predict satellite passes over an observer.
long_description    This package contains classes needed to predict \
                    satellite visibility, and an optional demonstration application \
                    (satpass) that makes use of these classes.

homepage            https://metacpan.org/dist/${perl5.module}

platforms           {darwin any}
supported_archs     noarch

checksums           rmd160  1792f4f4620c1d4b7f3a34e3b5a3107fd042247c \
                    sha256  db7ec976f88eab4992c8da36b188da19080a86f1bf6321e7a147c882369b3be3 \
                    size    539147

variant script description {Install the deprecated satpass script and optional dependencies} {}

if {${perl5.major} != ""} {
    depends_lib-append \
                    port:p${perl5.major}-clone \
                    port:p${perl5.major}-datetime \
                    port:p${perl5.major}-datetime-timezone \
                    port:p${perl5.major}-json \
                    port:p${perl5.major}-time-local

    if {[variant_isset script]} {
#       requires Makefile.PL -y to install deprecated satpass script
        configure.pre_args-append -y
#       optional dependencies for satpass script
        depends_lib-append \
                    port:p${perl5.major}-astro-simbad-client \
                    port:p${perl5.major}-astro-spacetrack \
                    port:p${perl5.major}-date-manip \
                    port:p${perl5.major}-geo-coder-osm \
                    port:p${perl5.major}-geo-webservice-elevation-usgs
    }

    perl5.use_module_build
}
