change feature [ remote-keyborad -> enable-rc-kbd ]
[vuplus_openembedded] / classes / cpan.bbclass
index 5a0b4a5..66054bc 100644 (file)
@@ -10,11 +10,13 @@ export PERLCONFIGTARGET = "${@is_target(d)}"
 
 # Env var which tells perl where the perl include files are
 export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE"
+export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
 
 cpan_do_configure () {
        yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
        if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
-               . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
+               . ${STAGING_LIBDIR}/perl/config.sh
                if [ "${IS_NEW_PERL}" = "yes" ]; then
                        sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
                                -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
@@ -50,7 +52,16 @@ cpan_do_compile () {
 }
 
 cpan_do_install () {
-       oe_runmake install_vendor
+       if [ ${@is_target(d)} = "yes" ]; then
+               oe_runmake install_vendor
+       fi
+}
+
+cpan_do_stage () {
+       if [ ${@is_target(d)} = "no" ]; then
+               oe_runmake install_vendor
+       fi
 }
+                                                               
 
-EXPORT_FUNCTIONS do_configure do_compile do_install
+EXPORT_FUNCTIONS do_configure do_compile do_install do_stage