# -*- 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 118363 2014-03-31 22:39:39Z devans@macports.org $

PortSystem      1.0

name            gnome-utils
version         3.2.1
revision        4
set branch      [join [lrange [split ${version} .] 0 1] .]
description     GNOME utilities
long_description \
                Utilities for the GNOME desktop.
maintainers     nomaintainer
categories      gnome
license         GPL-2+
platforms       darwin
homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

use_bzip2       yes

checksums       rmd160  7fee19ec6b200e727f83514682dd4a81a43cd36a \
                sha256  328b8e036635cec180ecf5f286a8154e321c669f37832b53eed3ec679690e0fe

depends_build   port:pkgconfig \
                port:intltool \
                port:gnome-common \
                port:gnome-doc-utils \
                port:gtk-doc

depends_lib     port:desktop-file-utils \
                port:rarian \
                port:baobab \
                port:gnome-dictionary \
                port:gnome-font-viewer \
                port:gnome-system-log \
                port:gtk3 \
                port:gsettings-desktop-schemas \
                port:gconf \
                port:libcanberra \
                port:grep \
                port:xorg-libX11 \
                port:xorg-libXext

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

patchfiles      patch-disable-baobab.diff \
                patch-disable-gnome-dictionary.diff \
                patch-disable-logview.diff \
                patch-disable-font-viewer.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 \
                --with-grep=${prefix}/bin/grep \
                --disable-zlib \
                --disable-scrollkeeper \
                --disable-schemas-install \
                --disable-schemas-compile \
                --disable-silent-rules

post-activate   {
    system "scrollkeeper-update"
    system "${prefix}/bin/gtk-update-icon-cache-3.0 -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"
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  gnome
