# -*- 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 77936 2011-04-17 19:21:52Z devans@macports.org $

PortSystem 1.0

name            telepathy-farsight
version         0.0.17
description     The ${name} component of Telepathy - a Flexible Communications Framework
long_description \
                The ${name} component of Telepathy - a Flexible Communications Framework. \
                The Telepathy project is building a unified framework for many \
                different kinds of real-time communications. It uses the D-Bus \
                messaging system to provide a simple interface for client applications, \
                allowing them to quickly take advantage of Telepathy's benefits.
maintainers     devans openmaintainer
categories      comms
platforms       darwin
homepage        http://telepathy.freedesktop.org/wiki/
master_sites    http://telepathy.freedesktop.org/releases/${name}/

checksums       md5     f98377802d38333924f6f1a955a2d42a \
                sha1    774c086a5d84a0efb27b369373c2ccfa6f31a2b9 \
                rmd160  d1d1c62cc63a1aba069ce7127b325371ca1db3d8

depends_build   port:pkgconfig \
                port:gtk-doc

depends_lib     port:telepathy-glib \
                port:farsight2

patchfiles      patch-python-pytpfarsightmodule.c.diff \
                patch-configure.diff

post-patch      {
                    reinplace "s|__MP_PYTHON_PREFIX__|${frameworks_dir}/Python.framework/Versions/2.6|" ${worksrcpath}/configure
                }

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

configure.args  --disable-python \
                --disable-silent-rules

variant python description {Enable building of Python bindings} {
                configure.args-delete       --disable-python
                depends_lib-append          port:py26-gst-python
                set python_pkg_config_path  ${frameworks_dir}/Python.framework/Versions/2.6/lib/pkgconfig
                configure.pkg_config_path   ${python_pkg_config_path}
                build.env-append            PKG_CONFIG_PATH=${python_pkg_config_path}
}

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
