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

distname        libXext-${version}

checksums       rmd160  8256da79fe9facfbef96c88c960f57a9ae84e299 \
                sha256  6c643c7035cdacf67afd68f25d01b90ef889d546c9fcd7c0adf7c2cf91e3a32d \
                size    347068

use_xz          yes

depends_build   path:bin/pkg-config:pkgconfig \
                port:xorg-util-macros

depends_lib     port:xorg-libX11 \
                port:xorg-xorgproto

use_autoreconf  yes
autoreconf.args -fvi
configure.checks.implicit_function_declaration.whitelist-append strchr

configure.env-append RAWCPP=${configure.cpp}

configure.args \
    --without-xmlto \
    --without-fop \
    --disable-specs

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:fop \
        port:xmlto \
        port:xorg-sgml-doctools

    depends_skip_archcheck-append \
        xmlto

    configure.args-delete \
        --without-xmlto \
        --without-fop \
        --disable-specs

    configure.args-append \
        --with-xmlto \
        --with-fop \
        --enable-specs

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

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