# $Id: Portfile,v 1.1 2005/09/24 13:33:26 mww Exp $

PortSystem 1.0

name			javancss
version			21.41
categories		java devel
platforms		darwin
maintainers		dave@glowacki.org
description		Java Source Measurement Suite
long_description	JavaNCSS measures two standard source code metrics \
			for the Java programming language. The metrics are \
			collected globally, for each class and/or for each \
			function.

set realname		${name}

homepage		http://www.kclee.de/clemens/java/${realname}/
master_sites		${homepage}
distname		${realname}${version}
checksums		md5 0f88da7f0c400476cebb0caf4c83e0d9
use_zip			yes

depends_build		bin:ant:apache-ant \
			bin:javacc:javacc \
			port:ccl-util

worksrcdir		${realname}${version}

use_configure		no

patchfiles		patch-build.xml

post-patch {
	   cd ${worksrcpath}
	   reinplace s|/usr/local/java/javacc|${prefix}/bin/javacc| build.xml
}

build.cmd		ant
build.target		jar
build.dir		${worksrcpath}
#build.args-append		-debug

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java
	xinstall -m 644 ${worksrcpath}/lib/${realname}.jar \
		${destroot}${prefix}/share/java/${realname}.jar
}
