# -*- 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
# $Id: Portfile 119532 2014-04-29 16:21:52Z devans@macports.org $

PortSystem      1.0

name            libgtop
version         2.30.0
license         GPL-2
set branch      [join [lrange [split ${version} .] 0 1] .]

description     A library for portably obtaining information about processes

long_description \
                libgtop is a library for portably obtaining information about processes, \
                such as their PID, memory usage, etc.

maintainers     devans openmaintainer
categories      gnome
platforms       darwin
homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

use_xz          yes

checksums       rmd160  9719d56ce5cf64fb749bb50a82758689f2df662b \
                sha256  463bcbe5737b1b93f3345ee34abf601e8eb864f507c49ff1921c2737abafc1e5

depends_build   port:pkgconfig \
                port:intltool \
                port:gtk-doc

depends_lib     path:lib/pkgconfig/glib-2.0.pc:glib2 \
                port:gobject-introspection

patchfiles      patch-libgtop-sysdeps.m4.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  --x-includes=${prefix}/include \
                --x-libraries=${prefix}/lib \
                --enable-introspection

# gobject-introspection uses g-ir-scanner, which uses $CC from env
build.args-append   CC="${configure.cc} ${configure.cc_archflags}"

livecheck.type  gnome
