# -*- 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-libXmu
version         1.2.1
revision        0

checksums       rmd160  08aa0b1da5eaec5b0da5b31baa6029a7d030f213 \
                sha256  fcb27793248a39e5fcc5b9c4aec40cc0734b3ca76aac3d7d1c264e7f7e14e8b2 \
                size    364888

categories      x11 devel
license         X11
maintainers     {jeremyhu @jeremyhu} openmaintainer
description     X.org libXmu
homepage        https://www.x.org
platforms       darwin macosx
long_description \
                X.org Xmu library
master_sites    xorg:individual/lib/

distname        libXmu-${version}

use_xz          yes

depends_build   port:pkgconfig

depends_lib     port:xorg-libXext \
                port:xorg-libXt

configure.checks.implicit_function_declaration.whitelist-append strchr

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

    depends_skip_archcheck-append \
                xmlto

    configure.args-replace \
                --without-xmlto --with-xmlto \
                --without-fop --with-fop \
                --disable-docs --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 libXmu-(\\d+(?:\\.\\d+)*)
