# -*- 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                yafc
version             1.3.4
revision            1
categories          net
platforms           darwin
maintainers         nomaintainer

description         yafc is yet another ftp client
long_description    yafc is yet another ftp client featuring cached directory \
                    listings, extensive tab completion, aliases, colored ls \
                    (i.e. ls --color, uses \$LS_COLORS like GNU ls), automatic \
                    reconnect on timed out connections, recursive \
                    get/put/fxp/ls/rm, nohup mode transfers, multiple \
                    connections open simultaneously, tagging (queueing), very \
                    configurable, autologin and bookmarks, automagically \
                    enters nohup-mode when SIGHUP received (in get and put), \
                    redirection to local command or file, proxy support, \
                    Kerberos support (version 4 and 5, heimdal, kth-krb or \
                    MIT), SSH2 support (sftp).

homepage            http://www.yafc-ftp.com/
master_sites        ${homepage}upload/
use_xz              yes

checksums           rmd160  9fc9fb929ec36af1c43431cf7aad78684703573b \
                    sha256  e628b13d2c5a621242ca7710753678bbf36787d4211dc578f56da8e1117790eb

depends_lib         port:readline \
                    port:kerberos5 \
                    path:lib/libssl.dylib:openssl

patchfiles          patch-lib-collsyms.h.diff

configure.args      --with-openssl=${prefix} \
                    --with-readline=${prefix} \
                    --with-krb5=${prefix}

configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include

variant heimdal description {Use Heimdal for Kerberos 5 network authentication, not MIT variety} {
    # remove MIT style parameters
    depends_lib-delete      port:kerberos5
    configure.args-delete   --with-krb5=${prefix}
    
    # add Heimdal style parameters
    depends_lib-append      port:heimdal
    configure.args-append   --with-krb5=${prefix}/libexec/heimdal
}

livecheck.type      regex
livecheck.url       ${homepage}download
livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}