# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0
PortGroup           deprecated 1.0

name                py-spark
version             0.6.1
revision            1
license             MIT
platforms           {darwin any} 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}
checksums           md5 28c4c3b1031a6a4e4c4bd42726d22b65

deprecated.upstream_support no
livecheck.type      none

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
    }
}
