diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index b99dc75fd1..88de1e48ac 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass @@ -274,6 +274,13 @@ fi # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc $SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" +# find out all perl scripts in $native_sysroot and modify them replacing the +# host perl with SDK perl. +for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do + $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \ + "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script +done + # change all symlinks pointing to ${SDKPATH} for l in $($SUDO_EXEC find $native_sysroot -type l); do $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l |