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.
This commit is contained in:
George Hartzell 2017-05-26 20:08:40 -07:00 committed by Adam J. Stewart
parent 248fc92a45
commit 1d80a87996

View File

@ -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')