# -*- 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 89909 2012-02-14 22:18:02Z dports@macports.org $

PortSystem 1.0

name            dasher
version         4.11
revision        3
set branch      [join [lrange [split ${version} .] 0 1] .]
description     Zooming text entry system.
long_description \
                Dasher is a zooming predictive text entry system, designed \
                for situations where keyboard input is impractical (for \
                instance, accessibility or PDAs). It is usable with highly \
                limited amounts of physical input while still allowing high \
                rates of text entry.
maintainers     nomaintainer
categories      gnome
license         GPL-2+
platforms       darwin
homepage        http://www.gnome.org/

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

checksums       md5     55695cacecb9fa9e3259e0f2ef82ae9e \
                sha1    9acbbdbd7ad5d86bc310965c97e84b855d9be157 \
                rmd160  e820fb276d7aa50fb7ee4010e2e763e21767e074

depends_build   port:intltool \
                port:pkgconfig \
                port:gnome-doc-utils
depends_lib     port:gconf \
                port:at-spi

patchfiles      patch-configure.diff

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

platform darwin 8 {
    configure.cxxflags-append -DWITH_DARWIN=1
}

variant speech description {build with speech support} {
        configure.args-append --enable-speech
        depends_lib-append port:gnome-speech
}

variant gvfs description {build with gvfs from gio in glib} {
        configure.args-delete --without-gvfs
        depends_lib-append port:gvfs
}

post-activate {
    system "${prefix}/bin/scrollkeeper-update"
    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-(\d+(?:\.\d+)*)}
