# -*- 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 107705 2013-07-04 14:42:28Z ryandesign@macports.org $

PortSystem 1.0

name            telepathy-glib
version         0.20.3
license         LGPL-2.1+
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       rmd160  b1678388dc86c714b7e3c148107b4069f5fffc34 \
                sha256  c4ff03d7c60cb5da3b33eaafe598c51c6cb7fdac7b275353b04591f4badc69af

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

depends_lib     port:dbus-glib

patchfiles      patch-configure.diff

use_parallel_build no

configure.args  --enable-introspection=no

variant vala description {Enable GObject introspection and Vala bindings} {
    depends_build-append    port:vala
    depends_lib-append      port:gobject-introspection
    configure.args-delete   --enable-introspection=no
    configure.args-append   --enable-introspection=yes \
                            --enable-vala-bindings
    
    # gobject-introspection uses g-ir-scanner, which uses $CC from env
    build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
}

variant python25 conflicts python26 python27 description {Build using Python 2.5} {
    configure.python          ${prefix}/bin/python2.5
    depends_build-append      port:python25
}

variant python26 conflicts python25 python27 description {Build using Python 2.6} {
    configure.python          ${prefix}/bin/python2.6
    depends_build-append      port:python26
}

variant python27 conflicts python25 python26 description {Build using Python 2.7} {
    configure.python          ${prefix}/bin/python2.7
    depends_build-append      port:python27
}

if {![variant_isset python25] && ![variant_isset python26]} {
    default_variants +python27
}

# port folks requires +vala

default_variants +vala

# The rules enabled by gobject-introspection require GNU make 3.81+
platform darwin 8 {
    depends_build-append    port:gmake
    build.cmd               ${prefix}/bin/gmake
}

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}
