# -*- 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

PortSystem          1.0
PortGroup xcode     1.0

name                cotvnc
conflicts           cotvnc-devel
version             2.2b2
revision            1
categories-append   vnc
maintainers         nomaintainer
license             GPL-2

description         Chicken is a VNC client for Mac OS X
long_description    Chicken 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 to interact \
                    with a remote computer as though it is right next to \
                    you.
homepage            https://sourceforge.net/projects/chicken/

fetch.type          svn
svn.url             https://svn.code.sf.net/p/chicken/code/trunk
svn.revision        797

depends_build-append \
                    bin:iconv:libiconv

depends_lib-append \
                    lib:libz.1:zlib \
                    port:xorg-xorgproto

worksrcdir          trunk/cotvnc

# Patch to search in Macports directory for libraries and headers
patchfiles          patch-project.pbxproj.diff

post-patch {
    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Chicken.xcodeproj/project.pbxproj
}

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
        }
    }
}

subport cotvnc-devel {
    conflicts       cotvnc

    version         2016-01-27
    svn.revision    837
}
