# $Id: Portfile 107621 2013-07-03 03:32:41Z jeremyhu@macports.org $

PortSystem 1.0

name            xorg-libXi
version         1.7.2
categories      x11 devel
license         X11
maintainers     jeremyhu openmaintainer
description     X.org libXi
homepage        http://www.x.org
platforms       darwin macosx
long_description X11 Input Extension
master_sites     xorg:individual/lib/

distname    libXi-${version}
checksums           sha1    53c90cd52e40065e04886f046383c1e5c507e0c4 \
                    rmd160  514199e00894f280400f86b613b4f208133d7ee1 \
                    sha256  df24781dc63645e2b561cd0b20bd8a0e7aff02e426a8d2a7641159004d4cb20e

use_bzip2   yes
use_parallel_build      yes

depends_build   port:pkgconfig

depends_lib     port:xorg-libXext \
		port:xorg-libXfixes \
		port:xorg-inputproto

configure.args \
	--without-asciidoc \
	--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:asciidoc \
		port:fop \
		port:xmlto \
		port:xorg-sgml-doctools

	depends_skip_archcheck-append \
		asciidoc \
		xmlto

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

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

	configure.env-append \
		ASCIIDOC="${prefix}/bin/asciidoc" \
		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 libXi-(\\d+\\.\\d+\\.\\d+)\\.tar
