# -*- mode: python; -*-
# EasyBuild reciPY for gflags as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2017 UL HPC
# Authors::   UL HPC Team <hpc-sysadmins@uni.lu>
# License::   MIT/GPL
#

easyblock = 'CMakeMake'

name = 'gflags'
version = '2.2.1'

homepage = 'https://github.com/gflags/gflags'
description = """
The gflags package contains a C++ library that implements commandline flags
processing.  It includes built-in support for standard types such as string
and the ability to define flags in the source file in which they are used.
"""

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

source_urls = ['https://github.com/gflags/gflags/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['ae27cdbcd6a2f935baa78e4f21f675649271634c092b1be01469440495609d0e']

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

configopts = '-DBUILD_SHARED_LIBS=on -DBUILD_STATIC_LIBS=on'

sanity_check_paths = {
    'files': ['bin/gflags_completions.sh'] +
             ['lib/%s' % x for x in ['libgflags.%s' % SHLIB_EXT, 'libgflags_nothreads.%s' % SHLIB_EXT,
                                     'libgflags.a', 'libgflags_nothreads.a']] +
             ['include/gflags/gflags_completions.h'],
    'dirs': [],
}

moduleclass = 'devel'
