summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJennifer Green <jgreen@lanl.gov>2022-05-05 03:08:51 -0600
committerGitHub <noreply@github.com>2022-05-05 11:08:51 +0200
commitfd6d2265244b2b326d9c8fbe223e80595d472374 (patch)
treebf5fa264fa052846b28a5fa5451b219f3d6ee2bb /var
parentcef9245ee113ae481911d11bb12d1a384f373fe5 (diff)
downloadspack-fd6d2265244b2b326d9c8fbe223e80595d472374.tar.gz
spack-fd6d2265244b2b326d9c8fbe223e80595d472374.tar.bz2
spack-fd6d2265244b2b326d9c8fbe223e80595d472374.tar.xz
spack-fd6d2265244b2b326d9c8fbe223e80595d472374.zip
git: adding subtree support, post-install step, reordered deps (#30400)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/git/package.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index d60dd9d1bf..5f53851ed3 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -17,6 +17,7 @@ class Git(AutotoolsPackage):
homepage = "http://git-scm.com"
url = "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.12.0.tar.gz"
+ maintainers = ['jennfshr']
tags = ['build-tools']
@@ -137,7 +138,13 @@ class Git(AutotoolsPackage):
description='Enable native language support')
variant('man', default=True,
description='Install manual pages')
+ variant('subtree', default=True,
+ description='Add git-subtree command and capability')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
depends_on('curl')
depends_on('expat')
depends_on('gettext', when='+nls')
@@ -149,13 +156,8 @@ class Git(AutotoolsPackage):
depends_on('perl', when='+perl')
depends_on('zlib')
depends_on('openssh', type='run')
-
- depends_on('autoconf', type='build')
- depends_on('automake', type='build')
- depends_on('libtool', type='build')
- depends_on('m4', type='build')
- depends_on('tk', type=('build', 'link'), when='+tcltk')
depends_on('perl-alien-svn', type='run', when='+svn')
+ depends_on('tk', type=('build', 'link'), when='+tcltk')
conflicts('+svn', when='~perl')
@@ -277,6 +279,16 @@ class Git(AutotoolsPackage):
install_tree('man5', prefix.share.man.man5)
install_tree('man7', prefix.share.man.man7)
+ @run_after('install')
+ def install_subtree(self):
+ if '+subtree' in self.spec:
+ with working_dir('contrib/subtree'):
+ make_args = ['V=1', 'prefix={}'.format(self.prefix.bin)]
+ make(" ".join(make_args))
+ install_args = ['V=1', 'prefix={}'.format(self.prefix.bin), 'install']
+ make(" ".join(install_args))
+ install('git-subtree', self.prefix.bin)
+
def setup_run_environment(self, env):
# Setup run environment if using SVN extension
# Libs from perl-alien-svn and apr-util are required in