summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2011-07-19 08:49:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-21 10:59:18 +0100
commit27ba6fbda84041b297a798b6d35de38272e74ea6 (patch)
treeb3d65906da533b57dd40e0020e84ee078b97bdb7
parent57f771164d0936cff47f6a0dd24376ded60401b7 (diff)
downloadpoky-27ba6fbda84041b297a798b6d35de38272e74ea6.tar.gz
perl-native: Add a perl-native wrapper in the normal bindir
We need this to allow for scripts to do #!/usr/bin/env perl-native and not require an 'inherit perlnative' per user of a package. (From OE-Core rev: 48c1e10f53894e666283aac086e61444d2c1ed69) Signed-off-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.12.3.bb17
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/recipes-devtools/perl/perl-native_5.12.3.bb b/meta/recipes-devtools/perl/perl-native_5.12.3.bb
index 63f7e13e01..945ebd4ba1 100644
--- a/meta/recipes-devtools/perl/perl-native_5.12.3.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.12.3.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
4LICENSE = "Artistic|GPL" 4LICENSE = "Artistic|GPL"
5LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ 5LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
6 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" 6 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
7PR = "r3" 7PR = "r4"
8 8
9LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ 9LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
10 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" 10 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
@@ -102,3 +102,18 @@ do_install () {
102 create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/' 102 create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
103 create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/' 103 create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
104} 104}
105
106SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
107
108perl_sysroot_create_wrapper () {
109 mkdir -p ${SYSROOT_DESTDIR}${bindir}
110 # Create a wrapper that /usr/bin/env perl will use to get perl-native.
111 # This MUST live in the normal bindir.
112 cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF
113#!/bin/sh
114realpath=\`readlink -fn \$0\`
115exec \`dirname \$realpath\`/perl-native/perl "\$@"
116EOF
117 chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl
118 cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl
119}