# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 69817 2010-07-17 03:02:41Z michaelld@macports.org $

PortSystem         1.0

name               yafc
version            1.1.1
revision           2
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 \
  (ie, 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://yafc.sourceforge.net/
master_sites       sourceforge:yafc
use_bzip2          yes

checksums          md5 832d074183a36ee15b47553ed5962fce \
                   sha1 d88132e1b389d74533f9eaa94f1a6d02787c03c8 \
                   rmd160 1a1af7f618e9fada90b23390e64ec0ee4c8ed370

# yafc -requires- kerberos for compiling on OSX; by default, choose
# the MIT version but allow for Heimdal variant.  openssl is required
# for the deprecated function "des_read_pw_string".

patchfiles                   \
    patch-src__input.c.diff  \
    patch-src__syshdr.h.diff \
    patch-lib__gssapi.c-krb-mit.diff

depends_lib        \
    port:readline  \
    port:kerberos5 \
    port:openssl

# for _ossl_old_des_read_pw_string
configure.ldflags -lcrypto

configure.args                     \
    --mandir=${prefix}/share/man   \
    --infodir=${prefix}/share/info \
    --with-readline=${prefix}/lib  \
    --without-krb4                 \
    --with-krb5=${prefix}

variant heimdal description \
    {Use Heimdal for Kerberos 5 network authentication, not MIT variety} \
{
    # remove MIT style parameters
    configure.args-delete  --with-krb5=${prefix}
    depends_lib-delete     port:kerberos5
    patchfiles-delete patch-lib__gssapi.c-krb-mit.diff

    # add Heimdal style parameters
    depends_lib-append     port:heimdal
    configure.args-append  --with-krb5=${prefix}/libexec/heimdal
    patchfiles-append patch-lib__gssapi.c-krb-heimdal.diff
}

livecheck.regex    {(\d+(?:\.\d+)*) released}
