summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Calori <l.calori@cineca.it>2017-06-14 20:24:01 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2017-06-14 13:24:01 -0500
commitdaa5cf7e73d34b89cbc223d9477f32a77d0b0e9f (patch)
tree26e482dda5f93f756ba71b764e85f69f3730db9b
parent1ec3c14d23199222b617fac7c672f11f2e2c8bd9 (diff)
downloadspack-daa5cf7e73d34b89cbc223d9477f32a77d0b0e9f.tar.gz
spack-daa5cf7e73d34b89cbc223d9477f32a77d0b0e9f.tar.bz2
spack-daa5cf7e73d34b89cbc223d9477f32a77d0b0e9f.tar.xz
spack-daa5cf7e73d34b89cbc223d9477f32a77d0b0e9f.zip
fix intltool_sbang issue #4191 (#4192)
* fix intltool_sbang issue #4191 * add per dep even if already depending on perl-xml-parser * adding more comment, properly spaced
-rwxr-xr-xbin/sbang15
-rw-r--r--var/spack/repos/builtin/packages/intltool/package.py3
2 files changed, 13 insertions, 5 deletions
diff --git a/bin/sbang b/bin/sbang
index e71074b330..ed54f7dad7 100755
--- a/bin/sbang
+++ b/bin/sbang
@@ -109,13 +109,20 @@ while read line && ((lines < 2)) ; do
fi
lines=$((lines+1))
done < "$script"
+# this is ineeded for scripts with sbang parameter
+# like ones in intltool
+# #!/<spack-long-path>/perl -w
+# this is the interpreter line with all the parameters as a vector
+interpreter_v=(${interpreter})
+# this is the single interpreter path
+interpreter_f="${interpreter_v[0]}"
# Invoke any interpreter found, or raise an error if none was found.
-if [[ -n "$interpreter" ]]; then
- if [[ "${interpreter##*/}" = "perl" ]]; then
- exec $interpreter -x "$@"
+if [[ -n "$interpreter_f" ]]; then
+ if [[ "${interpreter_f##*/}" = "perl" ]]; then
+ exec $interpreter_v -x "$@"
else
- exec $interpreter "$@"
+ exec $interpreter_v "$@"
fi
else
echo "error: sbang found no interpreter in $script"
diff --git a/var/spack/repos/builtin/packages/intltool/package.py b/var/spack/repos/builtin/packages/intltool/package.py
index 0007326eba..a9e3a8a062 100644
--- a/var/spack/repos/builtin/packages/intltool/package.py
+++ b/var/spack/repos/builtin/packages/intltool/package.py
@@ -36,7 +36,8 @@ class Intltool(AutotoolsPackage):
version('0.51.0', '12e517cac2b57a0121cda351570f1e63')
# requires XML::Parser perl module
- # depends_on('perl@5.8.1:', type='build')
+ depends_on('perl-xml-parser', type=('build', 'run'))
+ depends_on('perl@5.8.1:', type=('build', 'run'))
def check(self):
# `make check` passes but causes `make install` to fail