# -*- 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.6
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  ff7419d899b94dfd4ed8449590323564d9ae3bc4 \
                sha256  edb59fa23994e405fdc5b400afdf5820ae6160b94f35e3dc3da4457a16e89753 \
                size    341092

use_xz          yes
use_parallel_build      yes

depends_build   port: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+)*)
