# -*- 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.3
categories          x11 devel
license             X11
maintainers         nomaintainer
platforms           darwin macosx

description         X.org libSM
long_description    X Session Management Library

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

checksums           rmd160  f3802831627191ed11aa6f6d67160fd4fbf7e6d4 \
                    sha256  2d264499dcb05f56438dee12a1b4b71d76736ce7ba7aa6efbf15ebb113769cbb \
                    size    362595

depends_build \
    port:pkgconfig \
    port:xorg-xtrans

depends_lib \
    port:xorg-libice

configure.args \
    --without-libuuid \
    --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

    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+)*)