# -*- 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.7 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  7c8a6a4aabf7be09b937fa7e2510dcbe8174eef6 \
                    sha256  1d58b0fc4f13173cde6f64277a8b2e36e84cf0f2a27d8b8d0e48b76780b1236c \
                    size    4727308

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
autoreconf.args     --install --verbose --force

use_configure       yes

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

depends_lib         port:curl \
                    port:gtk3 \
                    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
