# -*- 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        robertdavidgraham masscan 1.3.2
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          net security
maintainers         nomaintainer
license             GPL-3

description         Mass IP port scanner

long_description    This is the fastest Internet port scanner. It can \
                    scan the entire Internet in under 6 minutes, \
                    transmitting 10 million packets per second. \
                    It produces results similar to nmap, the most \
                    famous port scanner. Internally, it operates \
                    more like scanrand, unicornscan, and ZMap, \
                    using asynchronous transmission. The major \
                    difference is that it is faster than these \
                    other scanners. In addition, it is more \
                    flexible, allowing arbitrary address ranges \
                    and port ranges.

# Remove these lines when updating to the next version.
master_sites        https://github.com/robertdavidgraham/masscan/archive/
distname            ${version}
worksrcdir          ${name}-${version}
# end of lines to remove

checksums           rmd160  1173b20a382ee8daeaea574fcac200d1266ea06e \
                    sha256  0363e82c07e6ceee68a2da48acd0b2807391ead9a396cf9c70b53a2a901e3d5f \
                    size    463449

depends_lib         port:libpcap

use_configure       no

build.args          CC=${configure.cc} \
                    CFLAGS="${configure.cflags} [get_canonical_archflags cc]"

destroot.env        PREFIX=${prefix}
post-destroot {
    xinstall -m 644 ${worksrcpath}/doc/masscan.8 ${destroot}${prefix}/share/man/man8/
}

variant universal {}

test.run            yes
test.target         regress
