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

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.26 5.28
perl5.setup         Thrift 0.12.0
platforms           darwin
maintainers         nomaintainer
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            https://thrift.apache.org/
master_sites        apache:thrift/${version}
dist_subdir         thrift
distname            thrift-${version}

checksums           rmd160 dc6286d9523ae0e073f12057987b42fffdddd754 \
                    sha256 c336099532b765a6815173f62df0ed897528a9d551837d627c1f87fadad90428 \
                    size   3906291

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 \
            LICENSE \
            NOTICE \
            README.md \
            ${destroot}${docdir}
    }
}

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