blob: 4f648a60cff4cc9d25191a934ec0781e6d9f2dc6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# This is for perl modules that use the new Build.PL build system
3#
4inherit cpan-base perlnative
5
6EXTRA_CPAN_BUILD_FLAGS ?= ""
7
8# Env var which tells perl if it should use host (no) or target (yes) settings
9export PERLCONFIGTARGET = "${@is_target(d)}"
10export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
11export LD = "${CCLD}"
12
13cpan_build_do_configure () {
14 if [ "${@is_target(d)}" = "yes" ]; then
15 # build for target
16 . ${STAGING_LIBDIR}/perl/config.sh
17 fi
18
19 perl Build.PL --installdirs vendor \
20 --destdir ${D} \
21 --install_path arch="${libdir}/perl" \
22 --install_path script=${bindir} \
23 --install_path bin=${bindir} \
24 --install_path bindoc=${mandir}/man1 \
25 --install_path libdoc=${mandir}/man3 \
26 ${EXTRA_CPAN_BUILD_FLAGS}
27}
28
29cpan_build_do_compile () {
30 perl Build
31}
32
33cpan_build_do_install () {
34 perl Build install
35}
36
37EXPORT_FUNCTIONS do_configure do_compile do_install