# -*- 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-libXcomposite
version         0.4.6
revision        0
categories      x11 devel
license         X11
maintainers     {jeremyhu @jeremyhu} openmaintainer
description     X.org libXcomposite
homepage        https://www.x.org
platforms       darwin macosx
long_description    Composite extension
master_sites     xorg:individual/lib/

distname        libXcomposite-${version}
checksums       rmd160  ba8705e1de85f83c23bd183eb19617f1d21cdb75 \
                sha256  fe40bcf0ae1a09070eba24088a5eb9810efe57453779ec1e20a55080c6dc2c87 \
                size    265596

use_xz          yes

use_parallel_build  yes

depends_build   port:pkgconfig

depends_lib     port:xorg-libXfixes \
                port:xorg-libXext \
                port:xorg-xorgproto

configure.args  --without-xmlto

configure.checks.implicit_function_declaration.whitelist-append strchr

build.args      V=1

# Depending on ghostscript for the PDF documentation creates a dependency
# loop, so you may want to install first without the docs variant
variant docs description "Install extra documentation" {
    depends_build-append \
        port:xmlto

    depends_skip_archcheck-append \
        xmlto

    configure.args-delete \
        --without-xmlto

    configure.args-append \
        --with-xmlto

    configure.env-append \
        XMLTO=${prefix}/bin/xmlto
}

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