# -*- 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
# $Id: Portfile 120092 2014-05-15 04:16:08Z devans@macports.org $

PortSystem      1.0

name            gnome-system-monitor
version         3.12.2
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 openmaintainer
categories      gnome
platforms       darwin
homepage        https://wiki.gnome.org/Apps/SystemMonitor
master_sites    gnome:sources/${name}/${branch}/

use_xz          yes

checksums       rmd160  c4831c7516ad46cf09244c0ade976ab3a1ccd13e \
                sha256  ba074e2157302d91d73b68e13207bf85452b84234e429b1ec9b9a7b1c70736d8

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

depends_lib     port:desktop-file-utils \
                port:gnome-icon-theme \
                port:gnome-icon-theme-symbolic \
                port:gtkmm3 \
                port:libgtop \
                port:librsvg \
                port:libwnck3 \
                port:libxml2

depends_run     port:gnome-settings-daemon \
                port:yelp

patchfiles      patch-src-procproperties.cpp.diff

# update m4/intltool.m4 and autoreconf

pre-configure {
    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
}

use_autoreconf  yes
autoreconf.args -fvi

configure.args  --disable-silent-rules \
                --enable-wnck \
                --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
