easyblock = 'ConfigureMake'

name = 'QwtPolar'
version = '1.1.1'

homepage = 'http://qwtpolar.sourceforge.net/'
description = "The QwtPolar library contains classes for displaying values on a polar coordinate system."

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

source_urls = [SOURCEFORGE_SOURCE]
sources = [SOURCELOWER_TAR_BZ2]

dependencies = [
    ('Qwt', '6.1.3'),
]

skipsteps = ['configure']

prebuildopts = "sed -i 's@INSTALL_PREFIX[ ]*=.*@INSTALL_PREFIX = %(installdir)s@g' qwtpolarconfig.pri && "
prebuildopts += "sed -i 's/QwtPolarExamples//g' qwtpolarconfig.pri && "
prebuildopts += "qmake qwtpolar.pro && "

sanity_check_paths = {
    'files': ['lib/libqwtpolar.%s' % SHLIB_EXT],
    'dirs': ['doc', 'features', 'include', 'plugins'],
}

moduleclass = 'lib'
