xgxperf: Updated to SRCREV 75
[openembedded.git] / classes / cpan.bbclass
blob24e0c6e32690a9afb365eb457c6f951f8fe08737
2 # This is for perl modules that use the old Makefile.PL build system
4 inherit cpan-base
6 EXTRA_CPANFLAGS ?= ""
8 # Env var which tells perl if it should use host (no) or target (yes) settings
9 export PERLCONFIGTARGET = "${@is_target(d)}"
11 # Env var which tells perl where the perl include files are
12 export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE"
13 export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}"
14 export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
16 NATIVE_INSTALL_WORKS = "1"
18 cpan_do_configure () {
19         yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
20         if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
21                 . ${STAGING_LIBDIR}/perl/config.sh
22                 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
23                         -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
24                         -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \
25                         -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \
26                         -e "s:\(LDDLFLAGS.*\)${STAGING_LIBDIR_NATIVE}:\1${STAGING_LIBDIR}:" \
27                         Makefile
28         fi
31 cpan_do_compile () {
32         oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
35 cpan_do_install () {
36         oe_runmake DESTDIR="${D}" install_vendor
39 EXPORT_FUNCTIONS do_configure do_compile do_install