# -*- 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-xdebug
categories-append       net devel
platforms               darwin freebsd openbsd
maintainers             {ryandesign @ryandesign} openmaintainer
license                 Xdebug-1.01

homepage                https://xdebug.org
master_sites            ${homepage}/files/

php.branches            5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3
php.extensions.zend     xdebug

if {[vercmp ${php.branch} 7.0] >= 0} {
    version             2.7.0
    revision            0
    checksums           rmd160  0664ae992dee55aa7ab51f59a783049fa69f864a \
                        sha256  e896da91ce0373f5fd8f4ca392c68da8593932ad51b2ec5eb3ee032b50d4b2d6 \
                        size    230326
} elseif {[vercmp ${php.branch} 5.5] >= 0} {
    version             2.5.5
    revision            0
    checksums           rmd160  ad7939d2d2f453c0f2ccb12ce8f745db7163ad9d \
                        sha256  72108bf2bc514ee7198e10466a0fedcac3df9bbc5bd26ce2ec2dafab990bf1a4 \
                        size    279491
} elseif {[vercmp ${php.branch} 5.4] >= 0} {
    version             2.4.1
    revision            0
    checksums           rmd160  01ce20a7b785b5eb04fd90f5be516b89e6898f80 \
                        sha256  23c8786e0f5aae67b1e5035972bfff282710fb84c483887cebceb8ef5bbdf8ef \
                        size    265542
} else {
    version             2.2.7
    revision            0
    checksums           rmd160  ad0839b7d7d9751ef0c30eddf43890809bbd7e91 \
                        sha256  4fce7fc794ccbb1dd0b961191cd0323516e216502fe7209b03711fc621642245 \
                        size    256437
}

description             php debugging extension

long_description        Xdebug is a php extension that helps you debug your \
                        scripts. It provides valuable debug information, \
                        including error stack traces and memory allocation \
                        summaries. It can generate profiling information \
                        about your php scripts, to be used for script \
                        execution analysis and optimization. It also supports \
                        debugging interactively using the dbg debug client.

extract.suffix          .tgz

if {${name} ne ${subport}} {
    configure.args      --enable-xdebug
    
    set xdebug_docs     ${homepage}/docs/
    notes "
You can get a list of the available configuration settings for xdebug\
with the following command:

    ${php} --ri xdebug

For more information and details about configuration settings, see\
${xdebug_docs}
"
}

default livecheck.type  {regex}
livecheck.url           ${homepage}/updates.php
livecheck.regex         {Xdebug (\d+(\.\d+)*)<}