# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           gobject_introspection 1.0
PortGroup           yelp 1.0

name                gnome-weather
version             3.26.0
revision            2
license             GPL-2+
set branch          [join [lrange [split ${version} .] 0 1] .]
description         A small application that allows you to monitor the current weather \
                    conditions for your city, or anywhere in the world
long_description    {*}${description}
maintainers         {devans @dbevans} openmaintainer
categories          gnome
platforms           any
supported_archs     noarch
homepage            https://wiki.gnome.org/Apps/Weather
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  2bb047e5146b24df5977bff0af77b91676132fd5 \
                    sha256  965cc0d1b4d4e53c06d494db96f0b124d232af5c0e731ca900edd10f77a74c78 \
                    size    5362056

depends_build       port:pkgconfig \
                    port:intltool \
                    port:appstream-glib \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:desktop-file-utils \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    path:lib/pkgconfig/gjs-1.0.pc:gjs \
                    port:geoclue2 \
                    port:gnome-desktop \
                    port:libgweather

depends_run         port:adwaita-icon-theme

gobject_introspection yes

# reconfigure using upstream autogen.sh for intltool 0.51 compatibility

post-patch {
    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
}

configure.cmd       ./autogen.sh

configure.args      --disable-schemas-compile \
                    --disable-silent-rules

post-activate {
   system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
   system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
   system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}

livecheck.type      gnome
