# $Id: Portfile,v 1.4 2006/02/27 08:00:35 blb Exp $

PortSystem 1.0

name			spidermonkey
version			1.5
revision		1
categories		lang
platforms		darwin
maintainers		darwinports@opendarwin.org
description		JavaScript-C Engine
long_description	${description}

homepage		http://www.mozilla.org/js/spidermonkey/
master_sites	ftp://mozilla.isc.org/pub/mozilla.org/js/ \
				http://ftp.uni-erlangen.de/pub/mozilla.org/js/ \
				http://mozilla.isc.org/pub/mozilla.org/js/
distname		js-${version}
checksums		md5 863bb6462f4ce535399a7c6276ae6776

worksrcdir		js/src

use_configure	no

build.args		-f Makefile.ref
post-build {
	system "ranlib ${worksrcpath}//Darwin_DBG.OBJ/libjs.a"
}

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/include/${name}
	xinstall -m 755 ${worksrcpath}/Darwin_DBG.OBJ/js ${destroot}${prefix}/bin
	xinstall -m 644 -W ${worksrcpath} jsapi.h Darwin_DBG.OBJ/jsautocfg.h \
		${destroot}${prefix}/include/${name}
	xinstall -m 644 ${worksrcpath}/Darwin_DBG.OBJ/libjs.a ${destroot}${prefix}/lib
}
