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