# -*- 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 90099 2012-02-21 16:29:31Z macsforever2000@macports.org $

PortSystem      1.0
PortGroup xcode 1.0

name            cotvnc
version         2.0b4
categories-append vnc
maintainers     nomaintainer
license         GPL-2

description     Chicken of the VNC is a VNC client for Mac OS X
long_description    Chicken of the VNC is a Cocoa based VNC client for \
                    Mac OS X. A VNC client allows one to display and \
                    interact with a remote computer screen. In other \
                    words, you can use Chicken of the VNC to interact \
                    with a remote computer as though it is right next to \
                    you.
homepage        http://sourceforge.net/projects/cotvnc/
master_sites    sourceforge:project/cotvnc/cotvnc/Chicken%20of%20the%20VNC%20${version}
distname        ${name}-[strsed ${version} {g/[.]//}]-source
extract.suffix  .tgz
checksums       md5 9383068b0a381857551404c86bd05dc1 \
                sha1 1a749854f314d62d1e54b9ae1ce5ac13bb20f1e8 \
                rmd160 dce9aafff048545e2612c6795c0ee118f3bc0da8
depends_lib     lib:libz.1:zlib

worksrcdir      ${name}
xcode.destroot.settings SKIP_INSTALL=NO

# Fix non-root destroot.
# (this is a workaround for bug rdar://5071108).
pre-destroot {
    fs-traverse dir ${worksrcpath}/build {
        if {[file isdirectory ${dir}]} {
            file attributes ${dir} -permissions u+w
        }
    }
}
post-destroot {
    fs-traverse dir ${destroot} {
        if {[file isdirectory ${dir}]} {
            file attributes ${dir} -permissions u+w
        }
    }
}

livecheck.regex "/cotvnc/Chicken\ of\ the\ VNC\ (\[a-zA-Z0-9.\]+)/${name}-(\[a-zA-Z0-9\]+)-source${extract.suffix}"
livecheck.type  regex
livecheck.url   http://sourceforge.net/api/file/index/project-id/64347/mtime/desc/limit/20/rss
