[oe-commits] Jackie Huang : rrdtool: inherit cpan-base to help build perl modules

git at git.openembedded.org git at git.openembedded.org
Mon Dec 29 09:11:28 UTC 2014


Module: meta-openembedded.git
Branch: dizzy-next
Commit: a88ed1d7a836b21c5af7320f95d72249e3ca2fcc
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=a88ed1d7a836b21c5af7320f95d72249e3ca2fcc

Author: Jackie Huang <jackie.huang at windriver.com>
Date:   Tue Nov 11 04:50:05 2014 -0500

rrdtool: inherit cpan-base to help build perl modules

It's incorrect to use -I for nativeperl to specify @INC/#include
directory to target build perl, which cause error like:
| temp/do_configure/run.do_configure.20749: line 112: 20256 Illegal instruction (core dumped)
| perl -I/path/to/tmp/sysroots/intel-haswell-64/usr/lib64/perl/$perl_version Makefile.PL

Inherit cpan-base and set related env vars to fix this and
avoid using sed to hack Makefile when build perl modules.

Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>

---

 meta-oe/recipes-extended/rrdtool/rrdtool_1.4.8.bb | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.8.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.8.bb
index 449a923..b901f2e 100644
--- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.8.bb
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.8.bb
@@ -17,7 +17,7 @@ SRC_URI = "\
 
 S = "${WORKDIR}/git"
 
-inherit autotools-brokensep gettext pythonnative perlnative python-dir
+inherit autotools-brokensep gettext pythonnative perlnative python-dir cpan-base
 
 EXTRA_AUTORECONF = "-I m4"
 
@@ -56,6 +56,12 @@ export HOST_SYS
 export STAGING_LIBDIR
 export STAGING_INCDIR
 
+# Env var which tells perl if it should use host (no) or target (yes) settings
+export PERLCONFIGTARGET = "${@is_target(d)}"
+export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
+export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+
 do_configure() {
 	#fix the pkglib problem with newer automake
 	#perl
@@ -71,9 +77,6 @@ do_configure() {
 
 	autotools_do_configure
 
-	perl_version=`perl -v 2>/dev/null | \
-	    sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
-
 	#modify python sitepkg
 	#remove the dependency of perl-shared:Makefile
 	#or perl-shared/Makefile will be regenerated
@@ -86,13 +89,10 @@ do_configure() {
 	#redo the perl bindings
 	(
 	cd ${S}/bindings/perl-shared;
-	perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"
-	    INSTALLPRIVLIB="abc";
-	sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
+	perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
 
 	cd ../../bindings/perl-piped;
-	perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor";
-	sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
+	perl Makefile.PL INSTALLDIRS="vendor";
 	)
 
 	#change the interpreter in file



More information about the Openembedded-commits mailing list