1inherit ptest 2 3SRC_URI += "file://run-ptest \ 4 " 5 6DEBUG_PREFIX_MAP_REGEX = "${@'\\|'.join(d.getVar('DEBUG_PREFIX_MAP').split())}" 7 8do_install_ptest () { 9 mkdir -p ${D}${PTEST_PATH} 10 sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/* 11 sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl 12 sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh 13 tar -c --exclude=try --exclude=a.out --exclude='*.o' --exclude=libperl.so* --exclude=[Mm]akefile --exclude=hostperl \ 14 --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \ 15 --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \ 16 --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \ 17 --exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \ 18 --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=[Mm]akefile.old \ 19 --exclude=miniperl --exclude=generate_uudmap --exclude=patches --exclude='config.log' * | ( cd ${D}${PTEST_PATH} && tar -x ) 20 21 ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl 22 23 # Remove build host references from various scattered files... 24 find "${D}${PTEST_PATH}" \ 25 \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \ 26 -o -name 'h2xs' -o -name 'h2ph' \ 27 -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' -o -name 'Makefile.config' \) \ 28 -type f -exec sed -i \ 29 -e "s,${D},,g" \ 30 -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ 31 -e "s,-isystem${STAGING_INCDIR} ,,g" \ 32 -e 's^${DEBUG_PREFIX_MAP_REGEX}^^g' \ 33 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ 34 -e "s,${STAGING_LIBDIR},${libdir},g" \ 35 -e "s,${STAGING_BINDIR},${bindir},g" \ 36 -e "s,${STAGING_INCDIR},${includedir},g" \ 37 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ 38 -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \ 39 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ 40 -e 's:${RECIPE_SYSROOT}::g' \ 41 {} + 42 43 # Remove a useless timestamp... 44 sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst 45 46 # Remove files with host-specific configuration for building native binaries 47 rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.h ${D}${PTEST_PATH}/xconfig.sh 48} 49 50python populate_packages:prepend() { 51 # Put all *.t files from the lib dir in the ptest package 52 # do_split_packages requires a pair of () in the regex, but we have nothing 53 # to match, so use an empty pair. 54 if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): 55 do_split_packages(d, d.expand('${libdir}/perl/${PV}'), r'.*\.t()', 56 '${PN}-ptest%s', '%s', recursive=True, match_path=True) 57} 58 59RDEPENDS:${PN}-ptest += "${PN}-modules ${PN}-doc sed procps-ps" 60 61# The perl-ptest package contains Perl internal modules and generating file 62# dependencies for it causes problems. 63SKIP_FILEDEPS:${PN}-ptest = '1' 64