# -*- 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        virtualsquare vde-2 2.3.3 v
name                vde2
revision            0
categories          net
maintainers         nomaintainer
license             GPL-2 LGPL-2.1 BSD-old

description         Virtual Distributed Ethernet

long_description    VDE is an ethernet compliant virtual network that can be \
                    spawned over a set of physical computer over the Internet.

github.tarball_from archive

checksums           rmd160  257d008bd8ce5a56f1ab7086a7f69a01f639294c \
                    sha256  a7d2cc4c3d0c0ffe6aff7eb0029212f2b098313029126dcd12dc542723972379 \
                    size    234790

use_autoreconf      yes

default_variants    +pcap

configure.args      --disable-experimental \
                    --disable-tuntap \
                    --disable-pcap \
                    --disable-cryptcab

# See https://github.com/virtualsquare/vde-2/issues/6
use_parallel_build  no

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
                    COPYING \
                    COPYING.libvdeplug \
                    Changelog \
                    README \
                    doc/README.UML \
                    doc/README.VirtualBox \
                    doc/README.bochs \
                    doc/README.qemu \
                    doc/README.slirpvde \
                    doc/README.vde_over_ns \
                    doc/freebsd_tap-HOWTO \
                    doc/vde_autolink-HOWTO \
                    doc/vdeqemu-HOWTO \
                    ${docdir}
}

variant tuntap description {Enable support for TAP devices} {
    depends_lib-append      port:tuntaposx
    configure.args-replace  --disable-tuntap --enable-tuntap
}

variant pcap description {Enable support for packet capturing} {
    depends_lib-append      port:libpcap
    configure.args-replace  --disable-pcap --enable-pcap
}

variant experimental description {Enable support for experimental features} {
    configure.args-replace  --disable-experimental --enable-experimental
}
