diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2017-09-28 20:51:04 +0200 |
---|---|---|
committer | Christoph Junghans <christoph.junghans@gmail.com> | 2017-09-28 12:51:04 -0600 |
commit | ac98e0978a2e4a00db86f17de3562847480a7d93 (patch) | |
tree | b2fb36cd848bd7b58d73f9f5a1d13bca97e732d5 | |
parent | 17be89c210e87a5f0d61de670fc047ec16dbb1e5 (diff) | |
download | spack-ac98e0978a2e4a00db86f17de3562847480a7d93.tar.gz spack-ac98e0978a2e4a00db86f17de3562847480a7d93.tar.bz2 spack-ac98e0978a2e4a00db86f17de3562847480a7d93.tar.xz spack-ac98e0978a2e4a00db86f17de3562847480a7d93.zip |
ncl: Add tcsh dependency (#5195)
All ncl scripts hardcode /bin/csh, so fix them up.
-rw-r--r-- | var/spack/repos/builtin/packages/ncl/package.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index 1d338bcd9c..a4ccf8bdc1 100644 --- a/var/spack/repos/builtin/packages/ncl/package.py +++ b/var/spack/repos/builtin/packages/ncl/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import glob import os import shutil import tempfile @@ -64,6 +65,7 @@ class Ncl(Package): depends_on('bison', type='build') depends_on('flex+lex') depends_on('libiconv') + depends_on('tcsh') # Also, the manual says that ncl requires zlib, but that comes as a # mandatory dependency of libpng, which is a mandatory dependency of cairo. @@ -101,6 +103,23 @@ class Ncl(Package): placement='triangle_src', when='+triangle') + def patch(self): + # Make configure scripts use Spack's tcsh + files = ['Configure'] + glob.glob('config/*') + + filter_file('^#!/bin/csh -f', '#!/usr/bin/env csh', *files) + + @run_before('install') + def filter_sbang(self): + # Filter sbang before install so Spack's sbang hook can fix it up + files = glob.glob('ncarg2d/src/bin/scripts/*') + files += glob.glob('ncarview/src/bin/scripts/*') + files += glob.glob('ni/src/scripts/*') + + csh = join_path(self.spec['tcsh'].prefix.bin, 'csh') + + filter_file('^#!/bin/csh', '#!{0}'.format(csh), *files) + def install(self, spec, prefix): if (self.compiler.fc is None) or (self.compiler.cc is None): |