From 739f040fa8ce8c934c8d65b053b4a37d3796f8f9 Mon Sep 17 00:00:00 2001 From: snehring Date: Wed, 27 Apr 2022 03:11:02 -0500 Subject: bucky: fix compile errors with newer gccs (#30314) --- var/spack/repos/builtin/packages/bucky/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/bucky/package.py b/var/spack/repos/builtin/packages/bucky/package.py index 000235e7f1..015cf0257f 100644 --- a/var/spack/repos/builtin/packages/bucky/package.py +++ b/var/spack/repos/builtin/packages/bucky/package.py @@ -14,14 +14,13 @@ class Bucky(MakefilePackage): homepage = "https://www.stat.wisc.edu/~ane/bucky/index.html" url = "http://dstats.net/download/http://www.stat.wisc.edu/~ane/bucky/v1.4/bucky-1.4.4.tgz" + maintainers = ['snehring'] version('1.4.4', sha256='1621fee0d42314d9aa45d0082b358d4531e7d1d1a0089c807c1b21fbdc4e4592') # Compilation requires gcc conflicts('%cce') conflicts('%apple-clang') - conflicts('%clang') - conflicts('%intel') conflicts('%nag') conflicts('%pgi') conflicts('%xl') @@ -29,6 +28,10 @@ class Bucky(MakefilePackage): build_directory = 'src' + def edit(self, spec, prefix): + with working_dir(self.build_directory): + filter_file('g++', spack_cxx, 'makefile', string=True) + def install(self, spec, prefix): with working_dir('src'): mkdirp(prefix.bin) @@ -37,3 +40,8 @@ class Bucky(MakefilePackage): install_tree('data', prefix.data) install_tree('doc', prefix.doc) install_tree('scripts', prefix.scripts) + + def flag_handler(self, name, flags): + if self.spec.satisfies('%gcc@5:') and name.lower() == 'cxxflags': + flags.append(self.compiler.cxx98_flag) + return (flags, None, None) -- cgit v1.2.3-70-g09d2