# -*- 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 86618 2011-10-29 22:32:08Z devans@macports.org $

PortSystem 1.0

name            farsight2
version         0.0.31
revision        1
license         LGPL-2.1+
description     Farsight - Audio/Video Communications Framework
long_description \
                The Farsight project is an effort to create a framework \
                to deal with all known audio/video conferencing protocols. \
                On one side it offers a generic API that makes it possible \
                to write plugins for different streaming protocols, on the \
                other side it offers an API for clients to use those plugins.
maintainers     devans openmaintainer
categories      comms
platforms       darwin
homepage        http://www.freedesktop.org/wiki/Software/Farstream/
master_sites    http://freedesktop.org/software/farstream/releases/${name}/

checksums       sha1    7471a1c8207c821b22e4f79c2a159f41140331de \
                rmd160  ce4a5de114c7a0abf83c78e488bd0da623bf7ea9

depends_build   port:pkgconfig \
                port:gtk-doc

depends_lib     port:libnice

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


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

#
# upgrade old python variant to python27 which is now a default variant
#

if {[variant_isset python] || ![variant_isset python26]}  {
    default_variants +python27
}

variant python26 conflicts python27  description {Enable Python 2.6 bindings} {
                configure.args-delete       --disable-python
                depends_lib-append          port:py26-gst-python
                configure.python            ${prefix}/bin/python2.6
                set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.6
                set python_pkg_config_path  ${python_prefix}/lib/pkgconfig
                configure.args-append       --with-pkg-config-path=${python_pkg_config_path}
                build.env-append            PKG_CONFIG_PATH=${python_pkg_config_path} \
                                            PATH=${python_prefix}/bin:$env(PATH)
}

variant python27 conflicts python26  description {Enable Python 2.7 bindings} {
                configure.args-delete       --disable-python
                depends_lib-append          port:py27-gst-python
                configure.python            ${prefix}/bin/python2.7
                set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.7
                set python_pkg_config_path  ${python_prefix}/lib/pkgconfig
                configure.args-append       --with-pkg-config-path=${python_pkg_config_path}
                build.env-append            PKG_CONFIG_PATH=${python_pkg_config_path} \
                                            PATH=${python_prefix}/bin:$env(PATH)
}

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