# -*- 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-xtrans
version     1.5.2
categories  x11 devel
license     X11
maintainers {jeremyhu @jeremyhu} openmaintainer
description X.org xtrans
homepage    https://www.x.org
platforms   {darwin any}
supported_archs noarch
long_description X Network Transport layer shared code
master_sites    xorg:individual/lib/

distname    xtrans-${version}

checksums   rmd160 5aac9871266acd378739e4331dc7fddca83d5fb0 \
            sha256 5c5cbfe34764a9131d048f03c31c19e57fb4c682d67713eab6a65541b4dff86c \
            size   176680

use_xz      yes

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

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

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

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

    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 xtrans-(\\d+(?:\\.\\d+)*)
