cpan.bbclass: Perform more mangling for perl path
authorTom Rini <tom_rini@mentor.com>
Thu, 6 Jan 2011 16:45:33 +0000 (09:45 -0700)
committerTom Rini <tom_rini@mentor.com>
Thu, 6 Jan 2011 16:56:09 +0000 (09:56 -0700)
On hosts where we may already be past the #! limit this is required
and this is safe on the target as well.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/cpan.bbclass

index 1a3ea15..b522423 100644 (file)
@@ -28,6 +28,9 @@ cpan_do_compile () {
 
 cpan_do_install () {
        oe_runmake DESTDIR="${D}" install_vendor
+       for PERLSCRIPT in `grep -rIl '#!${bindir}/perl' ${D}`; do
+               sed -i -e 's|^#!${bindir}/perl|#!/usr/bin/env perl|' $PERLSCRIPT
+       done
 }
 
 EXPORT_FUNCTIONS do_configure do_compile do_install