easyblock = 'ConfigureMake'

name = 'libspatialite'
version = '4.3.0a'

homepage = "https://www.gaia-gis.it/fossil/libspatialite/home"
description = """SpatiaLite is an open source library intended to extend the SQLite core to support
 fully fledged Spatial SQL capabilities."""

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

source_urls = ['http://www.gaia-gis.it/gaia-sins/']
sources = [SOURCE_TAR_GZ]

dependencies = [
    ('FreeXL', '1.0.2'),
    ('GEOS', '3.6.1', '-Python-2.7.12'),
    ('SQLite', '3.13.0'),
    ('PROJ', '4.9.3'),
]

builddependencies = [('CMake', '3.7.1')]

configopts = '--disable-geosadvanced'

sanity_check_paths = {
    'files': ['include/spatialite.h', 'lib/libspatialite.a', 'lib/libspatialite.%s' % SHLIB_EXT],
    'dirs': ['include/spatialite'],
}

moduleclass = 'lib'
