# $Id: Portfile 90879 2012-03-17 00:41:51Z jeremyhu@macports.org $

PortSystem 1.0

name		xorg-xproto
version		7.0.23
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           sha1    5d7f00d1dbe6cf8e725841ef663f0ee2491ba5b2 \
                    rmd160  b4077227a012c90cbcab8b6e7a289931b2ee6efb \
                    sha256  ade04a0949ebe4e3ef34bb2183b1ae8e08f6f9c7571729c9db38212742ac939e

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+)*)
