easyblock = 'ConfigureMake'

name = 'git'
version = '2.12.0'

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': 'dummy', 'version': ''}

source_urls = ['https://www.kernel.org/pub/software/scm/git/']
sources = ['%(name)s-%(version)s.tar.gz']

builddependencies = [
    ('Autoconf', '2.69')
]

dependencies = [
    ('cURL', '7.53.1'),
    ('expat', '2.1.0'),
    ('gettext','0.19.8'),
    ('Perl', '5.20.2', '-bare'),
]

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'
