PortSystem 1.0
PortGroup python 1.0

name			py-spark
version			0.6.1
revision		1
license			MIT
platforms		darwin freebsd
supported_archs	noarch
maintainers		nomaintainer
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

python.versions	27

if {${name} ne ${subport}} {
    patch	{
        file delete ${worksrcpath}/generic.py
        file copy ${filespath}/setup.py ${worksrcpath}
        reinplace "s|PORTVERSION|${version}|g" ${worksrcpath}/setup.py
    }

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