From 1d80a879960191ad82cb8d78b58ef58d04537b2b Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Fri, 26 May 2017 20:08:40 -0700 Subject: Fix mummerplot when ^perl@5.20: (#4348) * Fix mummerplot when ^perl@5.20: Calling defined() on a hash has been deprecated for ages. It became an error in perl@5.20. If we're building with a perl where it's illegal, we should fix it. * Simplify call to filter_file Treat the first arg to filter_file as a string rather than a regex, so that we don't have to figure out the escapes. * Patch mummerplot for *any* perl version. --- var/spack/repos/builtin/packages/mummer/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/mummer/package.py b/var/spack/repos/builtin/packages/mummer/package.py index 222aab54b7..b8cd61531c 100644 --- a/var/spack/repos/builtin/packages/mummer/package.py +++ b/var/spack/repos/builtin/packages/mummer/package.py @@ -39,6 +39,14 @@ class Mummer(Package): patch('Makefile.patch') patch('scripts-Makefile.patch') + def patch(self): + """Fix mummerplot's use of defined on hashes (deprecated + since perl@5.10, made illegal in perl@5.20.""" + + kwargs = {'string': True} + filter_file('defined (%', '(%', 'scripts/mummerplot.pl', + **kwargs) + def install(self, spec, prefix): if self.run_tests: make('check') -- cgit v1.2.3-60-g2f50