##
# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
#
# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA
# Authors::   Fotis Georgatos <fotis@cern.ch>
# Authors::   Dmitri Gribenko <gribozavr@gmail.com>
# License::   MIT/GPL
# $Id$
#
# This work implements a part of the HPCBIOS project and is a component of the policy:
# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-90.html
##

easyblock = 'ConfigureMake'

name = 'git'
version = '2.7.3'

homepage = 'http://git-scm.com/'
description = """Git is a free and open source distributed version control system designed
to handle everything from small to very large projects with speed and efficiency."""

toolchain = {'name': 'foss', 'version': '2015g'}

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

dependencies = [
    ('cURL', '7.37.1'),
    ('expat', '2.1.0'),
    ('gettext', '0.19.2'),
    ('Perl', '5.20.2', '-bare', ('GNU', '4.9.3-2.25')),
]

preconfigopts = 'make configure && '

# Work around git build system bug.  If LIBS contains -lpthread, then configure
# will not append -lpthread to LDFLAGS, but Makefile ignores LIBS.
configopts = "--with-perl=${EBROOTPERL}/bin/perl --enable-pthreads='-lpthread'"

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

moduleclass = 'tools'
