# -*- 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           legacysupport 1.1

# strnlen
legacysupport.newest_darwin_requires_legacy 10

github.setup        phaag nfdump 1.7.5 v
categories          net
maintainers         nomaintainer
license             BSD

description         collect and process netflow data
long_description    Part of the NfSen project, the nfdump tools are \
                    command-line programs to collect and process netflow data.

checksums           rmd160  354190f52be2df751103caaef2ec3ecf6e1b473a \
                    sha256  f7d1df04fe66a173613a13d1b632062150cd63d08ed9299cc2560f519ed33e2e \
                    size    835261
github.tarball_from archive

depends_build       port:autoconf \
                    port:automake \
                    port:libtool \
                    path:bin/pkg-config:pkgconfig

depends_lib         port:rrdtool

configure.cmd       ./autogen.sh && ./configure

# nfconf.c: error: 'option_t' has no member named 'valInt64'
compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2

configure.args      --enable-sflow \
                    --enable-nfprofile \
                    --enable-nsel \
                    --with-rrdpath=${prefix}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} BSD-license.txt ChangeLog README \
        ${destroot}${prefix}/share/doc/${name}
}

variant flowtools description {Enable support for flow-tools} {
    depends_lib-append  port:flow-tools
    configure.args-append \
                    --enable-ftconv \
                    --with-ftpath=${prefix}
}
