# -*- 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            xorg-xcb-proto
version         1.17.0
revision        0

checksums       rmd160  4220efd91ded6dae58717ebd4cdb812622924ec8 \
                sha256  2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd22562148c \
                size    151748

categories      x11 devel
license         X11
maintainers     {jeremyhu @jeremyhu} openmaintainer
description     X.org xcb-proto
homepage        https://xcb.freedesktop.org
platforms       {darwin any}
supported_archs noarch
long_description XML-XCB protocol descriptions
master_sites     xorg:individual/proto

distname        xcb-proto-${version}

use_xz          yes

configure.args  --with-python-sys-prefix

depends_run     port:libxml2

# Using depends_build instead of depends_lib for pythonXY even if there is a Python module xcbgen
# as the xcbgen module is only used to build X bindings like libxcb or xpp [1]. It's intended for
# neither applications nor end users. In other words, xcbgen is not needed to run applications
# using XCB.
#
# [1] https://github.com/polybar/xpp

variant python39 conflicts python310 python311 python312 python313 description {Use python 3.9} {
    depends_build-append    port:python39
    configure.python        ${prefix}/bin/python3.9
    license_noconflict      python39
}

variant python310 conflicts python39 python311 python312 python313 description {Use python 3.10} {
    depends_build-append    port:python310
    configure.python        ${prefix}/bin/python3.10
    license_noconflict      python310
}

variant python311 conflicts python39 python310 python312 python313 description {Use python 3.11} {
    depends_build-append    port:python311
    configure.python        ${prefix}/bin/python3.11
    license_noconflict      python311
}

variant python312 conflicts python39 python310 python311 python313 description {Use python 3.12} {
    depends_build-append    port:python312
    configure.python        ${prefix}/bin/python3.12
    license_noconflict      python312
}

variant python313 conflicts python39 python310 python311 python312 description {Use python 3.13} {
    depends_build-append    port:python313
    configure.python        ${prefix}/bin/python3.13
    license_noconflict      python313
}

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

livecheck.type  regex
livecheck.url   https://xorg.freedesktop.org/archive/individual/proto/?C=M&O=D
livecheck.regex xcb-proto-(\\d+(?:\\.\\d+)*)