blob: 4456cdbcfbac26f87006cd9239193c99be69a977 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SUMMARY = "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 \
Andrew Geissler78b72792022-06-14 06:47:25 -050020 file://0001-Fix-build-with-gcc-12.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000021 "
22SRC_URI:append:class-native = " \
23 file://perl-configpm-switch.patch \
24"
25SRC_URI:append:class-target = " \
26 file://encodefix.patch \
27"
28
Andrew Geissler78b72792022-06-14 06:47:25 -050029SRC_URI[perl.sha256sum] = "e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a"
Andrew Geissler9aee5002022-03-30 16:27:02 +000030
31S = "${WORKDIR}/perl-${PV}"
32
33inherit upstream-version-is-even update-alternatives
34
35DEPENDS += "perlcross-native zlib virtual/crypt"
Andrew Geissler78b72792022-06-14 06:47:25 -050036# make 4.1 has race issues with the double-colon usage of MakeMaker, see #14096
37DEPENDS += "make-native"
Andrew Geissler9aee5002022-03-30 16:27:02 +000038
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}' \
Andrew Geissler78b72792022-06-14 06:47:25 -050064 -Dd_gnulibc=define \
Andrew Geissler9aee5002022-03-30 16:27:02 +000065 ${PACKAGECONFIG_CONFARGS}
66
67 #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
68 #adds the archlibexp path to @INC during run-time initialization of a
69 #new perl interpreter.
70
71 #Because we've changed this value in a temporary way to make it
72 #possible to use ExtUtils::Embed in the target build (the temporary
73 #value in config.sh gets re-stripped out during packaging), the
74 #ARCHLIB_EXP value that gets generated still uses the temporary version
75 #instead of the original expected version (i.e. becauses it's in the
76 #generated config.h, it doesn't get stripped out during packaging like
77 #the others in config.sh).
78
79 sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
80}
81
82do_configure:class-nativesdk() {
83 ./configure --prefix=${prefix} \
84 --target=${TARGET_SYS} \
85 -Duseshrplib \
86 -Dusethreads \
87 -Dsoname=libperl.so.5 \
88 -Dvendorprefix=${prefix} \
89 -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
90 -Alddlflags=' ${LDFLAGS}' \
91 ${PACKAGECONFIG_CONFARGS}
92
93 # See the comment above
94 sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
95}
96
97do_configure:class-native() {
98 ./configure --prefix=${prefix} \
99 -Dbin=${bindir}/perl-native \
100 -Duseshrplib \
101 -Dusethreads \
102 -Dsoname=libperl.so.5 \
103 -Dvendorprefix=${prefix} \
104 -Ui_xlocale \
105 -Alddlflags=' ${LDFLAGS}' \
106 ${PACKAGECONFIG_CONFARGS}
107}
108
109do_configure:append() {
110 if [ -n "$SOURCE_DATE_EPOCH" ]; then
111 PERL_BUILD_DATE="$(${PYTHON} -c "\
112from datetime import datetime, timezone; \
113print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
114 ")"
115 echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
116 fi
Andrew Geissler78b72792022-06-14 06:47:25 -0500117 oe_runmake clean
Andrew Geissler9aee5002022-03-30 16:27:02 +0000118}
119
120do_compile() {
121 oe_runmake
Andrew Geissler9aee5002022-03-30 16:27:02 +0000122}
123
124do_install() {
125 oe_runmake 'DESTDIR=${D}' install
126
127 install -d ${D}${libdir}/perl5
128 install -d ${D}${libdir}/perl5/${PV}/
129 install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
130
131 # Save native config
132 install config.sh ${D}${libdir}/perl5
133 install lib/Config.pm ${D}${libdir}/perl5/${PV}/
134 install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
135
136 # Fix up shared library
137 dir=$(echo ${D}/${libdir}/perl5/${PV}/*/CORE)
138 rm $dir/libperl.so
139 ln -sf ../../../../libperl.so.${PERL_LIB_VER} $dir/libperl.so
140
141 # Try to catch Bug #13946
142 if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
143 bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
144 fi
145}
146
147do_install:append:class-target() {
148 # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
149 ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
150
151 # This contains host-specific information used for building miniperl (a helper executable built with host compiler)
152 # and therefore isn't reproducible. I believe the file isn't actually needed on target.
153 rm ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
154}
155
156do_install:append:class-nativesdk() {
157 # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
158 ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
159
160 create_wrapper ${D}${bindir}/perl \
161 PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
162}
163
164do_install:append:class-native () {
165 # Those wrappers mean that perl installed from sstate (which may change
166 # path location) works and that in the nativesdk case, the SDK can be
167 # installed to a different location from the one it was built for.
168 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}'
169
170 # Use /usr/bin/env nativeperl for the perl script.
171 for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
172 sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
173 done
174}
175
176PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
177
178perl_package_preprocess () {
179 # Fix up installed configuration
180 sed -i -e "s,${D},,g" \
181 -e "s,${DEBUG_PREFIX_MAP},,g" \
182 -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
183 -e "s,-isystem${STAGING_INCDIR} ,,g" \
184 -e "s,${STAGING_LIBDIR},${libdir},g" \
185 -e "s,${STAGING_BINDIR},${bindir},g" \
186 -e "s,${STAGING_INCDIR},${includedir},g" \
187 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
188 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
189 -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
190 -e 's:${RECIPE_SYSROOT}::g' \
191 ${PKGD}${bindir}/h2xs.perl \
192 ${PKGD}${bindir}/h2ph.perl \
193 ${PKGD}${bindir}/pod2man.perl \
194 ${PKGD}${bindir}/pod2text.perl \
195 ${PKGD}${bindir}/pod2usage.perl \
196 ${PKGD}${bindir}/podchecker.perl \
197 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
198 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
199 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
200 ${PKGD}${libdir}/perl5/${PV}/Config.pm \
201 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
202 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
203 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
204 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
205 ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
206 ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
207 ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
208 ${PKGD}${libdir}/perl5/config.sh
209}
210
211inherit update-alternatives
212
213ALTERNATIVE_PRIORITY = "100"
214
215ALTERNATIVE:${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
216 piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
217 prove ptar ptardiff ptargrep shasum splain streamzip xsubpp zipdetails"
218ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
219ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
220ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
221ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
222ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
223ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
224ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
225ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
226ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
227ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
228ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
229ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
230ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
231ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
232ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
233ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
234ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
235ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
236ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
237ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
238ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
239ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
240ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip"
241ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
242ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
243
244require perl-ptest.inc
245
246FILES:${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
247 ${libdir}/perl5/site_perl \
248 ${libdir}/perl5/${PV}/Config.pm \
249 ${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
250 ${libdir}/perl5/${PV}/*/Config_git.pl \
251 ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
252 ${libdir}/perl5/config.sh \
253 ${libdir}/perl5/${PV}/strict.pm \
254 ${libdir}/perl5/${PV}/warnings.pm \
255 ${libdir}/perl5/${PV}/warnings \
256 ${libdir}/perl5/${PV}/vars.pm \
257 ${libdir}/perl5/site_perl \
258 ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
259 ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
260 ${libdir}/perl5/${PV}/ExtUtils/typemap \
261 "
262RPROVIDES:${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
263 perl-module-warnings-register"
264
265FILES:${PN}-staticdev:append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
266
267FILES:${PN}-dev:append = " ${libdir}/perl5/${PV}/*/CORE"
268
269FILES:${PN}-doc:append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
270 ${libdir}/perl5/${PV}/*/.packlist \
271 ${libdir}/perl5/${PV}/Encode/encode.h \
272 "
273PACKAGES += "${PN}-misc"
274
275FILES:${PN}-misc = "${bindir}/*"
276
277PACKAGES += "${PN}-pod"
278
279FILES:${PN}-pod = "${libdir}/perl5/${PV}/pod \
280 ${libdir}/perl5/${PV}/*.pod \
281 ${libdir}/perl5/${PV}/*/*.pod \
282 ${libdir}/perl5/${PV}/*/*/*.pod \
283 ${libdir}/perl5/${PV}/*/*/*/*.pod \
284 "
285
286PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
287
288FILES:${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
289 "
290FILES:${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
291
292ALTERNATIVE_PRIORITY = "40"
293ALTERNATIVE:${PN}-doc = "Thread.3"
294ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
295
296# Create a perl-modules package recommending all the other perl
297# packages (actually the non modules packages and not created too)
298ALLOW_EMPTY:${PN}-modules = "1"
299PACKAGES += "${PN}-modules "
300
301PACKAGESPLITFUNCS:prepend = "split_perl_packages "
302
303python split_perl_packages () {
304 libdir = d.expand('${libdir}/perl5/${PV}')
305 do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
306 do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
307 do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
308 do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
309 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)
310 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)
311
312 # perl-modules should recommend every perl module, and only the
313 # modules. Don't attempt to use the result of do_split_packages() as some
314 # modules are manually split (eg. perl-module-unicore).
315 packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
316 d.setVar(d.expand("RRECOMMENDS:${PN}-modules"), ' '.join(packages))
317
318 # Read the pre-generated dependency file, and use it to set module dependecies
319 for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
320 splitline = line.split()
321 # Filter empty lines and comments
322 if len(splitline) == 0 or splitline[0].startswith("#"):
323 continue
324 if bb.data.inherits_class('native', d):
325 module = splitline[0] + '-native'
326 depends = "perl-native"
327 else:
328 module = splitline[0].replace("RDEPENDS:perl", "RDEPENDS:${PN}")
329 depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
330 d.appendVar(d.expand(module), " " + depends)
331}
332
333python() {
334 if d.getVar('CLASSOVERRIDE') == "class-target":
335 d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
336 elif d.getVar('CLASSOVERRIDE') == "class-native":
337 d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
338 elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
339 d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
340}
341
342RDEPENDS:${PN}-misc += "perl perl-modules"
343RDEPENDS:${PN}-pod += "perl"
344
345BBCLASSEXTEND = "native nativesdk"
346
347SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
348
349do_create_rdepends_inc() {
350 cd ${WORKDIR}
351 cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
352
353# Some additional dependencies that the above doesn't manage to figure out
354RDEPENDS:${PN}-module-file-spec += "${PN}-module-file-spec-unix"
355RDEPENDS:${PN}-module-scalar-util += "${PN}-module-list-util"
356RDEPENDS:${PN}-module-file-temp += "${PN}-module-scalar-util"
357RDEPENDS:${PN}-module-file-temp += "${PN}-module-file-spec"
358RDEPENDS:${PN}-module-io-file += "${PN}-module-symbol"
359RDEPENDS:${PN}-module-io-file += "${PN}-module-carp"
360RDEPENDS:${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
361RDEPENDS:${PN}-module-test-builder += "${PN}-module-list-util"
362RDEPENDS:${PN}-module-test-builder += "${PN}-module-scalar-util"
363RDEPENDS:${PN}-module-test-builder-formatter += "${PN}-module-test2-formatter-tap"
364RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-fail"
365RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-pass"
366RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-v2"
367RDEPENDS:${PN}-module-test2-formatter-tap += "${PN}-module-test2-formatter"
368RDEPENDS:${PN}-module-thread-queue += "${PN}-module-attributes"
369RDEPENDS:${PN}-module-overload += "${PN}-module-overloading"
370
371# Generated depends list beyond this line
372EOPREAMBLE
373 test -e packages-split.new && rm -rf packages-split.new
374 cp -r packages-split packages-split.new && cd packages-split.new
375 find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
376 egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
377 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:] | \
378 awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
379 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 | \
380 sort -u | \
381 sed 's/^/RDEPENDS:/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
382 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' | \
383 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
384 cat ${WORKDIR}/perl-rdepends.inc ${WORKDIR}/perl-rdepends.generated > ${THISDIR}/files/perl-rdepends.txt
385}
386
387# bitbake perl -c create_rdepends_inc
388addtask do_create_rdepends_inc
389
390SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
391
392perl_sysroot_create_wrapper () {
393 mkdir -p ${SYSROOT_DESTDIR}${bindir}
394 # Create a wrapper that /usr/bin/env perl will use to get perl-native.
395 # This MUST live in the normal bindir.
396 cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
397#!/bin/sh
398realpath=\`readlink -fn \$0\`
399exec \`dirname \$realpath\`/perl-native/perl "\$@"
400EOF
401 chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
402 cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
403}
404
405SSTATE_HASHEQUIV_FILEMAP = " \
406 populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${TMPDIR} \
407 populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${COREBASE} \
408 populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \
409 populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \
410 "