# -*- 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

name                py-blist
version             1.3.6
revision            0
categories-append   devel
platforms           darwin
license             BSD

python.versions     27 34 35 36

maintainers         {stromnov @stromnov} openmaintainer

description         A list-like type with better asymptotic performance.
long_description    A list-like type with better asymptotic performance \
                    and similar performance on small lists.

homepage            http://stutzbachenterprises.com/
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}

distname            ${python.rootname}-${version}

checksums           rmd160  d94195d48b44bba1009ad7e27e6c2e431bef4559 \
                    sha256  3a12c450b001bdf895b30ae818d4d6d3f1552096b8c995f0fe0c74bef04d1fc3

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-setuptools

    # Fix permissions
    post-extract {
        fs-traverse item ${worksrcpath} {
            if {[file isdirectory ${item}]} {
                file attributes ${item} -permissions a+rx
            } elseif {[file isfile ${item}]} {
                file attributes ${item} -permissions a+r
            }
        }
    }

    build.args-append   -f

    post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} README.rst LICENSE ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type      none
} else {
    livecheck.type      pypi
}