2 # This is for perl modules that use the new Build.PL build system
6 NATIVE_INSTALL_WORKS = "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_deps(d):
15 if bb.data.getVar('CPAN_BUILD_DEPS', d, 1):
17 pn = bb.data.getVar('PN', d, 1)
18 if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
20 return 'libmodule-build-perl-native '
22 DEPENDS_prepend = "${@cpan_build_deps(d)}"
24 cpan_build_do_configure () {
25 if [ ${@is_target(d)} != "" ]; then
27 . ${STAGING_LIBDIR}/perl/config.sh
28 perl Build.PL --installdirs vendor \
30 --install_path lib="${datadir}/perl5" \
31 --install_path arch="${libdir}/perl5" \
32 --install_path script=${bindir} \
33 --install_path bin=${bindir} \
34 --install_path bindoc=${mandir}/man1 \
35 --install_path libdoc=${mandir}/man3
38 perl Build.PL --installdirs site
42 cpan_build_do_compile () {
46 cpan_build_do_install () {
47 if [ ${@is_target(d)} != "" ]; then
50 perl Build install destdir="${WORKDIR}/image"
54 EXPORT_FUNCTIONS do_configure do_compile do_install