# -*- 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 118250 2014-03-27 09:19:29Z devans@macports.org $

PortSystem      1.0

name            telepathy-glib
version         0.24.0
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  5a3b29218072898f971b11115b322415480915ae \
                sha256  ae0002134991217f42e503c43dea7817853afc18863b913744d51ffa029818cf

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 python26 conflicts python27 description {Build using Python 2.6} {
    configure.python          ${prefix}/bin/python2.6
    depends_build-append      port:python26
}

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

if {![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-8\]\[02468\](\\.\[0-9\]+)*)${extract.suffix}
