2007-05-30 09:32:36 +00:00
|
|
|
#
|
|
|
|
# This is for perl modules that use the new Build.PL build system
|
|
|
|
#
|
2013-01-19 23:48:13 +00:00
|
|
|
inherit cpan-base perlnative
|
|
|
|
|
2014-08-27 14:21:21 +00:00
|
|
|
EXTRA_CPAN_BUILD_FLAGS ?= ""
|
|
|
|
|
2013-01-19 23:48:13 +00:00
|
|
|
# Env var which tells perl if it should use host (no) or target (yes) settings
|
|
|
|
export PERLCONFIGTARGET = "${@is_target(d)}"
|
|
|
|
export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
|
|
|
|
export LD = "${CCLD}"
|
2007-05-30 09:32:36 +00:00
|
|
|
|
|
|
|
cpan_build_do_configure () {
|
2013-01-19 23:31:37 +00:00
|
|
|
if [ "${@is_target(d)}" = "yes" ]; then
|
2007-05-30 09:32:36 +00:00
|
|
|
# build for target
|
2009-11-16 10:56:17 +00:00
|
|
|
. ${STAGING_LIBDIR}/perl/config.sh
|
2012-09-25 21:33:01 +00:00
|
|
|
fi
|
2009-11-18 20:05:55 +00:00
|
|
|
|
2012-09-25 21:33:01 +00:00
|
|
|
perl Build.PL --installdirs vendor \
|
2007-05-30 09:32:36 +00:00
|
|
|
--destdir ${D} \
|
2010-12-30 20:27:54 +00:00
|
|
|
--install_path arch="${libdir}/perl" \
|
2007-05-30 09:32:36 +00:00
|
|
|
--install_path script=${bindir} \
|
|
|
|
--install_path bin=${bindir} \
|
|
|
|
--install_path bindoc=${mandir}/man1 \
|
2014-08-27 14:21:21 +00:00
|
|
|
--install_path libdoc=${mandir}/man3 \
|
|
|
|
${EXTRA_CPAN_BUILD_FLAGS}
|
2007-05-30 09:32:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cpan_build_do_compile () {
|
|
|
|
perl Build
|
|
|
|
}
|
|
|
|
|
|
|
|
cpan_build_do_install () {
|
2009-11-18 20:05:55 +00:00
|
|
|
perl Build install
|
2007-05-30 09:32:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
EXPORT_FUNCTIONS do_configure do_compile do_install
|