summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorharalmha <47558670+haralmha@users.noreply.github.com>2022-03-18 13:52:05 +0100
committerGitHub <noreply@github.com>2022-03-18 08:52:05 -0400
commit56ba61c52fe9ce1f9323817e9199da3339722089 (patch)
treef17dc23cd7bb4efdc96c961ceb2f5f313fd32091 /var
parentdd67f46c6bae542822440722dcd121bd5e5f5f32 (diff)
downloadspack-56ba61c52fe9ce1f9323817e9199da3339722089.tar.gz
spack-56ba61c52fe9ce1f9323817e9199da3339722089.tar.bz2
spack-56ba61c52fe9ce1f9323817e9199da3339722089.tar.xz
spack-56ba61c52fe9ce1f9323817e9199da3339722089.zip
hepmcanalysis: propagate cxxstd from root (#29512)
* Use same cxx value as root * Remove pointer syntax from non-pointer type in source * Run patch function before build * Use raw string in filter_file and merge edit function with patch * Escape parentheses * Use gDirectory from ROOT instead of CurrentDirectory function
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hepmcanalysis/package.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/hepmcanalysis/package.py b/var/spack/repos/builtin/packages/hepmcanalysis/package.py
index 860c6c71bc..168316f894 100644
--- a/var/spack/repos/builtin/packages/hepmcanalysis/package.py
+++ b/var/spack/repos/builtin/packages/hepmcanalysis/package.py
@@ -22,17 +22,14 @@ class Hepmcanalysis(MakefilePackage):
depends_on('root')
depends_on('clhep')
- variant('cxxstd',
- default='11',
- values=('11', '14', '17'),
- multi=False,
- description='Use the specified C++ standard when building.')
-
patch('lcg.patch')
- def edit(self, spec, prefix):
+ def patch(self):
+ filter_file(r"TDirectory::CurrentDirectory\(\)",
+ r"gDirectory",
+ "src/baseAnalysis.cc")
filter_file(r"CXXFLAGS(.*)", r"CXXFLAGS\1 -std=c++" +
- self.spec.variants['cxxstd'].value, "config.mk")
+ self.spec['root'].variants['cxxstd'].value, "config.mk")
def setup_build_environment(self, env):
env.set("HepMCdir", self.spec['hepmc'].prefix)