xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/perl/perl_5.34.1.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Perl scripting language"
2HOMEPAGE = "http://www.perl.org/"
3DESCRIPTION = "Perl is a highly capable, feature-rich programming language"
4SECTION = "devel"
5LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
6LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
7                    file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \
8                    "
9
10
11SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
12           file://perl-rdepends.txt \
13           file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
14           file://errno_ver.diff \
15           file://native-perlinc.patch \
16           file://perl-dynloader.patch \
17           file://0002-Constant-Fix-up-shebang.patch \
18           file://determinism.patch \
19           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
20           file://0001-Fix-build-with-gcc-12.patch \
21           "
22SRC_URI:append:class-native = " \
23           file://perl-configpm-switch.patch \
24"
25SRC_URI:append:class-target = " \
26           file://encodefix.patch \
27"
28
29SRC_URI[perl.sha256sum] = "357951a491b0ba1ce3611263922feec78ccd581dddc24a446b033e25acf242a1"
30
31S = "${WORKDIR}/perl-${PV}"
32
33inherit upstream-version-is-even update-alternatives
34
35DEPENDS += "perlcross-native zlib virtual/crypt"
36# make 4.1 has race issues with the double-colon usage of MakeMaker, see #14096
37DEPENDS += "make-native"
38
39PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
40
41PACKAGECONFIG ??= "gdbm"
42PACKAGECONFIG[bdb] = ",-Ui_db,db"
43PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
44
45# Don't generate comments in enc2xs output files. They are not reproducible
46export ENC2XS_NO_COMMENTS = "1"
47
48do_configure:prepend() {
49    cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${S}
50}
51
52do_configure:class-target() {
53    ./configure --prefix=${prefix} --libdir=${libdir} \
54    --target=${TARGET_SYS} \
55    -Duseshrplib \
56    -Dusethreads \
57    -Dsoname=libperl.so.5 \
58    -Dvendorprefix=${prefix} \
59    -Dvendorlibdir=${libdir} \
60    -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
61    -Dlibpth='${libdir} ${base_libdir}' \
62    -Dglibpth='${libdir} ${base_libdir}' \
63    -Alddlflags=' ${LDFLAGS}' \
64    ${PACKAGECONFIG_CONFARGS}
65
66    #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
67    #adds the archlibexp path to @INC during run-time initialization of a
68    #new perl interpreter.
69
70    #Because we've changed this value in a temporary way to make it
71    #possible to use ExtUtils::Embed in the target build (the temporary
72    #value in config.sh gets re-stripped out during packaging), the
73    #ARCHLIB_EXP value that gets generated still uses the temporary version
74    #instead of the original expected version (i.e. becauses it's in the
75    #generated config.h, it doesn't get stripped out during packaging like
76    #the others in config.sh).
77
78    sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
79}
80
81do_configure:class-nativesdk() {
82    ./configure --prefix=${prefix} \
83    --target=${TARGET_SYS} \
84    -Duseshrplib \
85    -Dusethreads \
86    -Dsoname=libperl.so.5 \
87    -Dvendorprefix=${prefix} \
88    -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
89    -Alddlflags=' ${LDFLAGS}' \
90    ${PACKAGECONFIG_CONFARGS}
91
92    # See the comment above
93    sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
94}
95
96do_configure:class-native() {
97    ./configure --prefix=${prefix} \
98    -Dbin=${bindir}/perl-native \
99    -Duseshrplib \
100    -Dusethreads \
101    -Dsoname=libperl.so.5 \
102    -Dvendorprefix=${prefix} \
103    -Ui_xlocale \
104    -Alddlflags=' ${LDFLAGS}' \
105    ${PACKAGECONFIG_CONFARGS}
106}
107
108do_configure:append() {
109    if [ -n "$SOURCE_DATE_EPOCH" ]; then
110        PERL_BUILD_DATE="$(${PYTHON} -c "\
111from datetime import datetime, timezone; \
112print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
113            ")"
114        echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
115    fi
116}
117
118do_compile() {
119    oe_runmake
120    # This isn't generated reliably so delete and re-generate.
121    # https://github.com/arsv/perl-cross/issues/86
122
123    if [ -e pod/perltoc.pod ]; then
124        bbnote Rebuilding perltoc.pod
125        rm -f pod/perltoc.pod
126        oe_runmake pod/perltoc.pod
127    fi
128}
129
130do_install() {
131    oe_runmake 'DESTDIR=${D}' install
132
133    install -d ${D}${libdir}/perl5
134    install -d ${D}${libdir}/perl5/${PV}/
135    install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
136
137    # Save native config
138    install config.sh ${D}${libdir}/perl5
139    install lib/Config.pm ${D}${libdir}/perl5/${PV}/
140    install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
141
142    # Fix up shared library
143    dir=$(echo ${D}/${libdir}/perl5/${PV}/*/CORE)
144    rm $dir/libperl.so
145    ln -sf ../../../../libperl.so.${PERL_LIB_VER} $dir/libperl.so
146
147    # Try to catch Bug #13946
148    if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
149        bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
150    fi
151}
152
153do_install:append:class-target() {
154    # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
155    ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
156
157    # This contains host-specific information used for building miniperl (a helper executable built with host compiler)
158    # and therefore isn't reproducible. I believe the file isn't actually needed on target.
159    rm ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
160}
161
162do_install:append:class-nativesdk() {
163    # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
164    ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
165
166    create_wrapper ${D}${bindir}/perl \
167        PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
168}
169
170do_install:append:class-native () {
171    # Those wrappers mean that perl installed from sstate (which may change
172    # path location) works and that in the nativesdk case, the SDK can be
173    # installed to a different location from the one it was built for.
174    create_wrapper ${D}${bindir}/perl-native/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl5/site_perl/${PV}:${STAGING_LIBDIR}/perl5/vendor_perl/${PV}:${STAGING_LIBDIR}/perl5/${PV}'
175
176    # Use /usr/bin/env nativeperl for the perl script.
177    for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
178            sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
179    done
180}
181
182PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
183
184perl_package_preprocess () {
185        # Fix up installed configuration
186        sed -i -e "s,${D},,g" \
187               -e "s,${DEBUG_PREFIX_MAP},,g" \
188               -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
189               -e "s,-isystem${STAGING_INCDIR} ,,g" \
190               -e "s,${STAGING_LIBDIR},${libdir},g" \
191               -e "s,${STAGING_BINDIR},${bindir},g" \
192               -e "s,${STAGING_INCDIR},${includedir},g" \
193               -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
194               -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
195               -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
196               -e 's:${RECIPE_SYSROOT}::g' \
197            ${PKGD}${bindir}/h2xs.perl \
198            ${PKGD}${bindir}/h2ph.perl \
199            ${PKGD}${bindir}/pod2man.perl \
200            ${PKGD}${bindir}/pod2text.perl \
201            ${PKGD}${bindir}/pod2usage.perl \
202            ${PKGD}${bindir}/podchecker.perl \
203            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
204            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
205            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
206            ${PKGD}${libdir}/perl5/${PV}/Config.pm \
207            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
208            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
209            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
210            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
211            ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
212            ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
213            ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
214            ${PKGD}${libdir}/perl5/config.sh
215}
216
217inherit update-alternatives
218
219ALTERNATIVE_PRIORITY = "100"
220
221ALTERNATIVE:${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
222                     piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
223                     prove ptar ptardiff ptargrep shasum splain streamzip xsubpp zipdetails"
224ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
225ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
226ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
227ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
228ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
229ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
230ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
231ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
232ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
233ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
234ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
235ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
236ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
237ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
238ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
239ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
240ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
241ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
242ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
243ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
244ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
245ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
246ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip"
247ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
248ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
249
250require perl-ptest.inc
251
252FILES:${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
253               ${libdir}/perl5/site_perl \
254               ${libdir}/perl5/${PV}/Config.pm \
255               ${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
256               ${libdir}/perl5/${PV}/*/Config_git.pl \
257               ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
258               ${libdir}/perl5/config.sh \
259               ${libdir}/perl5/${PV}/strict.pm \
260               ${libdir}/perl5/${PV}/warnings.pm \
261               ${libdir}/perl5/${PV}/warnings \
262               ${libdir}/perl5/${PV}/vars.pm \
263               ${libdir}/perl5/site_perl \
264               ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
265               ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
266               ${libdir}/perl5/${PV}/ExtUtils/typemap \
267               "
268RPROVIDES:${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
269                    perl-module-warnings-register"
270
271FILES:${PN}-staticdev:append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
272
273FILES:${PN}-dev:append = " ${libdir}/perl5/${PV}/*/CORE"
274
275FILES:${PN}-doc:append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
276                           ${libdir}/perl5/${PV}/*/.packlist \
277                           ${libdir}/perl5/${PV}/Encode/encode.h \
278                         "
279PACKAGES += "${PN}-misc"
280
281FILES:${PN}-misc = "${bindir}/*"
282
283PACKAGES += "${PN}-pod"
284
285FILES:${PN}-pod = "${libdir}/perl5/${PV}/pod \
286                   ${libdir}/perl5/${PV}/*.pod \
287                   ${libdir}/perl5/${PV}/*/*.pod \
288                   ${libdir}/perl5/${PV}/*/*/*.pod \
289                   ${libdir}/perl5/${PV}/*/*/*/*.pod \
290                  "
291
292PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
293
294FILES:${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
295                          "
296FILES:${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
297
298ALTERNATIVE_PRIORITY = "40"
299ALTERNATIVE:${PN}-doc = "Thread.3"
300ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
301
302# Create a perl-modules package recommending all the other perl
303# packages (actually the non modules packages and not created too)
304ALLOW_EMPTY:${PN}-modules = "1"
305PACKAGES += "${PN}-modules "
306
307PACKAGESPLITFUNCS:prepend = "split_perl_packages "
308
309python split_perl_packages () {
310    libdir = d.expand('${libdir}/perl5/${PV}')
311    do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
312    do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
313    do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
314    do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
315    do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
316    do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
317
318    # perl-modules should recommend every perl module, and only the
319    # modules. Don't attempt to use the result of do_split_packages() as some
320    # modules are manually split (eg. perl-module-unicore).
321    packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
322    d.setVar(d.expand("RRECOMMENDS:${PN}-modules"), ' '.join(packages))
323
324    # Read the pre-generated dependency file, and use it to set module dependecies
325    for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
326        splitline = line.split()
327        # Filter empty lines and comments
328        if len(splitline) == 0 or splitline[0].startswith("#"):
329            continue
330        if bb.data.inherits_class('native', d):
331            module = splitline[0] + '-native'
332            depends = "perl-native"
333        else:
334            module = splitline[0].replace("RDEPENDS:perl", "RDEPENDS:${PN}")
335            depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
336        d.appendVar(d.expand(module), " " + depends)
337}
338
339python() {
340    if d.getVar('CLASSOVERRIDE') == "class-target":
341        d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
342    elif d.getVar('CLASSOVERRIDE') == "class-native":
343        d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
344    elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
345        d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
346}
347
348RDEPENDS:${PN}-misc += "perl perl-modules"
349RDEPENDS:${PN}-pod += "perl"
350
351BBCLASSEXTEND = "native nativesdk"
352
353SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
354
355do_create_rdepends_inc() {
356    cd ${WORKDIR}
357    cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
358
359# Some additional dependencies that the above doesn't manage to figure out
360RDEPENDS:${PN}-module-file-spec += "${PN}-module-file-spec-unix"
361RDEPENDS:${PN}-module-scalar-util += "${PN}-module-list-util"
362RDEPENDS:${PN}-module-file-temp += "${PN}-module-scalar-util"
363RDEPENDS:${PN}-module-file-temp += "${PN}-module-file-spec"
364RDEPENDS:${PN}-module-io-file += "${PN}-module-symbol"
365RDEPENDS:${PN}-module-io-file += "${PN}-module-carp"
366RDEPENDS:${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
367RDEPENDS:${PN}-module-test-builder += "${PN}-module-list-util"
368RDEPENDS:${PN}-module-test-builder += "${PN}-module-scalar-util"
369RDEPENDS:${PN}-module-test-builder-formatter += "${PN}-module-test2-formatter-tap"
370RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-fail"
371RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-pass"
372RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-v2"
373RDEPENDS:${PN}-module-test2-formatter-tap += "${PN}-module-test2-formatter"
374RDEPENDS:${PN}-module-thread-queue += "${PN}-module-attributes"
375RDEPENDS:${PN}-module-overload += "${PN}-module-overloading"
376
377# Generated depends list beyond this line
378EOPREAMBLE
379    test -e packages-split.new && rm -rf packages-split.new
380    cp -r packages-split packages-split.new && cd packages-split.new
381    find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
382    egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
383    sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;s/)//;" | tr [:upper:] [:lower:] | \
384    awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
385    grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix | \
386    sort -u | \
387    sed 's/^/RDEPENDS:/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
388    egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-socket-inet6|module-io-socket-ssl|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-unicore|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' | \
389    egrep -wv '=>|module-algorithm-diff|module-carp|module-c<extutils-mm-unix>|module-l<extutils-mm-unix>|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|module-io-uncompress-unxz|module-locale-maketext-lexicon|module-log-agent|module-meta-notation|module-net-localcfg|module-net-ping-external|module-b-deparse|module-scalar-util|module-some-module|module-symbol|module-uri|module-win32api-file' > ${WORKDIR}/perl-rdepends.generated
390    cat ${WORKDIR}/perl-rdepends.inc ${WORKDIR}/perl-rdepends.generated > ${THISDIR}/files/perl-rdepends.txt
391}
392
393# bitbake perl -c create_rdepends_inc
394addtask do_create_rdepends_inc
395
396SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
397
398perl_sysroot_create_wrapper () {
399       mkdir -p ${SYSROOT_DESTDIR}${bindir}
400       # Create a wrapper that /usr/bin/env perl will use to get perl-native.
401       # This MUST live in the normal bindir.
402       cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
403#!/bin/sh
404realpath=\`readlink -fn \$0\`
405exec \`dirname \$realpath\`/perl-native/perl "\$@"
406EOF
407       chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
408       cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
409}
410
411SSTATE_HASHEQUIV_FILEMAP = " \
412    populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${TMPDIR} \
413    populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${COREBASE} \
414    populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \
415    populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \
416    "
417