Ack should depends_on('perl')
Add a depends_on('perl') and rewrite the script's `#!` line to refer to that Perl's `perl` executable.
This commit is contained in:
parent
114da813a3
commit
857a03c127
1 changed files with 6 additions and 3 deletions
|
@ -37,12 +37,15 @@ class Ack(Package):
|
||||||
|
|
||||||
version('2.14', 'e74150a1609d28a70b450ef9cc2ed56b', expand=False)
|
version('2.14', 'e74150a1609d28a70b450ef9cc2ed56b', expand=False)
|
||||||
|
|
||||||
# trust that there's a system perl for now, but perhaps someday we
|
depends_on('perl')
|
||||||
# should:
|
|
||||||
# depends_on('perl')
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
ack = 'ack-{0}-single-file'.format(self.version)
|
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"))
|
install(ack, join_path(prefix.bin, "ack"))
|
||||||
set_executable(join_path(prefix.bin, "ack"))
|
set_executable(join_path(prefix.bin, "ack"))
|
||||||
|
|
Loading…
Reference in a new issue