summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl_5.32.1.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-02-28 16:36:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-02 14:15:33 +0000
commitc621b08c82d8be676e589ebd596836c22394e38b (patch)
treeddc6d23e5b3524350dcff81d681e5ab36650d8fe /meta/recipes-devtools/perl/perl_5.32.1.bb
parent02f2ecabc3007a143f7b9b278820c7981ecee99a (diff)
downloadpoky-c621b08c82d8be676e589ebd596836c22394e38b.tar.gz
perl: update 5.32.0 -> 5.32.1
Drop perl-cross-makefile.patch as it is merged upstream. (From OE-Core rev: 7459853328d3e8a43d04a75181a46bd42b8fb076) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.32.1.bb')
-rw-r--r--meta/recipes-devtools/perl/perl_5.32.1.bb390
1 files changed, 390 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl_5.32.1.bb b/meta/recipes-devtools/perl/perl_5.32.1.bb
new file mode 100644
index 0000000000..1fafc0a8c9
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl_5.32.1.bb
@@ -0,0 +1,390 @@
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+"
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 https://github.com/arsv/perl-cross/releases/download/1.3.5/perl-cross-1.3.5.tar.gz;name=perl-cross \
13 file://perl-rdepends.txt \
14 file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
15 file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
16 file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
17 file://errno_ver.diff \
18 file://native-perlinc.patch \
19 file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
20 file://perl-dynloader.patch \
21 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
22 file://0002-Constant-Fix-up-shebang.patch \
23 file://determinism.patch \
24 "
25SRC_URI_append_class-native = " \
26 file://perl-configpm-switch.patch \
27"
28SRC_URI_append_class-target = " \
29 file://encodefix.patch \
30"
31
32SRC_URI[perl.sha256sum] = "03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c"
33SRC_URI[perl-cross.sha256sum] = "91c66f6b2b99fccfd4fee14660b677380b0c98f9456359e91449798c2ad2ef25"
34
35S = "${WORKDIR}/perl-${PV}"
36
37inherit upstream-version-is-even update-alternatives
38
39DEPENDS += "zlib virtual/crypt"
40
41PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
42
43PACKAGECONFIG ??= "bdb gdbm"
44PACKAGECONFIG[bdb] = ",-Ui_db,db"
45PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
46
47# Don't generate comments in enc2xs output files. They are not reproducible
48export ENC2XS_NO_COMMENTS = "1"
49
50do_unpack_append() {
51 bb.build.exec_func('do_copy_perlcross', d)
52}
53
54do_copy_perlcross() {
55 cp -rfp ${WORKDIR}/perl-cross*/* ${S}
56}
57
58do_configure_class-target() {
59 ./configure --prefix=${prefix} --libdir=${libdir} \
60 --target=${TARGET_SYS} \
61 -Duseshrplib \
62 -Dsoname=libperl.so.5 \
63 -Dvendorprefix=${prefix} \
64 -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
65 ${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 -Dsoname=libperl.so.5 \
87 -Dvendorprefix=${prefix} \
88 -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
89 ${PACKAGECONFIG_CONFARGS}
90
91 # See the comment above
92 sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
93}
94
95do_configure_class-native() {
96 ./configure --prefix=${prefix} \
97 -Dbin=${bindir}/perl-native \
98 -Duseshrplib \
99 -Dsoname=libperl.so.5 \
100 -Dvendorprefix=${prefix} \
101 -Ui_xlocale \
102 ${PACKAGECONFIG_CONFARGS}
103}
104
105do_configure_append() {
106 if [ -n "$SOURCE_DATE_EPOCH" ]; then
107 PERL_BUILD_DATE="$(${PYTHON} -c "\
108from datetime import datetime, timezone; \
109print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
110 ")"
111 echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
112 fi
113}
114
115do_compile() {
116 oe_runmake
117 # This isn't generated reliably so delete and re-generate.
118 # https://github.com/arsv/perl-cross/issues/86
119
120 if [ -e pod/perltoc.pod ]; then
121 bbnote Rebuilding perltoc.pod
122 rm -f pod/perltoc.pod
123 oe_runmake pod/perltoc.pod
124 fi
125}
126
127do_install() {
128 oe_runmake 'DESTDIR=${D}' install
129
130 install -d ${D}${libdir}/perl5
131 install -d ${D}${libdir}/perl5/${PV}/
132 install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
133
134 # Save native config
135 install config.sh ${D}${libdir}/perl5
136 install lib/Config.pm ${D}${libdir}/perl5/${PV}/
137 install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
138
139 # Fix up shared library
140 dir=$(echo ${D}/${libdir}/perl5/${PV}/*/CORE)
141 rm $dir/libperl.so
142 ln -sf ../../../../libperl.so.${PERL_LIB_VER} $dir/libperl.so
143
144 # Try to catch Bug #13946
145 if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
146 bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
147 fi
148}
149
150do_install_append_class-target() {
151 # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
152 ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
153
154 # This contains host-specific information used for building miniperl (a helper executable built with host compiler)
155 # and therefore isn't reproducible. I believe the file isn't actually needed on target.
156 rm ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
157}
158
159do_install_append_class-nativesdk() {
160 # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
161 ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
162
163 create_wrapper ${D}${bindir}/perl \
164 PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
165}
166
167do_install_append_class-native () {
168 # Those wrappers mean that perl installed from sstate (which may change
169 # path location) works and that in the nativesdk case, the SDK can be
170 # installed to a different location from the one it was built for.
171 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}'
172
173 # Use /usr/bin/env nativeperl for the perl script.
174 for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
175 sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
176 done
177}
178
179PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
180
181perl_package_preprocess () {
182 # Fix up installed configuration
183 sed -i -e "s,${D},,g" \
184 -e "s,${DEBUG_PREFIX_MAP},,g" \
185 -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
186 -e "s,-isystem${STAGING_INCDIR} ,,g" \
187 -e "s,${STAGING_LIBDIR},${libdir},g" \
188 -e "s,${STAGING_BINDIR},${bindir},g" \
189 -e "s,${STAGING_INCDIR},${includedir},g" \
190 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
191 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
192 -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
193 -e 's:${RECIPE_SYSROOT}::g' \
194 ${PKGD}${bindir}/h2xs.perl \
195 ${PKGD}${bindir}/h2ph.perl \
196 ${PKGD}${bindir}/pod2man.perl \
197 ${PKGD}${bindir}/pod2text.perl \
198 ${PKGD}${bindir}/pod2usage.perl \
199 ${PKGD}${bindir}/podchecker.perl \
200 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
201 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
202 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
203 ${PKGD}${libdir}/perl5/${PV}/Config.pm \
204 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
205 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
206 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
207 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
208 ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
209 ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
210 ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
211 ${PKGD}${libdir}/perl5/config.sh
212}
213
214inherit update-alternatives
215
216ALTERNATIVE_PRIORITY = "100"
217
218ALTERNATIVE_${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
219 piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
220 prove ptar ptardiff ptargrep shasum splain xsubpp zipdetails"
221ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
222ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
223ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
224ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
225ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
226ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
227ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
228ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
229ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
230ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
231ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
232ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
233ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
234ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
235ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
236ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
237ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
238ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
239ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
240ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
241ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
242ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
243ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
244ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
245
246require perl-ptest.inc
247
248FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
249 ${libdir}/perl5/site_perl \
250 ${libdir}/perl5/${PV}/Config.pm \
251 ${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
252 ${libdir}/perl5/${PV}/*/Config_git.pl \
253 ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
254 ${libdir}/perl5/config.sh \
255 ${libdir}/perl5/${PV}/strict.pm \
256 ${libdir}/perl5/${PV}/warnings.pm \
257 ${libdir}/perl5/${PV}/warnings \
258 ${libdir}/perl5/${PV}/vars.pm \
259 ${libdir}/perl5/site_perl \
260 ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
261 ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
262 ${libdir}/perl5/${PV}/ExtUtils/typemap \
263 "
264RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
265 perl-module-warnings-register"
266
267FILES_${PN}-staticdev_append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
268
269FILES_${PN}-dev_append = " ${libdir}/perl5/${PV}/*/CORE"
270
271FILES_${PN}-doc_append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
272 ${libdir}/perl5/${PV}/*/.packlist \
273 ${libdir}/perl5/${PV}/Encode/encode.h \
274 "
275PACKAGES += "${PN}-misc"
276
277FILES_${PN}-misc = "${bindir}/*"
278
279PACKAGES += "${PN}-pod"
280
281FILES_${PN}-pod = "${libdir}/perl5/${PV}/pod \
282 ${libdir}/perl5/${PV}/*.pod \
283 ${libdir}/perl5/${PV}/*/*.pod \
284 ${libdir}/perl5/${PV}/*/*/*.pod \
285 ${libdir}/perl5/${PV}/*/*/*/*.pod \
286 "
287
288PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
289
290FILES_${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
291 "
292FILES_${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
293
294ALTERNATIVE_PRIORITY = "40"
295ALTERNATIVE_${PN}-doc = "Thread.3"
296ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
297
298# Create a perl-modules package recommending all the other perl
299# packages (actually the non modules packages and not created too)
300ALLOW_EMPTY_${PN}-modules = "1"
301PACKAGES += "${PN}-modules "
302
303PACKAGESPLITFUNCS_prepend = "split_perl_packages "
304
305python split_perl_packages () {
306 libdir = d.expand('${libdir}/perl5/${PV}')
307 do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
308 do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
309 do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
310 do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
311 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)
312 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)
313
314 # perl-modules should recommend every perl module, and only the
315 # modules. Don't attempt to use the result of do_split_packages() as some
316 # modules are manually split (eg. perl-module-unicore).
317 packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
318 d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
319
320 # Read the pre-generated dependency file, and use it to set module dependecies
321 for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
322 splitline = line.split()
323 if bb.data.inherits_class('native', d):
324 module = splitline[0] + '-native'
325 depends = "perl-native"
326 else:
327 module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}")
328 depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
329 d.appendVar(d.expand(module), " " + depends)
330}
331
332python() {
333 if d.getVar('CLASSOVERRIDE') == "class-target":
334 d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
335 elif d.getVar('CLASSOVERRIDE') == "class-native":
336 d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
337 elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
338 d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
339}
340
341RDEPENDS_${PN}-misc += "perl perl-modules"
342RDEPENDS_${PN}-pod += "perl"
343
344BBCLASSEXTEND = "native nativesdk"
345
346SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
347
348do_create_rdepends_inc() {
349 cd ${WORKDIR}
350 cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
351
352# Some additional dependencies that the above doesn't manage to figure out
353RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
354RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
355RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
356RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
357
358# Generated depends list beyond this line
359EOPREAMBLE
360 test -e packages-split.new && rm -rf packages-split.new
361 cp -r packages-split packages-split.new && cd packages-split.new
362 find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
363 egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
364 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/(//;" | tr [:upper:] [:lower:] | \
365 awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
366 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 | \
367 sort -u | \
368 sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
369 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-test2|module-text-unidecode|module-unicore|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' | \
370 egrep -wv '=>|module-algorithm-diff|module-carp|module-c<extutils-mm-unix>|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|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
371 cp ${WORKDIR}/perl-rdepends.generated ${THISDIR}/files/perl-rdepends.txt
372}
373
374# bitbake perl -c create_rdepends_inc
375addtask do_create_rdepends_inc
376
377SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
378
379perl_sysroot_create_wrapper () {
380 mkdir -p ${SYSROOT_DESTDIR}${bindir}
381 # Create a wrapper that /usr/bin/env perl will use to get perl-native.
382 # This MUST live in the normal bindir.
383 cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
384#!/bin/sh
385realpath=\`readlink -fn \$0\`
386exec \`dirname \$realpath\`/perl-native/perl "\$@"
387EOF
388 chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
389 cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
390}