easyblock = 'ConfigureMake'

name = 'YamCha'
version = '0.33'

homepage = 'http://chasen.org/~taku/software/yamcha/'
description = """YamCha (Yet Another Multipurpose CHunk Annotator) s a generic, customizable,
 and open source text chunker oriented toward a lot of NLP tasks, such as POS tagging,
 Named Entity Recognition, base NP chunking, and Text Chunking. YamCha is using a state-of-the-art
 machine learning algorithm called Support Vector Machines (SVMs)."""

toolchain = {'name': 'ictce', 'version': '5.3.0'}
toolchainopts = {'optarch': True, 'pic': True, 'opt': True}

sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://chasen.org/~taku/software/yamcha/src']

patches = [
    'mkdarts_cpp_cstdlib.patch',
    'param_cpp_cstring.patch',
]

dependencies = [('TinySVM', '0.09')]

builddependencies = [('libtool', '2.4.2')]

configopts = '--with-svm-learn=$EBROOTTINYSVM'

# YamCHA ships a very old libtool by itself
buildopts = 'LIBTOOL=libtool'

sanity_check_paths = {
    'files': ["bin/yamcha"],
    'dirs': ["libexec/yamcha"],
}

moduleclass = 'data'
