# $Id: Portfile 80476 2011-07-13 16:32:05Z jmr@macports.org $

PortSystem 1.0

name		xorg-libX11
version		1.4.3
categories	x11 devel
license		X11
maintainers	jeremyhu openmaintainer
description	X.org libX11
homepage	http://www.x.org
platforms	darwin macosx
long_description libX11 is the main library used by X Window System applications to communicate with the X server.
master_sites	 xorg:individual/lib/

distname	libX11-${version}
checksums           md5     85e942627aaa020813e0eb8433353563 \
                    sha1    174270a0e51614b5077026fc6c20701d4e09aef8 \
                    rmd160  4b0ff1cf0725b974cc8503fbac9dad65373b4600
use_bzip2	yes
use_parallel_build      yes

depends_build   port:pkgconfig \
		port:xorg-util-macros \
                port:xorg-xtrans \
                port:xorg-bigreqsproto \
                port:xorg-xcmiscproto \
                port:xorg-xextproto \
                port:xorg-xf86bigfontproto \
                port:xorg-inputproto

depends_lib     port:xorg-libXdmcp \
                port:xorg-libXau \
                port:xorg-libxcb \
                port:xorg-xproto \
                port:xorg-kbproto

configure.env-append RAWCPP=${configure.cpp}

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

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:xmlto \
		port:fop \
		port:xorg-sgml-doctools

	depends_skip_archcheck-append \
		xmlto

	configure.args-delete \
		--without-xmlto \
		--without-fop \
		--disable-specs

	configure.args-append \
		--with-xmlto \
		--with-fop \
		--enable-specs

	configure.env-append \
		FOP="${prefix}/bin/fop" \
		XMLTO="${prefix}/bin/xmlto"
}

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