pkgconfig: add spack external find support (#16690)
This commit is contained in:
parent
c18167d01f
commit
512ef506a7
@ -27,6 +27,20 @@ class PkgConfig(AutotoolsPackage):
|
|||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
|
executables = ['^pkg-config$']
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_version(cls, exe):
|
||||||
|
exe = Executable(exe)
|
||||||
|
|
||||||
|
# Make sure this is actually pkg-config, not pkgconf
|
||||||
|
if 'usage: pkgconf' in exe('--help', output=str, error=str):
|
||||||
|
return None
|
||||||
|
|
||||||
|
version = exe('--version', output=str, error=str).rstrip()
|
||||||
|
|
||||||
|
return version
|
||||||
|
|
||||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||||
"""Adds the ACLOCAL path for autotools."""
|
"""Adds the ACLOCAL path for autotools."""
|
||||||
env.append_path('ACLOCAL_PATH', self.prefix.share.aclocal)
|
env.append_path('ACLOCAL_PATH', self.prefix.share.aclocal)
|
||||||
|
@ -31,6 +31,20 @@ class Pkgconf(AutotoolsPackage):
|
|||||||
# TODO: Add a package for the kyua testing framework
|
# TODO: Add a package for the kyua testing framework
|
||||||
# depends_on('kyua', type='test')
|
# depends_on('kyua', type='test')
|
||||||
|
|
||||||
|
executables = ['^pkgconf$', '^pkg-config$']
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_version(cls, exe):
|
||||||
|
exe = Executable(exe)
|
||||||
|
|
||||||
|
# Make sure this is actually pkgconf, not pkg-config
|
||||||
|
if 'usage: pkgconf' not in exe('--help', output=str, error=str):
|
||||||
|
return None
|
||||||
|
|
||||||
|
version = exe('--version', output=str, error=str).rstrip()
|
||||||
|
|
||||||
|
return version
|
||||||
|
|
||||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||||
"""Adds the ACLOCAL path for autotools."""
|
"""Adds the ACLOCAL path for autotools."""
|
||||||
env.append_path('ACLOCAL_PATH', self.prefix.share.aclocal)
|
env.append_path('ACLOCAL_PATH', self.prefix.share.aclocal)
|
||||||
|
Loading…
Reference in New Issue
Block a user