diff options
| author | Jackie Huang <jackie.huang@windriver.com> | 2014-11-11 04:50:05 -0500 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-11-24 11:59:48 +0100 |
| commit | dee112a683cb68fece39c05a8b7d6b219d5b52b0 (patch) | |
| tree | e70bce499714c41bc4a5e69c7068e44213348703 | |
| parent | edaa1130b6e7b2f55965e119e042f1311e43e6c8 (diff) | |
| download | meta-openembedded-dee112a683cb68fece39c05a8b7d6b219d5b52b0.tar.gz | |
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@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/rrdtool/rrdtool_1.4.8.bb | 18 |
1 files 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 449a923489..b901f2eb82 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 = "\ | |||
| 17 | 17 | ||
| 18 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 19 | 19 | ||
| 20 | inherit autotools-brokensep gettext pythonnative perlnative python-dir | 20 | inherit autotools-brokensep gettext pythonnative perlnative python-dir cpan-base |
| 21 | 21 | ||
| 22 | EXTRA_AUTORECONF = "-I m4" | 22 | EXTRA_AUTORECONF = "-I m4" |
| 23 | 23 | ||
| @@ -56,6 +56,12 @@ export HOST_SYS | |||
| 56 | export STAGING_LIBDIR | 56 | export STAGING_LIBDIR |
| 57 | export STAGING_INCDIR | 57 | export STAGING_INCDIR |
| 58 | 58 | ||
| 59 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
| 60 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
| 61 | export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE" | ||
| 62 | export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
| 63 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
| 64 | |||
| 59 | do_configure() { | 65 | do_configure() { |
| 60 | #fix the pkglib problem with newer automake | 66 | #fix the pkglib problem with newer automake |
| 61 | #perl | 67 | #perl |
| @@ -71,9 +77,6 @@ do_configure() { | |||
| 71 | 77 | ||
| 72 | autotools_do_configure | 78 | autotools_do_configure |
| 73 | 79 | ||
| 74 | perl_version=`perl -v 2>/dev/null | \ | ||
| 75 | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'` | ||
| 76 | |||
| 77 | #modify python sitepkg | 80 | #modify python sitepkg |
| 78 | #remove the dependency of perl-shared:Makefile | 81 | #remove the dependency of perl-shared:Makefile |
| 79 | #or perl-shared/Makefile will be regenerated | 82 | #or perl-shared/Makefile will be regenerated |
| @@ -86,13 +89,10 @@ do_configure() { | |||
| 86 | #redo the perl bindings | 89 | #redo the perl bindings |
| 87 | ( | 90 | ( |
| 88 | cd ${S}/bindings/perl-shared; | 91 | cd ${S}/bindings/perl-shared; |
| 89 | perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor" | 92 | perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc"; |
| 90 | INSTALLPRIVLIB="abc"; | ||
| 91 | sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile; | ||
| 92 | 93 | ||
| 93 | cd ../../bindings/perl-piped; | 94 | cd ../../bindings/perl-piped; |
| 94 | perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"; | 95 | perl Makefile.PL INSTALLDIRS="vendor"; |
| 95 | sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile; | ||
| 96 | ) | 96 | ) |
| 97 | 97 | ||
| 98 | #change the interpreter in file | 98 | #change the interpreter in file |
