# -*- 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 77689 2011-04-09 18:28:31Z devans@macports.org $

PortSystem 1.0

name            empathy
version         2.30.3
revision        3
set branch      [join [lrange [split ${version} .] 0 1] .]
description     Empathy is an instant-messaging(chat) program for GNOME
long_description \
                Empathy is an instant-messaging(chat) program which supports text, \
                voice, video, file transfers, and inter-application communication (tubes) \
                over many different protocols(AIM, MSN, Google/Jabber, Facebook, SIP, Yahoo, etc).
maintainers     devans openmaintainer
categories      gnome
platforms       darwin
homepage        http://live.gnome.org/Empathy
master_sites    gnome:sources/${name}/${branch}/

checksums       md5     d797f30219da87d4564fb92705626cd3 \
                sha1    1a438198469f623e7051a521ef2590f0da518075 \
                rmd160  57d558c81b166b8e008ee236a258d592b3ac50a3

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

depends_lib     port:gconf \
                port:enchant \
                port:evolution-data-server \
                port:gstreamer \
                port:iso-codes \
                port:libcanberra \
                port:libchamplain \
                port:libgnome-keyring \
                port:libnotify \
                port:libunique \
                port:webkit-gtk

depends_run     port:telepathy-mission-control \
                port:telepathy-farsight \
                port:telepathy-gabble \
                port:telepathy-haze

use_bzip2       yes

patchfiles      patch-configure.diff

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

configure.python ${prefix}/bin/python2.6

#
# enable build on Tiger by disabling map
# support which indirectly depends on mesa
# see #24393.
#

platform darwin 8 {
    depends_lib-delete port:libchamplain
    configure.args-append --enable-map=no
}

#
# telepathy-haze -> pidgin is not universal
#

universal_variant no

post-activate {
    system "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+)*)}
