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

name                php-amqp
categories          php net
platforms           darwin
maintainers         {ryandesign @ryandesign} openmaintainer
license             PHP-3.01

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

description         AMQP interface for PHP

long_description    This extension can communicate with any AMQP spec 0-9-1 \
                    compatible server, such as RabbitMQ, OpenAMQP and Qpid, \
                    giving you the ability to create and delete exchanges \
                    and queues, as well as publish to any exchange and \
                    consume from any queue.

if {[vercmp ${php.branch} 5.6] >= 0} {
    epoch           1
    version         1.9.4
    revision        0
    checksums       rmd160  57fd7739e90f0ba4f3451fdbd7db912b4c326cfc \
                    sha256  b66b8b8264749cb7a69ae4d09665dad1559b6c4f01430206c8e4187bcd8c782d \
                    size    102604
} elseif {[vercmp ${php.branch} 5.3] >= 0} {
    epoch           1
    version         1.9.3
    revision        0
    checksums       rmd160  14e0ad1abba8871bbba7a43fc6779dd4978ad3b1 \
                    sha256  c79e52db33bf907dad7da8f350dbdf2937b0679a3dc44fb2a941efb6d4808da9 \
                    size    101342
}

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:rabbitmq-c

    configure.args  --with-amqp \
                    --with-librabbitmq-dir=${prefix}
}
