From 509f1cc00abe1ca63f6946d69dea9a67e78ec816 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Mon, 21 Feb 2022 04:09:49 -0500 Subject: git: install keychain helper on macOS (#29090) --- var/spack/repos/builtin/packages/git/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 36545c892f..13c26823f3 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -5,7 +5,6 @@ import os import re -import sys from spack import * @@ -374,7 +373,7 @@ class Git(AutotoolsPackage): @run_after('configure') def filter_rt(self): - if sys.platform == 'darwin': + if self.spec.satisfies('platform=darwin'): # Don't link with -lrt; the system has no (and needs no) librt filter_file(r' -lrt$', '', 'Makefile') @@ -387,12 +386,20 @@ class Git(AutotoolsPackage): args.append('NO_GETTEXT=1') make(*args) + if spec.satisfies('platform=darwin'): + with working_dir('contrib/credential/osxkeychain'): + make() + def install(self, spec, prefix): args = ["install"] if '~nls' in self.spec: args.append('NO_GETTEXT=1') make(*args) + if spec.satisfies('platform=darwin'): + install('contrib/credential/osxkeychain/git-credential-osxkeychain', + join_path(prefix, "libexec", "git-core")) + @run_after('install') def install_completions(self): install_tree('contrib/completion', self.prefix.share) -- cgit v1.2.3-60-g2f50