diff options
author | George Hartzell <hartzell@alerce.com> | 2016-07-25 19:06:13 -0400 |
---|---|---|
committer | George Hartzell <hartzell@alerce.com> | 2016-08-02 11:11:05 -0400 |
commit | 857a03c127236f8f3b9c697fbe8cc2870a2276cc (patch) | |
tree | 8973282b11a391b2e386ba3d405a8f0d810af90d /var | |
parent | 114da813a37ec0847376ecfb99fd4446d7dd1d7c (diff) | |
download | spack-857a03c127236f8f3b9c697fbe8cc2870a2276cc.tar.gz spack-857a03c127236f8f3b9c697fbe8cc2870a2276cc.tar.bz2 spack-857a03c127236f8f3b9c697fbe8cc2870a2276cc.tar.xz spack-857a03c127236f8f3b9c697fbe8cc2870a2276cc.zip |
Ack should depends_on('perl')
Add a depends_on('perl') and rewrite the script's `#!` line to refer to
that Perl's `perl` executable.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ack/package.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py index db07e5e246..70249aebac 100644 --- a/var/spack/repos/builtin/packages/ack/package.py +++ b/var/spack/repos/builtin/packages/ack/package.py @@ -37,12 +37,15 @@ class Ack(Package): version('2.14', 'e74150a1609d28a70b450ef9cc2ed56b', expand=False) - # trust that there's a system perl for now, but perhaps someday we - # should: - # depends_on('perl') + depends_on('perl') def install(self, spec, prefix): mkdirp(prefix.bin) ack = 'ack-{0}-single-file'.format(self.version) + + # rewrite the script's #! line to call the perl dependency + shbang = '#!' + join_path(spec['perl'].prefix.bin, 'perl') + filter_file(r'^#!/usr/bin/env perl', shbang, ack) + install(ack, join_path(prefix.bin, "ack")) set_executable(join_path(prefix.bin, "ack")) |