# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 55663 2009-08-16 15:22:57Z mnick@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                Vidalia
version             0.1.15
categories          security net aqua
maintainers         mnick openmaintainer
description         Vidalia is a controller GUI for the Tor software
long_description    Vidalia is a cross-platform controller GUI for the Tor software, \
                    built using the Qt framework. Vidalia runs on most platforms \
                    supported by Qt 4.2 or later

platforms           darwin

homepage            https://www.torproject.org/vidalia/
master_sites        ${homepage}/dist/
distname            vidalia-${version}

checksums           md5     005afad126dc6142d7748ec185d9fafe \
                    sha1    36d81c063f001db4509a4ad5e3eab1fb849f0562 \
                    rmd160  82ea9736176128b6fbffde8b3bac7bfbce41f8eb

depends_lib-append  port:tor port:qt4-mac

set qmake_path      ${prefix}/bin/qmake

configure.args  \
        -DQT_LIBRARY_DIR=${frameworks_dir} \
        -DQT_QMAKE_EXECUTABLE=${qmake_path}-mac

destroot {
    file copy ${worksrcpath}/src/vidalia/Vidalia.app ${destroot}${applications_dir}/Vidalia.app
}

variant x11 description {build with qt4-x11} {
    depends_lib-delete port:qt4-mac
    configure.args-delete -DQT_QMAKE_EXECUTABLE=${qmake_path}-mac
    
    depends_lib-append port:qt4-x11
    configure.args-append -DQT_QMAKE_EXECUTABLE=${qmake_path}-x11
}

livecheck.check 	regexm
livecheck.url 		${homepage}
livecheck.regex 	stable release is:\n<a\nhref=\"https://trac.vidalia-project.net/milestone/Vidalia%20(\[\\d\.\]+)\">
