# -*- 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                uftp3
version             3.7.2
revision            2
categories          net
platforms           darwin
license             GPL-3+
maintainers         nomaintainer

description         Encrypted UDP based FTP with multicast
long_description    UFTP is an encrypted multicast file transfer \
                    program, designed to securely, reliably, and \
                    efficiently transfer files to multiple receivers \
                    simultaneously. This is useful for distributing \
                    large files to a large number of receivers, and is \
                    especially useful for data distribution over \
                    a satellite link (with two way communication), where \
                    the inherent delay makes any TCP based communication \
                    highly inefficient. The multicast encryption scheme \
                    is based on TLS with extensions to allow multiple \
                    receivers to share a common key. UFTP also has the \
                    capability to communicate over disjoint networks \
                    separated by one or more firewalls (NAT traversal) \
                    and without full end-to-end multicast capability \
                    (multicast tunneling) through the use of a UFTP \
                    proxy server. These proxies also provide scalability \
                    by aggregating responses from a group of receivers.
homepage            http://uftp-multicast.sourceforge.net

master_sites        sourceforge:project/uftp-multicast/source-zip
use_zip             yes
distname            uftp_src-${version}
checksums           rmd160  75b8ad5db73d865dd708ece55a355a055c74e4ac \
                    sha256  e70f4c6f28ae126b96025c927549e414d1698bdd2880f59a852a4a437d56c4a6

patchfiles          patch-makefile.diff

use_configure       no
variant universal {}

build.type          gnu
build.args          CC=${configure.cc} \
                    OPTIONS='[get_canonical_archflags]' \
                    NO_ENCRYPTION=1

destroot.destdir    DESTDIR=${destroot}${prefix}

variant ssl description {compile with encryption support} {
    depends_lib-append  path:lib/libssl.dylib:openssl
    build.args-replace  NO_ENCRYPTION=1 OPENSSL=${prefix}
}
default_variants    +ssl