git: install keychain helper on macOS (#29090)

This commit is contained in:
Seth R. Johnson 2022-02-21 04:09:49 -05:00 committed by GitHub
parent 7459aa6c95
commit 509f1cc00a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,6 @@
import os
import re
import sys
from spack import *
@ -374,7 +373,7 @@ def configure_args(self):
@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 @@ def build(self, spec, prefix):
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)