# -*- 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-libsm
version             1.2.6
categories          x11 devel
license             X11
maintainers         nomaintainer

description         X.org libSM
long_description    X Session Management Library

homepage            https://www.x.org/
master_sites        xorg:individual/lib/
distname            libSM-${version}
use_xz              yes

checksums           rmd160 69df42aa8c86d30b9c9552e09c8b980876eafb73 \
                    sha256 be7c0abdb15cbfd29ac62573c1c82e877f9d4047ad15321e7ea97d1e43d835be

depends_build \
    port:pkgconfig \
    port:xorg-xtrans

depends_lib \
    port:xorg-libice

configure.args \
    --without-libuuid \
    --without-xmlto \
    --without-fop \
    --disable-docs \
    --disable-silent-rules

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