# $Id: Portfile 85402 2011-10-13 10:18:52Z jmr@macports.org $

PortSystem 1.0

name			commons-collections
version			3.2.1

categories		java
license			Apache-2
maintainers		blair openmaintainer
platforms		darwin

description		Jakarta Commons-Collections
long_description	Commons-Collections provides a suite of classes that \
				extend or augment the Java Collections \
				Framework.
homepage		http://commons.apache.org/collections/

distfiles		${distname}-src${extract.suffix}
master_sites		apache:commons/collections/source/
checksums		md5 031ce05872ddb0462f0dcce1e5babbe9 \
			sha1 6925f4a487d58538a4d3ef11d63aefdd66ee2405 \
			rmd160 850b2b710fb7811b71b0c347396ba55df3dc8e34

worksrcdir		${name}-${version}-src

depends_build		bin:ant:apache-ant
depends_lib		bin:java:kaffe \
				port:junit

use_configure		no

build.cmd		ant
build.target		jar javadoc
build.args		-Djar.name=${name}.jar \
				-Djunit.jar=${prefix}/share/java/junit.jar

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 \
		${worksrcpath}/build/commons-collections.jar \
		${destroot}${prefix}/share/java/
	file copy ${worksrcpath}/build/docs \
		${destroot}${prefix}/share/doc/${name}
	file attributes ${destroot}${prefix}/share/doc/${name} \
		-permissions goa+r
}

livecheck.type  regex
livecheck.url   http://commons.apache.org/downloads/download_collections.cgi
livecheck.regex "${name}-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
