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

github.setup        farrokhi dnsdiag 2.6.0 v
revision            0
license             BSD-2
categories          net
maintainers         {mps @Schamschula} openmaintainer
description         A set of tools to perform basic audits on your DNS requests and \
                    responses to make sure your DNS is working as you expect.
long_description    {*}${description}
supported_archs     noarch
platforms           {darwin any}
homepage            https://dnsdiag.org

checksums           rmd160  5344b3654fe3bb8d7e284ca0585da1bff50472ef \
                    sha256  8e30d08758dc9043b023afed88f54679c93995955c6cb75f3e857ed8935c96a8 \
                    size    19216

variant python38 conflicts python39 python310 python311 python312 description {Use Python 3.8} {}
variant python39 conflicts python38 python310 python311 python312 description {Use Python 3.9} {}
variant python310 conflicts python38 python39 python311 python312 description {Use Python 3.10} {}
variant python311 conflicts python38 python39 python310 python312 description {Use Python 3.11} {}
variant python312 conflicts  python39 python39 python310 python311 description {Use Python 3.12} {}

if {![variant_isset python38] && ![variant_isset python39]
        && ![variant_isset python310] && ![variant_isset python311]} {
    default_variants +python312
}

foreach pv {312 311 310 39 38} {
    if {[variant_isset python${pv}]} {
        python.default_version ${pv}
        break
    }
}

depends_build-append \
                    port:py${python.version}-setuptools

depends_lib-append  port:py${python.version}-dnspython \
                    port:py${python.version}-cymruwhois \
                    port:py${python.version}-requests \
                    port:py${python.version}-requests-toolbelt
