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