# -*- 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-svm
categories-append       math
platforms               darwin
maintainers             {ryandesign @ryandesign} openmaintainer
license                 BSD

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

if {[vercmp ${php.branch} 7.0] >= 0} {
    version             0.2.3
    revision            0
    checksums           rmd160  0df66ac9fb15b82efbf8de56439aabc7cfca4e69 \
                        sha256  80cf414942cc558a6934d0a508f056daaaa7399df5bd8dc556bff5ee1ebf5c9a \
                        size    130776
} elseif {[vercmp ${php.branch} 5.2] >= 0} {
    version             0.1.9
    # Rebuild with php55 @5.5.0alpha2
    if {[vercmp ${php.branch} 5.5] == 0} {
        revision        1
    } else {
        revision        0
    }
    checksums           rmd160  174f667f56c051bf29f3e36766d92b68012b976b \
                        sha256  28c0eda03b47fb79a7a584143e8fb539fd796aacbcb11dc8dcc7b66d42cd007f \
                        size    111685
}

description             PHP bindings for libsvm, a support vector machine implementation

long_description        ${description}

test.run                yes

if {${name} ne ${subport}} {
    depends_lib-append      port:libsvm
    
    configure.args-append   --with-svm=${prefix}
}