summaryrefslogtreecommitdiff
path: root/classes/cpan_build.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/cpan_build.bbclass')
-rw-r--r--classes/cpan_build.bbclass44
1 files changed, 14 insertions, 30 deletions
diff --git a/classes/cpan_build.bbclass b/classes/cpan_build.bbclass
index c3804ff4cc..15c93fb56d 100644
--- a/classes/cpan_build.bbclass
+++ b/classes/cpan_build.bbclass
@@ -3,7 +3,7 @@
#
inherit cpan-base
-INHIBIT_NATIVE_STAGE_INSTALL = "1"
+NATIVE_INSTALL_WORKS = "1"
#
# We also need to have built libmodule-build-perl-native for
@@ -11,8 +11,7 @@ INHIBIT_NATIVE_STAGE_INSTALL = "1"
# this class, but uses itself as the provider of
# libmodule-build-perl)
#
-def cpan_build_dep_prepend(d):
- import bb;
+def cpan_build_deps(d):
if bb.data.getVar('CPAN_BUILD_DEPS', d, 1):
return ''
pn = bb.data.getVar('PN', d, 1)
@@ -20,31 +19,20 @@ def cpan_build_dep_prepend(d):
return ''
return 'libmodule-build-perl-native '
-DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
+DEPENDS_prepend = "${@cpan_build_deps(d)}"
cpan_build_do_configure () {
if [ ${@is_target(d)} == "yes" ]; then
# build for target
- . ${STAGING_DIR_TARGET}/perl/config.sh
- if [ "${IS_NEW_PERL}" = "yes" ]; then
- perl Build.PL --installdirs vendor \
- --destdir ${D} \
- --install_path lib="${datadir}/perl5" \
- --install_path arch="${libdir}/perl5" \
- --install_path script=${bindir} \
- --install_path bin=${bindir} \
- --install_path bindoc=${mandir}/man1 \
- --install_path libdoc=${mandir}/man3
- else
- perl Build.PL --installdirs vendor \
- --destdir ${D} \
- --install_path lib="${libdir}/perl5/site_perl/${version}" \
- --install_path arch="${libdir}/perl5/site_perl/${version}/${TARGET_SYS}" \
- --install_path script=${bindir} \
- --install_path bin=${bindir} \
- --install_path bindoc=${mandir}/man1 \
- --install_path libdoc=${mandir}/man3
- fi
+ . ${STAGING_LIBDIR}/perl/config.sh
+ perl Build.PL --installdirs vendor \
+ --destdir ${D} \
+ --install_path lib="${datadir}/perl5" \
+ --install_path arch="${libdir}/perl5" \
+ --install_path script=${bindir} \
+ --install_path bin=${bindir} \
+ --install_path bindoc=${mandir}/man1 \
+ --install_path libdoc=${mandir}/man3
else
# build for host
perl Build.PL --installdirs site
@@ -58,12 +46,8 @@ cpan_build_do_compile () {
cpan_build_do_install () {
if [ ${@is_target(d)} == "yes" ]; then
perl Build install
- fi
-}
-
-do_stage_append () {
- if [ ${@is_target(d)} == "no" ]; then
- perl Build install
+ else
+ perl Build install destdir="${WORKDIR}/image"
fi
}