# $Id: Portfile 85522 2011-10-14 05:35:18Z jeremyhu@macports.org $

PortSystem 1.0

name            gnome-settings-daemon
version         2.30.2
revision        6
license         GPL-2 LGPL-2.1
set branch      [join [lrange [split ${version} .] 0 1] .]
description     Gnome 2 settings daemon.
long_description ${description}
maintainers     devans openmaintainer
categories      gnome
platforms       darwin
homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

checksums       md5     b945b1f542167c201a11f0ba1e1a4739 \
                sha1    75fe75eaa7d6197514c1de8b8c47c869f2bade2c \
                rmd160  a4547cdb13c2c5dc8f690cf198853129514adaab

depends_lib     port:gnome-desktop \
                port:libgnomekbd \
                port:libnotify

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

depends_run     port:xmodmap

use_bzip2 	yes

pre-configure {
    reinplace "s|-bundle|-bundle -undefined dynamic_lookup|g" ${worksrcpath}/configure
}

configure.args  --x-includes=${prefix}/include \
                --x-libraries=${prefix}/lib \
                --disable-schemas-install

post-activate    {
    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/GNOME/sources/${name}/${branch}/
livecheck.regex {LATEST-IS-([0-9\.]+)}
