# -*- 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           gitlab 1.0

name                xfs
gitlab.instance     https://gitlab.freedesktop.org/xorg
gitlab.setup        app ${name} 1.2.2 ${name}-
revision            0
categories          x11 graphics
license             X11
maintainers         {jeremyhu @jeremyhu} openmaintainer
description         X11 font server
long_description    ${name} is the X Window System font server. It supplies fonts \
                    to X Window System display servers.

homepage            https://www.x.org
use_bzip2           yes

checksums           rmd160  9ae0fc630143f73e5a0a86479f1bde9ffcaca5ac \
                    sha256  203885ed9bb499ea3fe0c51f882df4b29c335e1e6d4ae5e8f719369997dbcb1a \
                    size    80839

use_autoreconf      yes

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

depends_lib         port:xorg-libXfont2

configure.args      --without-xmlto \
                    --without-fop \
                    --disable-devel-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

	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
}
