diff options
author | Roman I Khimov <khimov@altell.ru> | 2010-11-22 17:23:55 +0300 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-12-28 22:50:40 +0300 |
commit | 264f7ab1f41cc86d29716619d67506c85223df71 (patch) | |
tree | cda0ceeaa1ef59fc6bd4e3f97e76e2ab2fade228 /classes | |
parent | 228a1481110bf8e522baca11fef3d682648236fd (diff) | |
download | openembedded-264f7ab1f41cc86d29716619d67506c85223df71.tar.gz |
perl: fix PERLCONFIGTARGET for multimach builds, move cpan vars
Multimachine builds race staging Config_heavy-target.pl to native directory.
Solve that by changing PERLCONFIGTARGET variable semantics, now it will
contain $TARGET_SYS. Change perl patch and stage functions accordingly.
Also, move PERLCONFIGTARGET and other target-specific variable settings from
cpan to cpan-base as I think they're also useful for cpan_build and anywhere
else cpan-base is needed.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Acked-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/cpan-base.bbclass | 14 | ||||
-rw-r--r-- | classes/cpan.bbclass | 10 | ||||
-rw-r--r-- | classes/cpan_build.bbclass | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass index a04f61c340..53621edc62 100644 --- a/classes/cpan-base.bbclass +++ b/classes/cpan-base.bbclass @@ -32,11 +32,21 @@ def perl_get_libdirs(d): def is_target(d): if not bb.data.inherits_class('native', d): - return "yes" - return "no" + return bb.data.expand('${TARGET_SYS}', d) + return "" PERLLIBDIRS = "${@perl_get_libdirs(d)}" FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \ ${PERLLIBDIRS}/auto/*/*/.debug \ ${PERLLIBDIRS}/auto/*/*/*/.debug" + +# Env var which tells perl if it should use host ('') or target ('$TARGET_SYS') settings +export PERLCONFIGTARGET = "${@is_target(d)}" + +EXTRA_CPANFLAGS ?= "" + +# Env var which tells perl where the perl include files are +export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE" +export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}" +export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
\ No newline at end of file diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 24e0c6e326..b81ae9ad46 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -3,16 +3,6 @@ # inherit cpan-base -EXTRA_CPANFLAGS ?= "" - -# Env var which tells perl if it should use host (no) or target (yes) settings -export PERLCONFIGTARGET = "${@is_target(d)}" - -# Env var which tells perl where the perl include files are -export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE" -export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}" -export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}" - NATIVE_INSTALL_WORKS = "1" cpan_do_configure () { diff --git a/classes/cpan_build.bbclass b/classes/cpan_build.bbclass index d1bbc4f93e..3f52cc21cb 100644 --- a/classes/cpan_build.bbclass +++ b/classes/cpan_build.bbclass @@ -22,7 +22,7 @@ def cpan_build_deps(d): DEPENDS_prepend = "${@cpan_build_deps(d)}" cpan_build_do_configure () { - if [ ${@is_target(d)} = "yes" ]; then + if [ ${@is_target(d)} != "" ]; then # build for target . ${STAGING_LIBDIR}/perl/config.sh perl Build.PL --installdirs vendor \ @@ -44,7 +44,7 @@ cpan_build_do_compile () { } cpan_build_do_install () { - if [ ${@is_target(d)} = "yes" ]; then + if [ ${@is_target(d)} != "" ]; then perl Build install else perl Build install destdir="${WORKDIR}/image" |