# $Id: Portfile,v 1.1 2005/09/24 14:00:32 mww Exp $

PortSystem 1.0

name			objectweb-asm
version			2.1
categories		java devel
platforms		darwin
maintainers		dave@glowacki.org
description		Java bytecode manipulation framework.
long_description	ASM is a Java bytecode manipulation framework. It \
			offers similar functionalities as BCEL or SERP, but \
			is much smaller and faster than these tools.

set project		asm
set realname		${project}

homepage		http://asm.objectweb.org/
master_sites		http://download.us.forge.objectweb.org/${project} \
			http://download.forge.objectweb.org/${project} \
			http://download.fr2.forge.objectweb.org/${project}
distname		${realname}-${version}
checksums		md5 dfd62160a88f13e236f9da7d2485c9ec

depends_build		port:objectweb-anttasks \
			bin:ant:apache-ant

worksrcdir		${realname}-${version}

use_configure		no

pre-build {
	  cd ${worksrcpath}
	  reinplace s|^.*objectweb.ant.tasks.path.*ow_util_ant_tasks.jar|objectweb.ant.tasks.path\ ${prefix}/share/java/objectweb-anttasks.jar| build.properties
}

build.cmd		ant
build.target		jar jdoc
build.env		CLASSPATH=${prefix}/share/java/objectweb-anttasks.jar

variant debug {
	build.args-append		-debug
}

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 ${worksrcpath}/output/dist/lib/asm-${version}.jar \
		${destroot}${prefix}/share/java/${name}.jar
	file copy ${worksrcpath}/output/dist/doc/javadoc/user \
		${destroot}${prefix}/share/doc/${name}
}
