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

# NOTE: This port must be kept at the same version as port:thrift and port:p5-thrift
version         0.13.0
checksums       rmd160 04cd735494a9d8558c2d22d1b99315ca859749c8 \
                sha256 7ad348b88033af46ce49148097afe354d513c1fca7c607b59c33ebb6064b5179 \
                size   4154357
revision        0

categories      python
license         Apache-2
platforms       darwin

maintainers     nomaintainer

description     Python bindings to Thrift

long_description \
    Thrift is a software framework for scalable cross-language \
    services development. It combines a software stack with a code \
    generation engine to build services that work efficiently and \
    seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, \
    Haskell, C#, Cocoa, Smalltalk, and OCaml.

homepage        https://thrift.apache.org/
dist_subdir     thrift
master_sites    apache:${dist_subdir}/${version}
distname        thrift-${version}

python.versions 27 35 36 37 38
python.default_version 37

if {${name} ne ${subport}} {
    depends_lib-append  port:thrift

    configure.dir       ${worksrcpath}/lib/py
    build.dir           ${configure.dir}
    test.dir            ${configure.dir}
    destroot.dir        ${configure.dir}

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 644 -W ${worksrcpath} \
            CHANGES.md \
            LICENSE \
            NOTICE \
            README.md \
        ${destroot}${docdir}
    }
}

livecheck.type  regex
livecheck.url   https://www.apache.org/dist/thrift/
livecheck.regex {(\d+(?:\.\d+)*)/}
