diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/git/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/git/package.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index d356b5f8ae..5bbfb8c18e 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) @@ -196,6 +196,8 @@ class Git(AutotoolsPackage): variant('tcltk', default=False, description='Gitk: provide Tcl/Tk in the run environment') + variant('svn', default=False, + description='Provide SVN Perl dependency in run environment') depends_on('curl') depends_on('expat') @@ -214,6 +216,7 @@ class Git(AutotoolsPackage): 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') @classmethod def determine_version(cls, exe): @@ -250,8 +253,9 @@ class Git(AutotoolsPackage): # In that case the node in the DAG gets truncated and git DOES NOT # have a gettext dependency. if 'gettext' in self.spec: - env.append_flags('EXTLIBS', '-L{0} -lintl'.format( - self.spec['gettext'].prefix.lib)) + if 'intl' in self.spec['gettext'].libs.names: + env.append_flags('EXTLIBS', '-L{0} -lintl'.format( + self.spec['gettext'].prefix.lib)) env.append_flags('CFLAGS', '-I{0}'.format( self.spec['gettext'].prefix.include)) @@ -302,3 +306,14 @@ class Git(AutotoolsPackage): install_tree('man1', prefix.share.man.man1) install_tree('man5', prefix.share.man.man5) install_tree('man7', prefix.share.man.man7) + + def setup_run_environment(self, env): + # Setup run environment if using SVN extension + # Libs from perl-alien-svn and apr-util are required in + # LD_LIBRARY_PATH + # TODO: extend to other platforms + if "+svn platform=linux" in self.spec: + perl_svn = self.spec['perl-alien-svn'] + env.prepend_path('LD_LIBRARY_PATH', join_path( + perl_svn.prefix, 'lib', 'perl5', 'x86_64-linux-thread-multi', + 'Alien', 'SVN')) |