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

epoch                   1
name                    php-swoole
categories-append       net devel
platforms               darwin
maintainers             {ryandesign @ryandesign} openmaintainer
license                 Apache-2

php.branches            5.3 5.4 5.5 5.6 7.0 7.1 7.2
php.pecl                yes

if {[vercmp ${php.branch} 7] >= 0} {
    version             2.2.0
    revision            0
    checksums           rmd160  964b4fa107c8946996c0d9eccbfc783441c004e4 \
                        sha256  04d519569e94a642ee80dd30eaa4a85b4ed54a526d488c63e384633186f29bc4 \
                        size    853688
} elseif {[vercmp ${php.branch} 5.5] >= 0} {
    # https://github.com/swoole/swoole-src/issues/1783
    version             2.0.11
    revision            0
    checksums           rmd160  7238015b141faf59d9662d4ab21c73bb66b58e35 \
                        sha256  07df75ede4bf0833d2c2443b666a5c3054bc498a78f5251babc1b0e7cc8cd573 \
                        size    769029
} else {
    version             1.10.5
    revision            0
    checksums           rmd160  48b8c3bf5999e5365b3e804440464114500120ed \
                        sha256  5c1dc0b82772ca1c352de4ddf20deeb35f06e4c5a01beba5a446d78a1f747bd2 \
                        size    730797
}

description             an event-driven asynchronous & concurrent & coroutine networking engine with high performance for PHP

long_description        ${name} is ${description}.

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

    compiler.blacklist  *gcc-4.0 *gcc-4.2

    use_parallel_build  yes
}