mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-13 05:30:02 +00:00
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>
This commit is contained in:
committed by
Martin Jansa
parent
edaa1130b6
commit
dee112a683
@@ -17,7 +17,7 @@ SRC_URI = "\
|
|||||||
|
|
||||||
S = "${WORKDIR}/git"
|
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"
|
EXTRA_AUTORECONF = "-I m4"
|
||||||
|
|
||||||
@@ -56,6 +56,12 @@ export HOST_SYS
|
|||||||
export STAGING_LIBDIR
|
export STAGING_LIBDIR
|
||||||
export STAGING_INCDIR
|
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() {
|
do_configure() {
|
||||||
#fix the pkglib problem with newer automake
|
#fix the pkglib problem with newer automake
|
||||||
#perl
|
#perl
|
||||||
@@ -71,9 +77,6 @@ do_configure() {
|
|||||||
|
|
||||||
autotools_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
|
#modify python sitepkg
|
||||||
#remove the dependency of perl-shared:Makefile
|
#remove the dependency of perl-shared:Makefile
|
||||||
#or perl-shared/Makefile will be regenerated
|
#or perl-shared/Makefile will be regenerated
|
||||||
@@ -86,13 +89,10 @@ do_configure() {
|
|||||||
#redo the perl bindings
|
#redo the perl bindings
|
||||||
(
|
(
|
||||||
cd ${S}/bindings/perl-shared;
|
cd ${S}/bindings/perl-shared;
|
||||||
perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor"
|
perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
|
||||||
INSTALLPRIVLIB="abc";
|
|
||||||
sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
|
|
||||||
|
|
||||||
cd ../../bindings/perl-piped;
|
cd ../../bindings/perl-piped;
|
||||||
perl -I${STAGING_LIBDIR}/perl/$perl_version Makefile.PL INSTALLDIRS="vendor";
|
perl Makefile.PL INSTALLDIRS="vendor";
|
||||||
sed -i -e "s| ${libdir}/perl/| ${STAGING_LIBDIR}/perl/|g" Makefile;
|
|
||||||
)
|
)
|
||||||
|
|
||||||
#change the interpreter in file
|
#change the interpreter in file
|
||||||
|
|||||||
Reference in New Issue
Block a user