# $Id: Portfile 80494 2011-07-13 17:57:29Z jmr@macports.org $

PortSystem 1.0

name		xorg-xproto
version		7.0.22
categories	x11 devel
license		X11
maintainers	jeremyhu openmaintainer
description	X.org xproto
homepage	http://www.x.org
platforms	darwin
supported_archs	noarch
long_description The X.org xproto package contains miscellaneous X11 prototype headers.
master_sites 	xorg:individual/proto/

distname	xproto-${version}
use_bzip2	yes

checksums           md5     da0b0eb2f432b7cc1d665b05422a0457 \
                    sha1    96d9b37d15591412a94dd0d3620008e20ef500ca \
                    rmd160  0d3b840e7a584e98ea3576bd521b09d2fd483b6d

post-destroot {
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog \
        ${destroot}${docdir}
}

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

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

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

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

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