# $Id: Portfile 92047 2012-04-16 19:20:54Z jmr@macports.org $

PortSystem 1.0

name			cglib
epoch			1
version			2.2.2

categories		java
license			Apache-2
maintainers		nomaintainer
platforms		darwin
supported_archs		noarch

description		cglib - a code generation library for java byte code.
long_description	cglib is a powerful, high performance and quality \
				Code Generation Library, It is used to extend \
				Java classes and implement interfaces at \
				runtime.
homepage		http://cglib.sourceforge.net/
master_sites		sourceforge:project/cglib/cglib2/${version}

distname		${name}-src-${version}

checksums		rmd160  2a4773bb33e1728abadaebd62e3dc904c01f6be6 \
			sha256  896000c74f71291e2931188b5494ffd7bdac8f0d75dfeeac1c40eb6e16cadcbb

extract.mkdir		yes
extract.suffix		.jar
extract.cmd		jar
extract.pre_args	xf
extract.post_args

depends_build		bin:ant:apache-ant
depends_lib		bin:java:kaffe

use_configure		no

build.cmd		ant
build.target		dist

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
		
	foreach f "${name} ${name}-nodep" {
		xinstall -m 644 \
			${worksrcpath}/dist/${f}-${version}.jar \
			${destroot}${prefix}/share/java/${f}.jar
	}
	
	file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
}
