# -*- 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
PortGroup           github 1.0

github.setup        wolfSSL wolfssh 1.5.0 v -stable
revision            0
categories          net
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             GPL-3

description         wolfSSH is a small, fast, portable SSH implementation
long_description    {*}${description}, including support for SCP and SFTP.

homepage            https://www.wolfssl.com

checksums           rmd160  740a113c54e2b1971f0d830f7bba727befca1089 \
                    sha256  5d9be7a577c65b725f1f30ebf2197d7caedd2c9c0012aa113e78a3396104838f \
                    size    921819
github.tarball_from archive

use_autoreconf      yes

depends_lib-append  port:wolfssl

# stdatomic.h
compiler.c_standard 2011

# TODO: upstream switched away from dispatch in:
# https://github.com/wolfSSL/wolfssh/commit/5be43b641f855eb406db56353c5d91e3d9cf05c5
# It is unclear if that is actually desirable, since POSIX semaphores are poorly supported in macOS.
# See also: https://github.com/wolfSSL/wolfssh/issues/893

configure.args-append \
                    --enable-scp \
                    --enable-sftp \
                    --enable-shared \
                    --enable-sshclient \
                    --enable-sshd \
                    --enable-term \
                    --with-wolfssl=${prefix}
