# -*- 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-mysql-xdevapi
categories-append       net devel
platforms               darwin freebsd openbsd
maintainers             nomaintainer
license                 PHP-3.01
categories              php devel

homepage                https://dev.mysql.com/doc/x-devapi-userguide/en

php.branches            7.1 7.2 7.3
php.pecl                yes

if {[vercmp ${php.branch} 7.1] >= 0} {
    version             8.0.17
    revision            0
    checksums           rmd160  2e685af8dc1117f853352b9bbadf1d0d580fbb13 \
                        sha256  a19c5e41df96a551a8f2808a80421666b99cc6633a4ff09bdd434aea9f0b292b \
                        size    583903
}

distname                mysql_xdevapi-${version}

description             MySQL X DevAPI for PHP

long_description        The X DevAPI is the new common API for MySQL Connectors built on the X Protocol introduced in MySQL 5.7.12.

if {${name} ne ${subport}} {
    depends_build-append \
                        port:boost

    depends_lib-append  port:protobuf3-cpp

    # C++14
    compiler.cxx_standard   2014

    configure.args      --with-boost=${prefix}/include
}