# -*- 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
description MAchine Learning for LanguagE Toolkit (MALLET)
long_description MALLET is a Java-based package for statistical natural \
language processing, document classification, clustering, \
topic modeling, information extraction, and other machine \
learning applications to text.
homepage http://mallet.cs.umass.edu/
master_sites http://mallet.cs.umass.edu/dist/
checksums rmd160 3007048a099bd5870d8566c2b6b9b691f85048ba \
sha256 5b2d6fb9bcf600b1836b09881821a6781dd45a7d3032e61d7500d027a5b34faf \
# JDK port to install if required java not found
patchfiles patch-mallet.diff
xinstall -m 0755 -d ${destroot}${prefix}/share/java
set malletdir ${prefix}/share/java/${distname}
copy ${worksrcpath}/dist ${destroot}${malletdir}
fs-traverse f ${destroot}${malletdir} {
if {[file isfile ${f}]} {
file attributes ${f} -permissions a+r
} elseif {[file isdirectory ${f}]} {
file attributes ${f} -permissions a+rx
# install the mallet command; set the malletdir variable
xinstall -m 0755 ${worksrcpath}/bin/mallet ${destroot}${prefix}/bin
reinplace "s|@MALLETDIR@|${malletdir}|" \
${destroot}${prefix}/bin/mallet
# install additional documents
set dest_doc ${destroot}${prefix}/share/doc/${name}
xinstall -m 0644 ${worksrcpath}/LICENSE ${dest_doc}
xinstall -d ${destroot}${prefix}/share/examples
set dest_ex ${destroot}${prefix}/share/examples/${name}
copy ${worksrcpath}/sample-data ${dest_ex}