git: install keychain helper on macOS (#29090)
This commit is contained in:
parent
7459aa6c95
commit
509f1cc00a
1 changed files with 9 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue