# $Id: Portfile,v 1.5 2005/09/27 17:48:41 jberry Exp $

PortSystem 1.0

name				commons-pool
version				1.2
revision			1

categories			java
maintainers			jberry@opendarwin.org
platforms			darwin

description			Jakarta Commons-Pool
long_description	Commons-Pool provides a generic object pooling interface, \
					a toolkit for creating modular object pools and several \
					general purpose pool implementations.
homepage			http://jakarta.apache.org/commons/pool/

distname			${name}-${version}-src
master_sites		apache:jakarta/commons/pool/source/
checksums			md5 e7dc9f479c6a4260f84f6751b434295a

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

use_configure		no

worksrcdir			${name}-${version}

post-patch {
	reinplace {s|<javac |<javac source="1.4" |} ${worksrcpath}/build.xml
}

build.cmd			ant
build.target		dist
build.args			-Djunit.jar=${prefix}/share/java/junit.jar \
					-Dcommons-collections.jar=${prefix}/share/java/commons-collections.jar

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