# -*- 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                rdesktop
version             1.8.3
revision            1
categories          net
license             GPL-3+
maintainers         nomaintainer
description         Windows Terminal Server Client
long_description    \
    rdesktop is an RDP client to access Microsoft Terminal Server based services.\
    \
    The variant called w2k-license-hack is a backported patch from an rdesktop \
    1.1 patchset which was not integrated into the latest version -- it will \
    announce the client as Windows 2000 machine causing the Terminal Server to \
    provide a license for free. Please argue over this with your own \
    conscience.

platforms           darwin freebsd

homepage            http://rdesktop.sourceforge.net/
master_sites        sourceforge

universal_variant   no

depends_build       port:pkgconfig
depends_lib         port:xorg-libX11 \
                    port:xorg-libXrandr \
                    path:lib/libssl.dylib:openssl \
                    port:libiconv \
                    port:libao \
                    port:libsamplerate

configure.args      --mandir=${prefix}/share/man \
                    --with-sound=libao \
                    --with-openssl=${prefix} \
                    --with-libiconv-prefix=${prefix} \
                    --disable-credssp \
                    --disable-smartcard

build.target        rdesktop

checksums \
    rmd160  c278b54be54f434d79e0f07a9cdc2cca62286103 \
    sha256  88b20156b34eff5f1b453f7c724e0a3ff9370a599e69c01dc2bf0b5e650eece4

variant w2k_license_hack description {will announce the client as Windows 2000 machine} {
    patchfiles patch-licence.c
}

variant smartcard description {enables smartcard forwarding} {
#    configure.args-append --enable-smartcard
     error "--> Smartcard support is currently broken. <--"
}