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

github.setup        csete gpredict 098e3768240c7f5a169930a2660a23c9f42b37d6
github.tarball_from archive
# Note version is date and approximate hour (UTC)
version             2024091715-[string range ${github.version} 0 7]
revision            1
categories          science
license             GPL-2+
maintainers         {mps @Schamschula} {ra1nb0w @ra1nb0w} openmaintainer

description         GNOME-based satellite tracking program

long_description    Gpredict is a real-time satellite tracking and orbit \
                    prediction application. It can track an unlimited number \
                    of satellites and display their position and other data \
                    in lists, tables, maps, and polar plots (radar view). \
                    Gpredict can also predict the time of future passes for \
                    a satellite, and provide you with detailed information \
                    about each pass.

homepage            http://gpredict.oz9aec.net/

# stealth update
dist_subdir         ${name}/${version}_${revision}

checksums           rmd160  4dcbc8b96028cf9a824195f85da4347717c7e70d \
                    sha256  eeab51685d52e886f24fe72078be453b35431cc952da39ccaf546c6e47963d35 \
                    size    7719540

if {![catch {set result [active_variants gtk3 quartz x11]}]} {
    if {!${result}} {
        notes "
        If you use this app with the gtk3 X11 backend you may have issues\
        with the background turning black and dialog windows crashing.

        If you have these issues the only known work-around is to switch\
        gtk3 to using the Quartz backend via the commands:

        sudo port install glib2 +quartz -x11
        sudo port install libepoxy +quartz -x11
        sudo port install gtk3 +quartz -x11

        You should probably reinstall all gtk3 applications, including\
        gpredict afterwards.
    "
    }
}

use_autoreconf      yes
use_configure       yes

depends_build-append \
                    port:gettext \
                    port:intltool \
                    port:pkgconfig

depends_lib         port:curl \
                    port:goocanvas2 \
                    path:lib/pkgconfig/librsvg-2.0.pc:librsvg

depends_run         path:lib/libhamlib.dylib:hamlib

configure.args      --disable-silent-rules

app.create          yes
app.name            Gpredict
app.executable      gpredict
app.icon            pixmaps/icons/gpredict-icon.png
app.retina          yes
