# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 95477 2012-07-13 19:37:07Z blair@macports.org $

PortSystem      1.0
PortGroup       perl5 1.0

perl5.branches  5.8 5.10 5.12 5.14 5.16
perl5.setup     Thrift 0.8.0
revision        1
platforms       darwin
maintainers     blair openmaintainer
license         BSD
supported_archs noarch

description     Perl implementation of Thrift serialization library

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:thrift/${version}
dist_subdir     thrift
distname        thrift-${version}

checksums       md5     d29dfcd38d476cbc420b6f4d80ab966c \
                sha1    1d652d7078d9cc70e2a45d3119b13e86ebd446da \
                rmd160  bb0e1d2b6d30b70590752a7f9318e14de285c505

if {${perl5.major} != ""} {
    configure.dir   ${worksrcpath}/lib/perl
    build.dir       ${configure.dir}
    test.dir        ${configure.dir}
    destroot.dir    ${configure.dir}

    depends_lib-append      port:p${perl5.major}-bit-vector \
                            port:p${perl5.major}-class-accessor

    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+)*)/}
