diff options
author | G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> | 2020-04-03 16:48:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 15:48:44 -0500 |
commit | bf8fea1d53a34214b9ecec1298af011b7d58f74f (patch) | |
tree | b497c0fe4fac84b66b988944e09f2738559cc275 | |
parent | 4173c2786832b2eec57c4098668586d0e8985db4 (diff) | |
download | spack-bf8fea1d53a34214b9ecec1298af011b7d58f74f.tar.gz spack-bf8fea1d53a34214b9ecec1298af011b7d58f74f.tar.bz2 spack-bf8fea1d53a34214b9ecec1298af011b7d58f74f.tar.xz spack-bf8fea1d53a34214b9ecec1298af011b7d58f74f.zip |
Added support for new config process for papi@6:+lmsensors (#15858)
* Added support for new configuration process of lmsensors component for papi@6:
* Removed extraneous blank lines
-rw-r--r-- | var/spack/repos/builtin/packages/papi/package.py | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index f82f319fa0..7ec1217640 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -46,15 +46,24 @@ class Papi(Package): # https://bitbucket.org/icl/papi/issues/46/cannot-compile-on-arch-linux patch('https://bitbucket.org/icl/papi/commits/53de184a162b8a7edff48fed01a15980664e15b1/raw', sha256='64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8', when='@5.4.0:5.6.99%gcc@8:') + def setup_build_environment(self, env): + if '+lmsensors' in self.spec and self.version >= Version('6'): + env.set('PAPI_LMSENSORS_ROOT', self.spec['lm-sensors'].prefix) + + def setup_run_environment(self, env): + if '+lmsensors' in self.spec and self.version >= Version('6'): + env.set('PAPI_LMSENSORS_ROOT', self.spec['lm-sensors'].prefix) + def install(self, spec, prefix): if '+lmsensors' in spec: - with working_dir("src/components/lmsensors"): - configure_args = [ - "--with-sensors_incdir=%s/sensors" % - spec['lm-sensors'].headers.directories[0], - "--with-sensors_libdir=%s" % - spec['lm-sensors'].libs.directories[0]] - configure(*configure_args) + if self.version < Version('6'): + with working_dir("src/components/lmsensors"): + configure_args = [ + "--with-sensors_incdir=%s/sensors" % + spec['lm-sensors'].headers.directories[0], + "--with-sensors_libdir=%s" % + spec['lm-sensors'].libs.directories[0]] + configure(*configure_args) with working_dir("src"): configure_args = ["--prefix=%s" % prefix] |