easyblock = 'ConfigureMake'

name = 'MIRA'
version = '4.0.2'
versionsuffix = '-Python-2.7.11'

homepage = 'http://sourceforge.net/p/mira-assembler/wiki/Home/'
description = """MIRA is a whole genome shotgun and EST sequence assembler for Sanger, 454, Solexa (Illumina),
    IonTorrent data and PacBio (the latter at the moment only CCS and error-corrected CLR reads)."""

toolchain = {'name': 'foss', 'version': '2016a'}

sources = ['%(namelower)s-%(version)s.tar.bz2']
source_urls = [('http://sourceforge.net/projects/mira-assembler/files/MIRA/stable/', 'download')]

# don't use PAX, it might break.
tar_config_opts = True

configopts = '--with-boost-libdir=$EBROOTBOOST/lib --with-expat=$EBROOTEXPAT'

patches = ['MIRA-%(version)s-quirks.patch']

builddependencies = [('flex', '2.5.39')]
dependencies = [
    ('Boost', '1.61.0', versionsuffix),
    ('expat', '2.1.1'),
    ('zlib', '1.2.8'),
    ('gperftools', '2.5'),
]

sanity_check_paths = {
    'files': ["bin/mira"],
    'dirs': ["bin", "share"],
}

moduleclass = 'bio'
