##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA
# Authors::   Fotis Georgatos <fotis@cern.ch>
# License::   MIT/GPL
# $Id$
##
easyblock = 'ConfigureMake'

name = 'ccache'
version = '3.3.4'
versionsuffix = '-f90'

homepage = 'http://ccache.samba.org/'
description = "Cache for C/C++ compilers"

toolchain = {'name': 'dummy', 'version': ''}
toolchainopts = {'static': True}

source_urls = ['https://github.com/ccache/ccache/archive/']
sources = ['v%(version)s.tar.gz']
patches = ['ccache-%(version)s_f90.patch']
checksums = [
    'e7d789e3c0990aa12e17bb25fef1b7ef749e361d0dfb9205a5b7df15bdf0a3f7',  # v3.3.4.tar.gz
    'c8ba2f0574c85c58b7ea4d8105e5fae5a152ec87b974c2938733d2fa425e6d33',  # ccache-3.3.4_f90.patch
]

builddependencies = [
    ('Autotools', '20150215'),
    ('zlib', '1.2.11'),
]

preconfigopts = "./autogen.sh && "
buildopts = 'LDFLAGS="-static"'

sanity_check_paths = {
    'files': ['bin/ccache'],
    'dirs': []
}

moduleclass = 'tools'
