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

# As of 3.17.90 requires C++11 to build when using gtkmm3 > 3.16.0
compiler.cxx_standard 2011

name                gnome-system-monitor
version             3.24.0
license             GPL-2+
set branch          [join [lrange [split ${version} .] 0 1] .]
description         A system monitor.
long_description    A nicer, simpler, easier to use replacement to gtop. \
                    It uses libgtop for the process monitoring and \
                    gtktreeview for the viewing.
maintainers         {devans @dbevans} openmaintainer
categories          gnome
platforms           darwin
homepage            https://wiki.gnome.org/Apps/SystemMonitor
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  5a17f11e35d56315f4cf43ba1f84d06dd9340973 \
                    sha256  c32b45062411aaef06681e5e28fd2c24ea8b362168bae83992944ec8e02063f4

depends_build       port:pkgconfig \
                    port:intltool \
                    port:itstool \
                    port:yelp-tools \
                    port:gsed \
                    port:gnome-common \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:desktop-file-utils \
                    port:gtkmm3 \
                    port:libgtop \
                    path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
                    port:libxml2

depends_run         port:adwaita-icon-theme

patchfiles          patch-create-gresource-as-bundle.diff

# 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-silent-rules \
                    --enable-compile-warnings=no \
                    --disable-systemd \
                    --disable-schemas-compile

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}

livecheck.type      gnome
