# -*- 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.1
PortGroup           github 1.0

github.setup        csete gpredict 2.5.1 v
github.tarball_from releases
distfiles           ${github.project}-${github.version}.tar.bz2

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/

checksums           rmd160  438bb5f0ab4b854c2d5ae8bde0c4061e5f6ce5a3 \
                    sha256  c26ff5f9bfe9468bd48426dac4782f860c208960b0551feba3e38e364fbcd797 \
                    size    4646547

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
