Fix magics (#3721)

- magics requires perl and perl-xml-parser.
- xml2cc_new.pl uses /usr/bin/perl by default.
This commit is contained in:
Michael Kuhn 2017-04-06 15:11:32 +02:00 committed by Adam J. Stewart
parent 715ac8b7e6
commit 095f57409c

View File

@ -60,6 +60,8 @@ class Magics(Package):
# Currently python is only necessary to run # Currently python is only necessary to run
# building preprocessing scripts. # building preprocessing scripts.
depends_on('python', type='build') depends_on('python', type='build')
depends_on('perl', type='build')
depends_on('perl-xml-parser', type='build')
depends_on('grib-api') depends_on('grib-api')
depends_on('proj') depends_on('proj')
depends_on('boost') depends_on('boost')
@ -69,6 +71,10 @@ class Magics(Package):
depends_on('libemos', when='+bufr') depends_on('libemos', when='+bufr')
depends_on('qt', when='+metview+qt') depends_on('qt', when='+metview+qt')
def patch(self):
filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl',
'tools/xml2cc_new.pl')
def install(self, spec, prefix): def install(self, spec, prefix):
options = [] options = []
options.extend(std_cmake_args) options.extend(std_cmake_args)