# -*- 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
# $Id: Portfile 115158 2013-12-27 08:29:57Z hum@macports.org $

PortSystem          1.0

# '-ml' stands for Machine Learning, which is appended in order to avoid conflict with devel/opal.
# See http://lists.macosforge.org/pipermail/macports-dev/2012-January/017429.html and #32884.
name                opal-ml
version             2013-12-25
epoch               1
categories          math
maintainers         hum openmaintainer

description         C++ header library of online learning with kernel slicing
long_description    Opal is a ${description}.

homepage            http://www.tkl.iis.u-tokyo.ac.jp/~ynaga/opal/
platforms           darwin
license             {GPL-2 LGPL-2.1}

master_sites        ${homepage}
checksums           rmd160  c06667a7bb188870ecdf9e23c169e6ae67fbbb2d \
                    sha256  52692cbb50d0f0c53f56fc90f79a4a6b275c0c680107f8c001f21d49f39b0740

distname            opal-${version}

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS COPYING GPL LGPL README \
        ${destroot}${docdir}
    set exroot ${prefix}/share/examples
    xinstall -d ${destroot}${exroot}
    copy ${worksrcpath}/test ${destroot}${exroot}/${name}
}

variant multiclass description {Add a multi-class classifier} {
    configure.args-append  --enable-multi
}
    
default_variants    +multiclass

livecheck.type      regex
livecheck.regex     "opal-(\\d+(?:\\-\\d+)*)${extract.suffix}"
