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

name                dnsdiag
version             2.8.1
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}
homepage            https://dnsdiag.org

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  332cff41cf09c889610e2b3e49a9a925a38eaa10 \
                    sha256  823739c712d4126648037b1ad583a3005dfdaff6a37495f7f2c0bfe92301c247 \
                    size    24774

variant python39 conflicts python310 python311 python312 python313 description {Use Python 3.9} {}
variant python310 conflicts python39 python311 python312 python313 description {Use Python 3.10} {}
variant python311 conflicts python39 python310 python312 python313 description {Use Python 3.11} {}
variant python312 conflicts python39 python310 python311 python313 description {Use Python 3.12} {}
variant python313 conflicts python39 python310 python311 python312 description {Use Python 3.13} {}

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

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

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