# $Id: Portfile 40554 2008-10-06 20:58:09Z blair@macports.org $

PortSystem 1.0

name		beanshell
version		2.0b4
categories	java
maintainers	blair
platforms	darwin
description	BeanShell Scripting Language, JSR-274, Java source interpreter

long_description \
	BeanShell is a small, free, embeddable Java source interpreter \
	with object scripting language features, written in Java.  \
	BeanShell dynamically executes standard Java syntax and extends \
	it with common scripting conveniences such as loose types, \
	commands, and method closures like those in Perl and JavaScript.  \
	You can use BeanShell interactively for Java experimentation and \
	debugging as well as to extend your applications in new ways.  \
	Scripting Java lends itself to a wide variety of applications \
	including rapid prototyping, user scripting extension, rules \
	engines, configuration, testing, dynamic deployment, embedded \
	systems, and even Java education.

homepage		http://www.beanshell.org/
master_sites		${homepage}:root \
				${homepage}manual/:manual \
				http://distfiles.macports.org/${name}/:root \
				http://distfiles.macports.org/${name}/:manual

distfiles		bsh-${version}.jar:root \
				javadoc.zip:root \
				bshmanual.pdf:manual
checksums		bsh-${version}.jar \
				md5 a1c60aa83c9c9a6cb2391c1c1b85eb00 \
				sha1 a05f0a0feefa8d8467ac80e16e7de071489f0d9c \
				rmd160 ea82033ac601a9fefa498bc0e09c5bac5163c68c \
			javadoc.zip \
				md5 a16da5323503b78cca6b3f96272c71b1 \
				sha1 783e56e86a36fce5429805ace4d8fbfb06b1c95b \
				rmd160 46c0530f8d396d51b22a890b368bc7793014eab9 \
			bshmanual.pdf \
				md5 2d265b1114939e1f8a2e6ba9165c8a73 \
				sha1 177ed93a0d0c4dd7f298314e291c24c7bc9269ec \
				rmd160 8354300b66e50b2458c33a65371da5dca98c9f8b

depends_lib		bin:java:kaffe

use_zip			yes
extract.only

use_configure		no

build {
}

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

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

	file copy ${distpath}/bsh-${version}.jar ${javadir}/bsh.jar
	file copy ${distpath}/bshmanual.pdf ${docdir}/

	system "cd ${docdir}/javadocs && unzip ${distpath}/javadoc.zip"
}
