# -*- 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.3.1
revision        0
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

checksums       rmd160  6e3c9033a66ac247e577fa771f8d8dcdd9a71238 \
                sha256  81a99e94c4501e81c427cbaa4a11748b584933e94b7a156830c3621256857bc4 \
                size    374032

depends_build   path:bin/pkg-config:pkgconfig

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

configure.checks.implicit_function_declaration.whitelist-append strchr

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

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