# $Id: Portfile,v 1.24 2006/01/25 08:10:49 blb Exp $

PortSystem			1.0
name				expat
version				2.0.0
revision			1
categories			textproc devel
maintainers			blb@opendarwin.org
description			XML 1.0 parser written in C
long_description	${description}

platforms			darwin freebsd

homepage			http://expat.sourceforge.net/
master_sites		sourceforge

checksums			md5 d945df7f1c0868c5c73cf66ba9596f3f

configure.args		--mandir=\\\${prefix}/share/man

build.type			gnu

destroot.destdir 	prefix=${destroot}${prefix}

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
		${destroot}${prefix}/share/examples/${name}
	xinstall -m 644 -W ${worksrcpath} COPYING Changes README \
		${destroot}${prefix}/share/doc/${name}
	eval xinstall -m 644 [glob ${worksrcpath}/doc/*] \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath}/examples elements.c outline.c \
		${destroot}${prefix}/share/examples/${name}
	cd ${destroot}${prefix}/lib
	system "ln -s libexpat.1.dylib libexpat.0.dylib"
}

variant no_static {
	configure.args-append	--disable-static
}

