generic-poky/meta/classes/cpan_build.bbclass
Koen Kooi 0101c26742 cpan_build bbclass: do not install module into /usr/share
83796edd29 is a partial solution, this fixes cpan_build.bbclass as well.

A non-working one looks like this:
	[koen@rrmbp v2013.06]$ dpkg-deb -c deploy/eglibc/ipk/armv7ahf-vfp-neon/perl-module-build-withxspp_0.14-r0.0_armv7ahf-vfp-neon.ipk
	-rw-r--r-- root/root       361 2013-11-28 16:50 ./usr/lib/perl/auto/Module/Build/WithXSpp/.packlist
	-r--r--r-- root/root     22557 2013-11-28 16:50 ./usr/share/perl/Module/Build/WithXSpp.pm

It now looks like this:
	[koen@rrmbp v2013.06]$ dpkg-deb -c deploy/eglibc/ipk/armv7ahf-vfp-neon/perl-module-build-withxspp_0.14-r*.ipk
	-rw-r--r-- root/root       378 2013-11-29 14:44 ./usr/lib/perl/auto/Module/Build/WithXSpp/.packlist
	-r--r--r-- root/root     22557 2013-11-28 17:22 ./usr/lib/perl/vendor_perl/5.14.3/Module/Build/WithXSpp.pm

(From OE-Core rev: 1bfcbdbe15bf5a0fce4cb3acb63ae86d98d56277)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:16 +00:00

51 lines
1.3 KiB
Text

#
# This is for perl modules that use the new Build.PL build system
#
inherit cpan-base perlnative
# 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}"
#
# We also need to have built libmodule-build-perl-native for
# everything except libmodule-build-perl-native itself (which uses
# this class, but uses itself as the provider of
# libmodule-build-perl)
#
def cpan_build_dep_prepend(d):
if d.getVar('CPAN_BUILD_DEPS', True):
return ''
pn = d.getVar('PN', True)
if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
return ''
return 'libmodule-build-perl-native '
DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
cpan_build_do_configure () {
if [ "${@is_target(d)}" = "yes" ]; then
# build for target
. ${STAGING_LIBDIR}/perl/config.sh
fi
perl Build.PL --installdirs vendor \
--destdir ${D} \
--install_path arch="${libdir}/perl" \
--install_path script=${bindir} \
--install_path bin=${bindir} \
--install_path bindoc=${mandir}/man1 \
--install_path libdoc=${mandir}/man3
}
cpan_build_do_compile () {
perl Build
}
cpan_build_do_install () {
perl Build install
}
EXPORT_FUNCTIONS do_configure do_compile do_install