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

github.setup        ntop n2n 3.1.1
revision            0
checksums           rmd160  c39890517dcf02bf6e1eeacf78a68cfe39767e9b \
                    sha256  311f89d147558ae4dfb0d8f8698f5429c05a3e19a9d25cb8c85bd73d02aff834 \
                    size    498277

categories          net
maintainers         nomaintainer
license             GPL-3+

description         a layer 2 p2p vpn
long_description    n2n is a layer-two peer-to-peer virtual private network \
                    (VPN) which allows users to exploit features typical of \
                    P2P applications at network instead of application level.

homepage            https://www.ntop.org/n2n/
github.tarball_from archive

openssl.branch      1.1

depends_lib-append  port:zstd

depends_run-append  port:tuntaposx

patchfiles-append   patch-man-prefix.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/CMakeLists.txt
}

configure.args-append \
                    -DN2N_OPTION_USE_OPENSSL=ON \
                    -DN2N_OPTION_USE_ZSTD=ON

destroot.args       PREFIX="${prefix}"
