# $Id: Portfile,v 1.4 2004/12/30 15:09:28 mww Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-spark
version			0.6.1
revision		1
categories		python
platforms		darwin freebsd
maintainers		mww@opendarwin.org
description		spark is the little language compiler framework for python
long_description	SPARK stands for the Scanning, Parsing, and Rewriting \
				Kit. It formerly had no name, and was referred to as \
				the "little language framework." The first version \
				(circa 1998) was described in the paper Compiling \
				Little Languages in Python at the 7th International \
				Python Conference.

homepage		http://pages.cpsc.ucalgary.ca/~aycock/spark/
master_sites	${homepage}
distname		spark-${version}
checksums		md5 28c4c3b1031a6a4e4c4bd42726d22b65

patch	{
	file delete ${worksrcpath}/generic.py
	file copy ${portpath}/files/setup.py ${worksrcpath}
	reinplace "s|PORTVERSION|${version}|g" ${worksrcpath}/setup.py
}

post-destroot	{
	xinstall -m 644 ${worksrcpath}/doc/doc.html \
		${destroot}${prefix}/share/doc/${name}
	file delete ${destroot}${prefix}/share/doc/${name}/examples
	file copy ${worksrcpath}/examples \
		${destroot}${prefix}/share/doc/${name}/
	file delete \
		${destroot}${prefix}/share/doc/${name}/examples/auto/spark.py \
		${destroot}${prefix}/share/doc/${name}/examples/paper/spark.py \
		${destroot}${prefix}/share/doc/${name}/examples/python/spark.py
}
