# -*- 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 118296 2014-03-29 14:30:30Z cal@macports.org $

PortSystem 1.0

name                rdesktop
version             1.7.1
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 \
                    port:openssl \
                    port:libiconv \
                    port:libao \
                    port:libsamplerate

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

build.target        rdesktop

checksums           md5 c4b39115951c4a6d74f511c99b18fcf9 \
                    sha1 c718d0f49948a964c7ef8424b8ade73ecce3aba3   \
                    rmd160 d9f39cb75ab13d7be846f61ea40276cddcbcb550

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
}
