# $Id: Portfile 90411 2012-03-05 02:10:17Z jeremyhu@macports.org $

PortSystem 1.0

name		xorg-libXfont
version		1.4.5
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    0bf3cb8aa192ab96bbaf384d1a4a00d15a40171e \
                    rmd160  f7749eb4fb7f8e73921c45c5bdcb48fc5f9a0645 \
                    sha256  bbf96fb80b6b95cdb1dc968085082a6e668193a54cd9d6e2af669909c0cb7170
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+)*)
