# -*- 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 92237 2012-04-22 09:24:27Z jeremyhu@macports.org $

PortSystem 1.0

name                libgnomekbd
version             2.30.2
revision            1
set branch          [join [lrange [split ${version} .] 0 1] .]
description         Libgnomekbd is something new.
long_description    Libgnomekbd is something new.
maintainers         devans openmaintainer
categories          gnome
license             LGPL-2+
platforms           darwin
homepage            http://www.gnome.org/

master_sites        gnome:sources/${name}/${branch}/

checksums           md5     2fe73ebfd40801655e0aa3f85cefa873 \
                    sha1    474acc0ae87ac8eccadbf48b60fad885f9e271f7 \
                    rmd160  fc1d96bf48283cbe0379a019d2aa3307f77e4f13

depends_build       port:intltool \
                    port:pkgconfig
depends_lib         port:gconf \
                    port:libxklavier

use_bzip2           yes

patchfiles glib-2.32.patch

post-patch {
    reinplace "s|test capplet|capplet|" ${worksrcpath}/Makefile.in
}

use_autoreconf  yes
autoreconf.args -fvi
configure.args --disable-schemas-install

variant no_x11 description {Disable X11 support} {
        configure.args-append --without-x
}

if {![variant_isset no_x11]} {
        configure.args-append --x-includes=${prefix}/include \
                              --x-libraries=${prefix}/lib
}

post-activate {
        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-(\d+(?:\.\d+)*)}
