# -*- 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 101902 2013-01-21 14:44:49Z hum@macports.org $

PortSystem          1.0

name                pecco
version             2013-01-21
epoch               1
categories          math
maintainers         hum openmaintainer

description         simple C++ library for linear classification with conjunctive features
long_description    ${name} is a ${description}.

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

master_sites        ${homepage}
checksums           rmd160  0287b17c074994e027af07f42c2b22d0d0b3b876 \
                    sha256  983b1293907aaf39a764ace0d1a6d391264ab856a936c8bf6288f94766fc3e07

post-destroot {
    set doc_dir ${destroot}${prefix}/share/doc/${name}
    file mkdir ${doc_dir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS COPYING GPL LGPL README \
        ${doc_dir}
    copy ${worksrcpath}/test ${destroot}${prefix}/share/${name}
}

variant dartsclone description {Use darts-clone} {
    depends_build-append       port:darts-clone
    configure.args-append      --with-trie-impl=darts-clone
}

variant float description {Use float as the type of weights} {
    configure.args-append      --enable-float
}

variant trie description {Encode weights into a trie in kernel_model} {
    configure.args-append      --enable-abuse-trie
}

default_variants    +dartsclone
    
livecheck.type      regex
livecheck.regex     ${name}-(\\d+-\\d+-\\d+)\\.
