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

name                php-yaml
categories-append   devel
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 7.4 8.0 8.1 8.2 8.3
php.pecl            yes

if {[vercmp ${php.branch} >= 7.1]} {
    version         2.2.4
    revision        0
    checksums       rmd160  3edd1a015d575234f18693b5fa0245e56f0e10d1 \
                    sha256  8eb353baf87f15b1b62ac6eb71c8b589685958a1fe8b0e3d22ac59560d0e8913 \
                    size    41573
} elseif {[vercmp ${php.branch} >= 7.0]} {
    version         2.0.4
    revision        0
    checksums       rmd160  0953bc858dea98a08016f49a27fbf346ef061440 \
                    sha256  9786b0386e648f12cc18a038358bd57bee4906e350a2e9ab776d6a5f18fc6680 \
                    size    39071
} else {
    version         1.3.1
    revision        0
    checksums       rmd160  1fc1164435f9709eafc51b179b7c3ccca05928c3 \
                    sha256  18c9455e731f33770106ce971e7d4af4b95c53078a29b93669809a669f7e75b9 \
                    size    37263
}

description         a PHP interface to the YAML parsing library

long_description    ${description}

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

    configure.args      --with-yaml=${prefix}

    use_parallel_build  yes
}
