diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 22:41:29 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 22:41:29 +0300 |
commit | 21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 (patch) | |
tree | eb2d091d427ca0813b445509d59cc8e27e8ad25f /yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc | |
parent | 101cef31e2bf54c678501155cd2106251acbd076 (diff) | |
parent | c124f4f2e04dca16a428a76c89677328bc7bf908 (diff) | |
download | openbmc-21f9b84b4b729fbd7acbd465e7a3f726e4d20f91.tar.xz |
Merge commit 'c124f4f2e04dca16a428a76c89677328bc7bf908' as 'yocto-poky'
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc')
-rw-r--r-- | yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc b/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc new file mode 100644 index 000000000..948ea7cdd --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc @@ -0,0 +1,37 @@ +inherit ptest + +SRC_URI += "file://run-ptest \ + " + +do_install_ptest () { + mkdir -p ${D}${PTEST_PATH} + sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl + sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh + tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \ + --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - ) + + sed -i -e "s,${D},,g" \ + -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ + -e "s,-isystem${STAGING_INCDIR} ,,g" \ + -e "s,${STAGING_LIBDIR},${libdir},g" \ + -e "s,${STAGING_BINDIR},${bindir},g" \ + -e "s,${STAGING_INCDIR},${includedir},g" \ + -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ + -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ + -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \ + ${D}${PTEST_PATH}/lib/Config.pm + + ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl + +} + +python populate_packages_prepend() { + # Put all *.t files from the lib dir in the ptest package + # do_split_packages requires a pair of () in the regex, but we have nothing + # to match, so use an empty pair. + if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): + do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()', + '${PN}-ptest%s', '%s', recursive=True, match_path=True) +} + +RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc sed" |