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

PortSystem                  1.0

name                        LibVNCServer
version                     0.9.9
revision                    7
categories                  devel
platforms                   darwin
maintainers                 ryandesign openmaintainer
license                     GPL-2+

description                 library for writing VNC servers and clients

long_description            ${name} is a library to make it easier to write \
                            programs that use the RFB (Remote Frame Buffer) \
                            protocol to implement a VNC server or client.

homepage                    http://libvncserver.sourceforge.net/
master_sites                sourceforge:project/libvncserver/libvncserver/${version}

patch.pre_args              -p1
# Do not link against GTK+
patchfiles                  patch-configure.ac.diff
use_autoconf                yes
# Don't segfault when listenSock/listen6Sock == -1
# http://sourceforge.net/tracker/index.php?func=detail&aid=3527807&group_id=32584&atid=405860
patchfiles-append           patch-libvncserver-sockets.c.diff

checksums                   rmd160  e62e0903124abb85746bcac6498214fe09c3b4d7 \
                            sha256  cf060d3525c2fb92be2fa18bbc697fb355592b52484e60745f3bcac5c3f803f9

depends_lib                 port:gnutls \
                            port:jpeg \
                            port:libpng \
                            port:zlib

configure.f77               no

configure.args              --disable-silent-rules \
                            --without-x \
                            --without-sdl-config

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        ChangeLog \
        NEWS \
        README \
        TODO \
        ${docdir}
}