Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit ptest |
| 2 | |
| 3 | SRC_URI += "file://run-ptest \ |
| 4 | " |
| 5 | |
| 6 | do_install_ptest () { |
| 7 | mkdir -p ${D}${PTEST_PATH} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 8 | sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/* |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl |
| 10 | sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 11 | tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \ |
| 12 | --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x ) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
| 14 | sed -i -e "s,${D},,g" \ |
| 15 | -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ |
| 16 | -e "s,-isystem${STAGING_INCDIR} ,,g" \ |
| 17 | -e "s,${STAGING_LIBDIR},${libdir},g" \ |
| 18 | -e "s,${STAGING_BINDIR},${bindir},g" \ |
| 19 | -e "s,${STAGING_INCDIR},${includedir},g" \ |
| 20 | -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ |
| 21 | -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ |
| 22 | -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 23 | ${D}${PTEST_PATH}/lib/Config.pm \ |
| 24 | ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2man \ |
| 25 | ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2text |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | |
| 27 | ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 28 | # Remove plan9 related stuff |
| 29 | rm -rf ${D}${PTEST_PATH}/plan9 ${D}${PTEST_PATH}/README.plan9 ${D}${PTEST_PATH}/pod/perlplan9.pod |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | python populate_packages_prepend() { |
| 33 | # Put all *.t files from the lib dir in the ptest package |
| 34 | # do_split_packages requires a pair of () in the regex, but we have nothing |
| 35 | # to match, so use an empty pair. |
| 36 | if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): |
| 37 | do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()', |
| 38 | '${PN}-ptest%s', '%s', recursive=True, match_path=True) |
| 39 | } |
| 40 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 41 | RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc sed libssp" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 42 | |
| 43 | # The perl-ptest package contains Perl internal modules and generating file |
| 44 | # dependencies for it causes problems. |
| 45 | SKIP_FILEDEPS_${PN}-ptest = '1' |