# $Id: Portfile 80574 2011-07-15 11:36:12Z jmr@macports.org $

PortSystem        1.0

name              xorg-libice
version           1.0.7
categories        x11 devel
license           X11
maintainers       jeremyhu openmaintainer
platforms         darwin macosx

description       X.org libice
long_description  X Inter-Client Exchange Protocol

homepage          http://www.x.org/
master_sites      xorg:individual/lib/
distname          libICE-${version}
use_bzip2         yes
use_parallel_build      yes

checksums           md5     bb72a732b15e9dc25c3036559387eed5 \
                    sha1    c7d0f4c5b0e999385445b8be1bc89aec4e5de71d \
                    rmd160  c7de88091897017869eb5859bae4fabcdef1b2a1

depends_build     port:pkgconfig \
                  port:xorg-xtrans

depends_lib       port:xorg-xproto

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

	depends_skip_archcheck-append \
		xmlto

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

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

	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 libICE-(\\d+(?:\\.\\d+)*)
