diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2018-12-02 12:43:30 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-11 10:39:09 +0000 |
commit | ead379657b85dad0104661b9162b0b847b9391fd (patch) | |
tree | 8b6935d9d7c0a72dabd46637ce554042a654363d /meta/recipes-devtools/perl-sanity/perl-ptest.inc | |
parent | d94ac527b3a2bf1a8330b676513062bf699fbbe3 (diff) | |
download | poky-ead379657b85dad0104661b9162b0b847b9391fd.tar.gz |
perl: add a version that builds the recipe using perl-cross, and update to 5.28.1
perl-cross is a build system overlay from buildroot project that aims to bring
a bit of sanity to cross-building perl. The advantage of using that is that we
can drop a lot of custom patches (that no one really understands), and simplify
the perl recipe as well. Also the build time goes down from several minutes to
about 30 seconds. The whole thing becomes maintainable again, in my opinion.
When rewriting the recipe I had two goals in mind:
1. Stay with upstream defaults as much as possible
2. Add custom patches only when their necessity was proven through testing.
http://arsv.github.io/perl-cross/
(From OE-Core rev: 52f2828314f851263ca3a6beb41ec936fab4d3ab)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl-sanity/perl-ptest.inc')
-rw-r--r-- | meta/recipes-devtools/perl-sanity/perl-ptest.inc | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl-sanity/perl-ptest.inc b/meta/recipes-devtools/perl-sanity/perl-ptest.inc new file mode 100644 index 0000000000..597e5d841e --- /dev/null +++ b/meta/recipes-devtools/perl-sanity/perl-ptest.inc | |||
@@ -0,0 +1,57 @@ | |||
1 | inherit ptest | ||
2 | |||
3 | SRC_URI += "file://run-ptest \ | ||
4 | " | ||
5 | do_install_ptest () { | ||
6 | mkdir -p ${D}${PTEST_PATH} | ||
7 | sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/* | ||
8 | sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl | ||
9 | sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh | ||
10 | tar -c --exclude=try --exclude=a.out --exclude='*.o' --exclude=libperl.so* --exclude=Makefile --exclude=makefile --exclude=hostperl \ | ||
11 | --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \ | ||
12 | --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \ | ||
13 | --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \ | ||
14 | --exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \ | ||
15 | --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \ | ||
16 | --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x ) | ||
17 | |||
18 | ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl | ||
19 | |||
20 | # Remove build host references from various scattered files... | ||
21 | find "${D}${PTEST_PATH}" \ | ||
22 | \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \ | ||
23 | -o -name 'h2xs' -o -name 'h2ph' \ | ||
24 | -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' \) \ | ||
25 | -type f -exec sed -i \ | ||
26 | -e "s,${D},,g" \ | ||
27 | -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ | ||
28 | -e "s,-isystem${STAGING_INCDIR} ,,g" \ | ||
29 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
30 | -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ | ||
31 | -e "s,${STAGING_LIBDIR},${libdir},g" \ | ||
32 | -e "s,${STAGING_BINDIR},${bindir},g" \ | ||
33 | -e "s,${STAGING_INCDIR},${includedir},g" \ | ||
34 | -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ | ||
35 | -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \ | ||
36 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ | ||
37 | -e 's:${RECIPE_SYSROOT}::g' \ | ||
38 | {} + | ||
39 | |||
40 | # Remove a useless timestamp... | ||
41 | sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst | ||
42 | } | ||
43 | |||
44 | python populate_packages_prepend() { | ||
45 | # Put all *.t files from the lib dir in the ptest package | ||
46 | # do_split_packages requires a pair of () in the regex, but we have nothing | ||
47 | # to match, so use an empty pair. | ||
48 | if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): | ||
49 | do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()', | ||
50 | '${PN}-ptest%s', '%s', recursive=True, match_path=True) | ||
51 | } | ||
52 | |||
53 | RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc sed" | ||
54 | |||
55 | # The perl-ptest package contains Perl internal modules and generating file | ||
56 | # dependencies for it causes problems. | ||
57 | SKIP_FILEDEPS_${PN}-ptest = '1' | ||