# -*- 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 118896 2014-04-13 23:49:06Z devans@macports.org $

PortSystem      1.0

name            dconf
version         0.20.0
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     devans openmaintainer
categories      gnome
platforms       darwin
license         GPL-2+
description     dconf is a simple key/value storage system that is heavily optimised for \
                reading.

long_description \
                ${description} \
                This makes it an ideal system for storing user preferences \
                (which are read 1000s of times for each time the user changes one).

homepage        https://wiki.gnome.org/Projects/dconf
master_sites    gnome:sources/${name}/${branch}/

use_xz          yes

checksums       rmd160  eae9e6cbe6c41e76225933239672dd794c168b80 \
                sha256  22c046a247d05ea65ad181e3aef4009c898a5531f76c0181f8ec0dfef83447d9

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

depends_lib     port:desktop-file-utils \
                port:gtk3 \
                port:dbus \
                port:libxml2 \
                port:vala

patchfiles      patch-fix-lib-names-Makefile.am.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  --enable-editor \
                --disable-schemas-compile \
                --disable-silent-rules

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
    system "${prefix}/bin/gio-querymodules ${prefix}/lib/gio/modules"
}

livecheck.type  gnome
