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

name                    nsping
version                 0.8
revision                4
categories              net
license                 GPL-1
maintainers             nomaintainer
description             DNS ping
long_description        Nsping uses DNS queries to monitor reachability \
                        and operation of nameservers, as well as the latency \
                        of DNS queries. It does this by sending random recursive \
                        DNS queries to the nameserver (avoiding the effects of \
                        DNS caching) and measuring the amount of time between \
                        the sending of the query and the receipt of the response packet.

platforms               darwin
master_sites            http://distfiles.master.finkmirrors.net/

checksums               md5 64785a50eb065a9b28ee33ec8c1ccab2

patchfiles              patch-dprintf.diff

use_configure           no

variant universal {}

build.args              CPPFLAGS="-DBIND_8_COMPAT" \
                        CC="${configure.cc}" \
                        CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
                        LDFLAGS="[get_canonical_archflags ld]"
build.target
destroot                { xinstall -m 755 -W ${worksrcpath} nsping ${destroot}${prefix}/bin
                          xinstall -m 644 -c -W ${worksrcpath} nsping.8 ${destroot}${prefix}/share/man/man8 }

if {${os.platform} eq "darwin" && ${os.major} >= 10} {
    build.args-append LIBS=-lresolv
}