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

name                getdns
version             1.7.3
revision            1

categories          devel
maintainers         {l2dy @l2dy} openmaintainer
license             BSD

description         A modern asynchronous DNS API

long_description    getdns is a modern asynchronous DNS API. It implements DNS \
                    entry points from a design developed and vetted by \
                    application developers, in an API specification. The open \
                    source C implementation of getdns is developed and \
                    maintained in collaboration by NLnet Labs, Sinodun and No \
                    Mountain Software.

homepage            https://getdnsapi.net

master_sites        ${homepage}/dist/

checksums           rmd160  9f526ba64162308ee963b206e36540101bbe9441 \
                    sha256  f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c \
                    size    703262

depends_build-append        path:bin/pkg-config:pkgconfig

depends_lib                 path:lib/libssl.dylib:openssl \
                            port:libevent \
                            port:libidn2 \
                            path:lib/pkgconfig/libuv.pc:libuv

# cc1: error: unrecognized command line option "-Wpedantic"
if {[string match *gcc-4.* ${configure.compiler}]} {
    patchfiles-append       patch-xcode-gcc.diff
}

configure.args-append       -DBUILD_TESTING=OFF \
                            -DENABLE_STUB_ONLY=ON \
                            -DUSE_LIBIDN2=ON \
                            -DUSE_LIBEVENT2=ON

livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)[quotemeta ${extract.suffix}]
