# -*- 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           github 1.0
PortGroup           python 1.0

# Couldn't figure how to fetch the project's releases.
github.setup        astrand pyobfuscate 79cd76aa6526a34b5f0dbf39c904ae8393188034
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             0.3
revision            2
categories          lang python
platforms           {darwin any}
supported_archs     noarch
license             GPL-2
maintainers         nomaintainer

description         Python source code obfuscator
long_description    pyobfuscate is a source code obfuscator: It makes \
                    Python source code hard to read for humans, while \
                    still being executable for the Python interpreter.

python.default_version  27

checksums           rmd160  2dffbe40b64a5fcbb0374a8ff34074b24a0d8c50 \
                    sha256  191091b082a6a04245fc606187036ab36d9f95557137149879abac9780fa3de4

patchfiles          use-macports-python-prefix.patch
post-patch {
    reinplace s|__PYTHON_PREFIX__|${python.prefix}| ${worksrcpath}/setup.py
}

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -m 755 -d ${docdir}
    xinstall -W ${worksrcpath} -m 644 LICENSE README TODO ${docdir}
}
