easyblock = 'CMakeMake'

name = 'pktools'
version = '2.6.7.6'

homepage = 'http://pktools.nongnu.org/html/index.html'
description = """pktools is a suite of utilities written in C++ for image processing with a focus on remote sensing applications. 
 It relies on the Geospatial Data Abstraction Library (GDAL, http://www.gdal.org) and OGR."""

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

source_urls = ['http://download.savannah.gnu.org/releases/pktools/']
sources = ['PKTOOLS-%(version)s.tar.gz']
checksums = ['9ce79a225f3232fda91ef9df6ecd1f2b']

builddependencies = [('CMake', '3.12.1')]
dependencies = [
    ('GDAL', '2.2.3', '-Python-2.7.15'),
    ('GSL','2.5'),
    ('Armadillo', '8.400.0'),
    ('FANN', '2.2.0'),
    ('libLAS','1.8.1'),
    ('ncurses','6.1'),
]

#libfann-dev libfann-doc libgeotiff-epsg libalgorithms1 libfann2 libfileclasses1 libimageclasses1 liblas3 liblasclasses1

separate_build_dir = True

configopts = '-DBUILD_WITH_FANN=ON -DBUILD_WITH_LIBLAS=ON'

sanity_check_paths = {
    'files': ['bin/pktools-config', 'OFF/libalgorithms.a', 'OFF/libbase.a', 'OFF/libfileClasses.a', 'OFF/libimageClasses.a'],
    'dirs': [],
}

moduleclass = 'tools'
