diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-04-16 17:18:49 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-16 22:53:00 +0100 |
commit | b6cbf1e48c6ba3a0353f4ee71c43292587210ca5 (patch) | |
tree | 9949674c968a7c71cb13c4a0a8197b4125383092 | |
parent | 59348455a797f97919acc018df4067e7e59b3a96 (diff) | |
download | poky-b6cbf1e48c6ba3a0353f4ee71c43292587210ca5.tar.gz |
automake-nativesdk: fix builds on fedora 17
Generally distros keep perl at /usr/bin/perl
Fedora 17 also has /bin/perl
this causes automake-nativesdk build on such distros to put perl
interpreter path in the perl scripts as /bin/perl
But we set perl location for target as /usr/bin/perl
This mismatch of perl path causes failure of rootfs image creation
like this:
| error: Failed dependencies:
| /bin/perl is needed by automake-nativesdk-1.11.2-r2.x86_64
NOTE: package meta-toolchain-gmae-1.0-r7: task do_populate_sdk: Failed
The second sed command is for such a case:
eval 'case $# in 0) exec /bin/perl -S "$0";; *) exec /bin/perl -S "$0" "$@";; esac'
This line has two "/bin/perl" and we can't use a line number to tell
sed which line it is since the line numbers in different files are
defferent.
[YOCTO #2304]
(From OE-Core rev: ee7a86c06c2289f01aa5f1da958ce51523495572)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/automake/automake_1.11.2.bb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/meta/recipes-devtools/automake/automake_1.11.2.bb b/meta/recipes-devtools/automake/automake_1.11.2.bb index 4271336070..66589fe9af 100644 --- a/meta/recipes-devtools/automake/automake_1.11.2.bb +++ b/meta/recipes-devtools/automake/automake_1.11.2.bb | |||
@@ -34,19 +34,33 @@ PATHFIXPATCH = "file://path_prog_fixes.patch" | |||
34 | PATHFIXPATCH_virtclass-native = "" | 34 | PATHFIXPATCH_virtclass-native = "" |
35 | PATHFIXPATCH_virtclass-nativesdk = "" | 35 | PATHFIXPATCH_virtclass-nativesdk = "" |
36 | 36 | ||
37 | PERLPATH = "${bindir}/perl" | ||
38 | PERLPATH_virtclass-native = "/usr/bin/perl" | ||
39 | PERLPATH_virtclass-nativesdk = "/usr/bin/perl" | ||
40 | |||
37 | SRC_URI += "${PATHFIXPATCH} \ | 41 | SRC_URI += "${PATHFIXPATCH} \ |
38 | file://prefer-cpio-over-pax-for-ustar-archives.patch \ | 42 | file://prefer-cpio-over-pax-for-ustar-archives.patch \ |
39 | file://python-libdir.patch \ | 43 | file://python-libdir.patch \ |
40 | file://automake_1.11.2_fix_for_pkglibexec_SCRIPTS.patch \ | 44 | file://automake_1.11.2_fix_for_pkglibexec_SCRIPTS.patch \ |
41 | file://py-compile-compile-only-optimized-byte-code.patch" | 45 | file://py-compile-compile-only-optimized-byte-code.patch" |
42 | 46 | ||
43 | PR = "r2" | 47 | PR = "r3" |
44 | SRC_URI[md5sum] = "18194e804d415767bae8f703c963d456" | 48 | SRC_URI[md5sum] = "18194e804d415767bae8f703c963d456" |
45 | SRC_URI[sha256sum] = "4f46d1f9380c8a3506280750f630e9fc915cb1a435b724be56b499d016368718" | 49 | SRC_URI[sha256sum] = "4f46d1f9380c8a3506280750f630e9fc915cb1a435b724be56b499d016368718" |
46 | 50 | ||
47 | do_install () { | 51 | do_install () { |
48 | oe_runmake 'DESTDIR=${D}' install | 52 | oe_runmake 'DESTDIR=${D}' install |
49 | install -d ${D}${datadir} | 53 | install -d ${D}${datadir} |
54 | |||
55 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location | ||
56 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | ||
57 | for i in aclocal aclocal-1.11 automake automake-1.11; do | ||
58 | if [ -f ${D}${bindir}/$i ]; then | ||
59 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' \ | ||
60 | -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${PERLPATH} \1 exec ${PERLPATH} \2,' \ | ||
61 | ${D}${bindir}/$i | ||
62 | fi | ||
63 | done | ||
50 | } | 64 | } |
51 | 65 | ||
52 | BBCLASSEXTEND = "native nativesdk" | 66 | BBCLASSEXTEND = "native nativesdk" |