2 # This is for perl modules that use the new Build.PL build system
6 INHIBIT_NATIVE_STAGE_INSTALL = "1"
9 # We also need to have built libmodule-build-perl-native for
10 # everything except libmodule-build-perl-native itself (which uses
11 # this class, but uses itself as the provider of
12 # libmodule-build-perl)
14 def cpan_build_dep_prepend(d):
16 if bb.data.getVar('CPAN_BUILD_DEPS', d, 1):
18 pn = bb.data.getVar('PN', d, 1)
19 if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
21 return 'libmodule-build-perl-native '
23 DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
25 cpan_build_do_configure () {
26 if [ ${@is_target(d)} == "yes" ]; then
28 . ${STAGING_DIR_TARGET}/perl/config.sh
29 if [ "${IS_NEW_PERL}" = "yes" ]; then
30 perl Build.PL --installdirs vendor \
32 --install_path lib="${datadir}/perl5" \
33 --install_path arch="${libdir}/perl5" \
34 --install_path script=${bindir} \
35 --install_path bin=${bindir} \
36 --install_path bindoc=${mandir}/man1 \
37 --install_path libdoc=${mandir}/man3
39 perl Build.PL --installdirs vendor \
41 --install_path lib="${libdir}/perl5/site_perl/${version}" \
42 --install_path arch="${libdir}/perl5/site_perl/${version}/${TARGET_SYS}" \
43 --install_path script=${bindir} \
44 --install_path bin=${bindir} \
45 --install_path bindoc=${mandir}/man1 \
46 --install_path libdoc=${mandir}/man3
50 perl Build.PL --installdirs site
54 cpan_build_do_compile () {
58 cpan_build_do_install () {
59 if [ ${@is_target(d)} == "yes" ]; then
65 if [ ${@is_target(d)} == "no" ]; then
70 EXPORT_FUNCTIONS do_configure do_compile do_install