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