# -*- 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
PortGroup       legacysupport 1.1

name            xorg-libXfont2
version         2.0.7
revision        0
categories      x11 devel
license         X11 BSD
maintainers     {jeremyhu @jeremyhu} openmaintainer
description     X.org libXfont
homepage        https://www.x.org
platforms       darwin macosx
long_description X font handling library for server and utilities
master_sites    xorg:individual/lib/

distname        libXfont2-${version}

checksums       rmd160  7220b7da5728cb7cbc63abf7bdad4faf6eafe701 \
                sha256  8b7b82fdeba48769b69433e8e3fbb984a5f6bf368b0d5f47abeec49de3e58efb \
                size    453012

use_xz          yes

depends_build \
        path:bin/pkg-config:pkgconfig \
        port:xorg-util-macros \
        port:xorg-xtrans

depends_lib \
        port:freetype \
        port:xorg-libfontenc \
        port:bzip2 \
        port:zlib \
        port:xorg-xorgproto

configure.args \
        --with-bzip2 \
        --without-xmlto \
        --without-fop \
        --disable-devel-docs

use_autoreconf  yes
autoreconf.args -fvi

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

        depends_skip_archcheck-append \
                xmlto

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

        configure.args-append \
                --with-xmlto \
                --with-fop \
                --enable-devel-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 libXfont2-(\\d+(?:\\.\\d+)*)
