easyblock = 'ConfigureMake'

name = 'git'
version = '2.13.1'

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

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

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

dependencies = [
    ('cURL', '7.58.0'),
    ('expat', '2.2.4'),
    ('gettext', '0.19.8.1'),
    ('Perl', '5.24.0'),
]

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'
