# -*- 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 89458 2012-01-30 14:48:47Z hum@macports.org $

PortSystem          1.0

name                bayon
version             0.1.0
categories          math textproc
maintainers         hum openmaintainer

description         a simple and fast hard-clustering tool
long_description    Bayon is a simple and fast hard-clustering tool, and supports \
                    Repeated Bisection clustering and K-means clustering.

homepage            http://code.google.com/p/bayon/
platforms           darwin
license             GPL-2.1

master_sites        googlecode:bayon
checksums           rmd160  2f0557a96e992651fb705172a6ed4b4da09209c1 \
                    sha256  1e8fc325453ea928c924bca1dcbc54fb2fde54ec90537a4ff6c6286778872b22

patchfiles          patch-classifier.diff \
                    patch-configure.diff

depends_lib         port:google-sparsehash \
                    port:google-test

variant universal {
    configure.universal_args
}

build.args          CFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
                    CPPFLAGS="-I. -I${prefix}/include" \
                    LDFLAGS="-L. -L${prefix}/lib"

test.run            yes
eval test.args      ${build.args}

post-destroot {
    set sharedir ${prefix}/share/${name}
    xinstall -d ${destroot}${sharedir}
    xinstall -m 644 -W ${worksrcpath} COPYING README ${destroot}${sharedir}
    copy ${worksrcpath}/data ${destroot}${sharedir}
}
