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

name                yafc
version             1.3.7
revision            2
categories          net
platforms           darwin
license             {GPL-2+ OpenSSLException}
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}downloads/
use_xz              yes

checksums           rmd160  15f9fda961154215b73226e6c5e2a0d6b5e59334 \
                    sha256  4b3ebf62423f21bdaa2449b66d15e8d0bb04215472cb63a31d473c3c3912c1e0

depends_build       port:pkgconfig

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

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}