From c741cd900b81e65d3a2b959bb3744de745ffaac4 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 20 May 2017 16:40:10 +0200 Subject: magics fixes for versions > 2.29.x (#4302) --- var/spack/repos/builtin/packages/magics/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py index f7df6ce2fe..22fb6a73c3 100644 --- a/var/spack/repos/builtin/packages/magics/package.py +++ b/var/spack/repos/builtin/packages/magics/package.py @@ -42,7 +42,7 @@ class Magics(Package): # The patch changes the hardcoded path to python in shebang to enable the # usage of the first python installation that appears in $PATH - patch('no_hardcoded_python.patch') + patch('no_hardcoded_python.patch', when='@:2.29.6') # The patch reorders includes and adds namespaces where necessary to # resolve ambiguity of invocations of isnan and isinf functions. The @@ -63,7 +63,8 @@ class Magics(Package): depends_on('python', type='build') depends_on('perl', type='build') depends_on('perl-xml-parser', type='build') - depends_on('grib-api') + depends_on('eccodes', when='@2.30.0:') + depends_on('grib-api', when='@:2.29.6') depends_on('proj') depends_on('boost') depends_on('expat') @@ -72,6 +73,7 @@ class Magics(Package): depends_on('libemos', when='+bufr') depends_on('qt', when='+metview+qt') + @when('@:2.29.6') def patch(self): filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', 'tools/xml2cc_new.pl') @@ -83,9 +85,13 @@ class Magics(Package): options.append('-DENABLE_PYTHON=OFF') options.append('-DBOOST_ROOT=%s' % spec['boost'].prefix) options.append('-DPROJ4_PATH=%s' % spec['proj'].prefix) - options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix) options.append('-DENABLE_TESTS=OFF') + if self.version >= Version('2.30.0'): + options.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix) + else: + options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix) + if '+bufr' in spec: options.append('-DENABLE_BUFR=ON') options.append('-DLIBEMOS_PATH=%s' % spec['libemos'].prefix) -- cgit v1.2.3-60-g2f50