# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 107986 2013-07-10 04:01:17Z devans@macports.org $

PortSystem      1.0

name            vino
version         2.32.2
license         GPL-2
set branch      [join [lrange [split ${version} .] 0 1] .]
homepage        http://www.gnome.org
description     Vino is a VNC server for the current GNOME user
long_description    ${description}
categories      gnome
platforms       darwin
maintainers     devans openmaintainer
master_sites    gnome:sources/${name}/${branch}/

use_bzip2       yes

checksums       rmd160  1de0923ef33a73dd6a9c4e761291728c552708e8 \
                sha256  1260b1f7b647caff69db441dc13c992f843d9d75b9386ec07b724a5e30c6d4fa

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

depends_lib     port:desktop-file-utils \
                port:gtk2 \
                port:gconf \
                port:dbus-glib \
                port:libsoup \
                port:libnotify \
                port:libgnome-keyring \
                port:pangox-compat \
                port:gnutls \
                port:libgcrypt \
                port:xorg-libXdamage \
                port:xorg-libXext \
                port:xorg-libXtst \
                port:xorg-libsm \
                port:xorg-libice \
                port:jpeg \
                port:zlib \
                port:libunique

configure.args  --x-includes=${prefix}/include \
                --x-libraries=${prefix}/lib \
                --disable-schemas-install \
                --disable-network-manager \
                --disable-avahi \
                --disable-telepathy \
                --enable-http-server=no \
                --enable-gnome-keyring \
                --enable-ipv6 \
                --enable-libunique

variant avahi description {Enable mDNS support using avahi} {
    depends_lib-append      port:avahi
    configure.args-replace  --disable-avahi --enable-avahi
}

variant telepathy description {Enable telepathy support} {
    depends_lib-append      port:telepathy-glib
    configure.args-replace  --disable-telepathy --enable-telepathy
}

variant debug description {Enable debugging messages} {
    configure.args-append   --enable-debug
}

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  gnome
