summaryrefslogtreecommitdiff
path: root/meta/classes/cpan_build.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/cpan_build.bbclass')
-rw-r--r--meta/classes/cpan_build.bbclass37
1 files changed, 8 insertions, 29 deletions
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 63e716c09..36ffc56b8 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -3,8 +3,6 @@
#
inherit cpan-base
-INHIBIT_NATIVE_STAGE_INSTALL = "1"
-
#
# We also need to have built libmodule-build-perl-native for
# everything except libmodule-build-perl-native itself (which uses
@@ -12,10 +10,9 @@ INHIBIT_NATIVE_STAGE_INSTALL = "1"
# libmodule-build-perl)
#
def cpan_build_dep_prepend(d):
- import bb;
- if bb.data.getVar('CPAN_BUILD_DEPS', d, 1):
+ if d.getVar('CPAN_BUILD_DEPS', True):
return ''
- pn = bb.data.getVar('PN', d, 1)
+ pn = d.getVar('PN', True)
if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
return ''
return 'libmodule-build-perl-native '
@@ -25,29 +22,19 @@ DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
cpan_build_do_configure () {
if [ ${@is_target(d)} == "yes" ]; then
# build for target
- . ${STAGING_DIR}/${TARGET_SYS}/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
+ . ${STAGING_LIBDIR}/perl/config.sh
+
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 lib="${datadir}/perl" \
+ --install_path arch="${libdir}/perl" \
--install_path script=${bindir} \
--install_path bin=${bindir} \
--install_path bindoc=${mandir}/man1 \
--install_path libdoc=${mandir}/man3
- fi
else
# build for host
- perl Build.PL --installdirs site
+ perl Build.PL --installdirs site --destdir ${D}
fi
}
@@ -56,15 +43,7 @@ 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
- fi
+ perl Build install
}
EXPORT_FUNCTIONS do_configure do_compile do_install