# -*- 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
# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem      1.0
PortGroup       python 1.0

name            py-thrift
version         0.9.0
categories      python
license         BSD
platforms       darwin

maintainers     blair

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        http://thrift.apache.org/
master_sites    apache:${name}/${version}
dist_subdir     thrift
distname        thrift-${version}

checksums       sha1    fefcf4d729bf80da419407dfa028740aa95fa2e3 \
                rmd160  a507447718048bec2e7a4077658c43b07714ddb1 \
                sha256  71d129c49a2616069d9e7a93268cdba59518f77b3c41e763e09537cb3f3f0aac

python.versions 25 26 27
python.default_version 27

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 \
            CONTRIBUTORS \
            DISCLAIMER \
            LICENSE \
            NEWS \
            NOTICE \
            README \
        ${destroot}${docdir}
    }
}
               
livecheck.type  regex
livecheck.url   http://www.apache.org/dist/thrift/
livecheck.regex {(\d+(?:\.\d+)*)/}
