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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Gearman-Client-Async 0.94
revision            4
categories          perl net
license             {Artistic-1 GPL}
platforms           {darwin any}
maintainers         nomaintainer

description         Asynchronous client module for Gearman for Danga::Socket applications
long_description    ${description}

checksums           md5 71dcadfb434202dbdf4798f2ec93b32f \
                    sha1 10e41caf43a81f14bd8f61a2750b6687c8d60e8a

if {${perl5.major} != ""} {
    depends_build-append \
                    port:p${perl5.major}-gearman-server

    depends_lib-append \
                    port:p${perl5.major}-danga-socket \
                    port:p${perl5.major}-gearman

    # make sure tests use the right perl

    post-patch {
        reinplace "s|^#!.*|#!${perl5.bin}|" \
            ${worksrcpath}/t/allinone.t \
            ${worksrcpath}/t/async.t \
            ${worksrcpath}/t/err1.t \
            ${worksrcpath}/t/err2.t \
            ${worksrcpath}/t/err3.t \
            ${worksrcpath}/t/err4.t \
            ${worksrcpath}/t/err5.t \
            ${worksrcpath}/t/err6.t \
            ${worksrcpath}/t/err7.t \
            ${worksrcpath}/t/err8.t \
            ${worksrcpath}/t/lib/testlib.pl \
            ${worksrcpath}/t/tests-needed.t \
            ${worksrcpath}/t/uniq.t \
            ${worksrcpath}/t/worker.pl
    }

    supported_archs noarch
}