easyblock = 'CMakeMake'

name = 'PCL'
version = '1.8.1'
versionsuffix = '-Python-2.7.14'

homepage = 'http://pointclouds.org/'
description = """The Point Cloud Library (PCL) is a standalone, large scale, open project for 2D/3D image and
 point cloud processing."""

toolchain = {'name': 'intel', 'version': '2017b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/PointCloudLibrary/pcl/archive/']
sources = [SOURCELOWER_TAR_GZ]
patches = ['PCL-%(version)s_fix-mm_alloc.patch']
checksums = [
    '5a102a2fbe2ba77c775bf92c4a5d2e3d8170be53a68c3a76cfc72434ff7b9783',  # pcl-1.8.1.tar.gz
    '97d8e3478892d14f52cba59d35af5129a47b06b122f0cad3fe1c928735f92902',  # PCL-1.8.1_fix-mm_alloc.patch
]

builddependencies = [('CMake', '3.9.5')]
dependencies = [
    ('Boost', '1.65.1'),
    ('Eigen', '3.3.4', '', True),
    ('FLANN', '1.8.4', versionsuffix),
    ('VTK', '8.0.1', versionsuffix),
    ('Qhull', '2015.2'),
]

configopts = '-DCMAKE_BUILD_TYPE=Release '

sanity_check_paths = {
    'files': [],
    'dirs': ['bin', 'include/pcl-%(version_major_minor)s/pcl', 'lib', 'share/pcl-%(version_major_minor)s'],
}

moduleclass = 'vis'
