git: enable build without perl (#23005)
This commit is contained in:
parent
6c3bc63c1d
commit
2638ac15e0
@ -218,6 +218,8 @@ class Git(AutotoolsPackage):
|
|||||||
description='Gitk: provide Tcl/Tk in the run environment')
|
description='Gitk: provide Tcl/Tk in the run environment')
|
||||||
variant('svn', default=False,
|
variant('svn', default=False,
|
||||||
description='Provide SVN Perl dependency in run environment')
|
description='Provide SVN Perl dependency in run environment')
|
||||||
|
variant('perl', default=True,
|
||||||
|
description='Do not use Perl scripts or libraries at all')
|
||||||
|
|
||||||
depends_on('curl')
|
depends_on('curl')
|
||||||
depends_on('expat')
|
depends_on('expat')
|
||||||
@ -227,7 +229,7 @@ class Git(AutotoolsPackage):
|
|||||||
depends_on('openssl')
|
depends_on('openssl')
|
||||||
depends_on('pcre', when='@:2.13')
|
depends_on('pcre', when='@:2.13')
|
||||||
depends_on('pcre2', when='@2.14:')
|
depends_on('pcre2', when='@2.14:')
|
||||||
depends_on('perl')
|
depends_on('perl', when='+perl')
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
depends_on('openssh', type='run')
|
depends_on('openssh', type='run')
|
||||||
|
|
||||||
@ -238,6 +240,8 @@ class Git(AutotoolsPackage):
|
|||||||
depends_on('tk', type=('build', 'link'), when='+tcltk')
|
depends_on('tk', type=('build', 'link'), when='+tcltk')
|
||||||
depends_on('perl-alien-svn', type='run', when='+svn')
|
depends_on('perl-alien-svn', type='run', when='+svn')
|
||||||
|
|
||||||
|
conflicts('+svn', when='~perl')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def determine_version(cls, exe):
|
def determine_version(cls, exe):
|
||||||
output = Executable(exe)('--version', output=str, error=str)
|
output = Executable(exe)('--version', output=str, error=str)
|
||||||
@ -279,6 +283,9 @@ def setup_build_environment(self, env):
|
|||||||
env.append_flags('CFLAGS', '-I{0}'.format(
|
env.append_flags('CFLAGS', '-I{0}'.format(
|
||||||
self.spec['gettext'].prefix.include))
|
self.spec['gettext'].prefix.include))
|
||||||
|
|
||||||
|
if '~perl' in self.spec:
|
||||||
|
env.append_flags('NO_PERL', '1')
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
@ -287,10 +294,12 @@ def configure_args(self):
|
|||||||
'--with-expat={0}'.format(spec['expat'].prefix),
|
'--with-expat={0}'.format(spec['expat'].prefix),
|
||||||
'--with-iconv={0}'.format(spec['iconv'].prefix),
|
'--with-iconv={0}'.format(spec['iconv'].prefix),
|
||||||
'--with-openssl={0}'.format(spec['openssl'].prefix),
|
'--with-openssl={0}'.format(spec['openssl'].prefix),
|
||||||
'--with-perl={0}'.format(spec['perl'].command.path),
|
|
||||||
'--with-zlib={0}'.format(spec['zlib'].prefix),
|
'--with-zlib={0}'.format(spec['zlib'].prefix),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if '+perl' in self.spec:
|
||||||
|
configure_args.append('--with-perl={0}'.format(spec['perl'].command.path))
|
||||||
|
|
||||||
if '^pcre' in self.spec:
|
if '^pcre' in self.spec:
|
||||||
configure_args.append('--with-libpcre={0}'.format(
|
configure_args.append('--with-libpcre={0}'.format(
|
||||||
spec['pcre'].prefix))
|
spec['pcre'].prefix))
|
||||||
|
Loading…
Reference in New Issue
Block a user