From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com ([143.182.124.37]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1Qjo8W-0001En-SF for openembedded-core@lists.openembedded.org; Thu, 21 Jul 2011 09:57:37 +0200 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 21 Jul 2011 00:53:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,240,1309762800"; d="scan'208";a="29787054" Received: from unknown (HELO swold-MOBL.bigsur.com) ([10.255.13.254]) by azsmga001.ch.intel.com with ESMTP; 21 Jul 2011 00:53:11 -0700 From: Saul Wold To: openembedded-core@lists.openembedded.org Date: Thu, 21 Jul 2011 00:52:52 -0700 Message-Id: X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: Subject: [CONSOLIDATED PULL 04/20] perl-native: Add a perl-native wrapper in the normal bindir X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 07:57:38 -0000 From: Tom Rini 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. Signed-off-by: Tom Rini --- meta/recipes-devtools/perl/perl-native_5.12.3.bb | 17 ++++++++++++++++- 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 63f7e13..945ebd4 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" LICENSE = "Artistic|GPL" LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" -PR = "r3" +PR = "r4" LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" @@ -102,3 +102,18 @@ do_install () { create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/' create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/' } + +SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper" + +perl_sysroot_create_wrapper () { + mkdir -p ${SYSROOT_DESTDIR}${bindir} + # Create a wrapper that /usr/bin/env perl will use to get perl-native. + # This MUST live in the normal bindir. + cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF +#!/bin/sh +realpath=\`readlink -fn \$0\` +exec \`dirname \$realpath\`/perl-native/perl "\$@" +EOF + chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl + cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl +} -- 1.7.3.4