# $Id: Portfile 79716 2011-06-23 21:59:09Z blair@macports.org $

PortSystem 1.0

name			proguard
version			4.6
categories		java
platforms		darwin
maintainers		blair

description		Java bytecode shrinker, optimizer, and obfuscator.
long_description	ProGuard is a free Java class file shrinker, \
			optimizer, obfuscator, and preverifier.  It detects \
			and removes unused classes, fields, methods, and \
			attributes.  It optimizes bytecode and removes \
			unused instructions.  It renames the remaining \
			classes, fields, and methods using short \
			meaningless names.  Finally, it preverifies the \
			processed code for Java 6 or for Java Micro Edition.
homepage		http://proguard.sourceforge.net/

master_sites		sourceforge
distname		${name}${version}
checksums		md5 4c2f225d996349e3cf705b4aa671a6cb \
			sha1 113b01c33dd3374babcee52af4a0552679ce9b71 \
			rmd160 78b1e9fee61cd717f1b2dae229a4fb5cd9ebed54

depends_lib		bin:java:kaffe

use_configure		no

build.cmd		true

destroot {
	set javadir ${destroot}${prefix}/share/java
	set docdir ${destroot}${prefix}/share/doc/${name}

	xinstall -d -m 755 ${javadir}
	xinstall -d -m 755 ${docdir}

	foreach f [glob -directory ${worksrcpath}/lib *.jar] {
		file copy ${f} ${javadir}/
	}
	foreach f {README docs examples} {
		file copy ${worksrcpath}/${f} ${docdir}/
	}
}
