# $Id: Portfile 120156 2014-05-17 05:39:52Z jeremyhu@macports.org $

PortSystem 1.0

name		xorg-libXfont
version		1.4.8
categories	x11 devel
license		X11 BSD
maintainers	jeremyhu openmaintainer
description	X.org libXfont
homepage	http://www.x.org
platforms	darwin macosx
long_description X font handling library for server and utilities
master_sites	 xorg:individual/lib/

distname	libXfont-${version}
checksums           sha1    687746ba7e6d6064cb2b930e2dfe744603a5f85b \
                    rmd160  4ab6fff999c13163c30eb455329c1c37b6891e69 \
                    sha256  5568d4febf790fb250fb8d4ecf1f389a428eb545a79fb2abe9c82f652d14d005
use_bzip2	yes

use_parallel_build  yes

depends_build \
	port:pkgconfig \
	port:xorg-xtrans

depends_lib \
	port:freetype \
	port:xorg-libfontenc \
	port:bzip2 \
	port:zlib \
	port:xorg-xproto \
	port:xorg-fontsproto

# Newer libtool add -Wl,-single_module if this isn't set... breaking us
configure.env LT_MULTI_MODULE=1

configure.args \
	--with-bzip2 \
	--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"
}

livecheck.type  regex
livecheck.url   http://xorg.freedesktop.org/archive/individual/lib/?C=M&O=D
livecheck.regex libXfont-(\\d+(?:\\.\\d+)*)
