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

github.setup        libssh2 libssh2 1.11.0 libssh2-
github.tarball_from releases
revision            0

categories          devel net
maintainers         {wohner.eu:normen @Gminfly} openmaintainer

homepage            https://www.libssh2.org/

description         libssh2 is a library implementing the SSH2 protocol

long_description    libssh2 is a library implementing the SSH2 protocol as \
                    defined by Internet Drafts: SECSH-TRANS(22), \
                    SECSH-USERAUTH(25), SECSH-CONNECTION(23), SECSH-ARCH(20), \
                    SECSH-FILEXFER(06), SECSH-DHGEX(04), and SECSH-NUMBERS(10).

license             BSD

checksums           rmd160  de0e85ddd91d1962decfe1e3efefa0ce6d3e9200 \
                    sha256  3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461 \
                    size    1053562

if {[string match *gcc-4.* ${configure.compiler}]} {
# Remove errant pragmas inside functions not supported on older gcc versions.
    patchfiles-append patch-libssh2-pragmas-older-gcc.diff
}

depends_lib-append  port:zlib

configure.args      ac_cv_prog_AWK=/usr/bin/awk

configure.checks.implicit_function_declaration.whitelist-append strchr

variant debug description {Enable debug mode including tracing support} {
    configure.args-append \
        --enable-debug
}
