# $Id: Portfile 102584 2013-02-05 04:25:13Z larryv@macports.org $

PortSystem 1.0
PortGroup python 1.0

name			py-plex
version			1.1.4.1
revision		1
categories-append	devel
license			Permissive
maintainers		nomaintainer
platforms		darwin freebsd
supported_archs	noarch
description		lexical analysis module for python
long_description	Plex is a Python module for constructing lexical \
				analysers, or scanners. Plex scanners have almost all the \
				capabilities of the scanners generated by GNU Flex, and are \
				specified in a very similar way. Tokens are defined by regular \
				expressions, and each token has an associated action, which \
				may be to return a literal value, or to call an arbitrary \
				function. 

homepage		http://www.cosc.canterbury.ac.nz/~greg/python/Plex/
master_sites	${homepage}
distname		Plex-${version}
checksums		md5 e6ec70ab691c465910a8c010586c7500

python.versions	24

if {$subport != $name} {
    patch		{
        file copy ${portpath}/files/setup.py ${worksrcpath}
        reinplace "s|PORTVERSION|${version}|g" ${worksrcpath}/setup.py
    }

    post-destroot	{
        xinstall -m 644 -W ${worksrcpath} doc/Reference.html doc/Tutorial.html \
            doc/index.html README TODO \
            ${destroot}${prefix}/share/doc/${subport}
        file delete ${destroot}${prefix}/share/doc/${subport}/examples
        file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport}
    }
}
