blob: bba8263b90ad0d85bcac32f7be902145ad62e41e [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Perl scripting language"
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "devel"
4LICENSE = "Artistic-1.0 | GPL-1.0+"
5LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
6 file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \
7 "
8
9
10SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
Andrew Geissler475cb722020-07-10 16:00:51 -050011 https://github.com/arsv/perl-cross/releases/download/1.3.4/perl-cross-1.3.4.tar.gz;name=perl-cross \
Andrew Geissler82c905d2020-04-13 13:39:40 -050012 file://perl-rdepends.txt \
13 file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
14 file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
15 file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
16 file://errno_ver.diff \
17 file://native-perlinc.patch \
18 file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
19 file://perl-dynloader.patch \
20 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050021 file://0002-Constant-Fix-up-shebang.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050022 file://determinism.patch \
Andrew Geissler635e0e42020-08-21 15:58:33 -050023 file://perl-cross-makefile.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050024 "
25SRC_URI_append_class-native = " \
26 file://perl-configpm-switch.patch \
27"
28SRC_URI_append_class-target = " \
29 file://encodefix.patch \
30"
31
Andrew Geissler475cb722020-07-10 16:00:51 -050032SRC_URI[perl.sha256sum] = "efeb1ce1f10824190ad1cadbcccf6fdb8a5d37007d0100d2d9ae5f2b5900c0b4"
33SRC_URI[perl-cross.sha256sum] = "755aa0ca8141a942188a269564f86c3c82349f82c346ed5c992495d7f35138ba"
Andrew Geissler82c905d2020-04-13 13:39:40 -050034
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 rm ${D}/${libdir}/perl5/${PV}/*/CORE/libperl.so
141 ln -sf ../../../../libperl.so.${PERL_LIB_VER} $(echo ${D}/${libdir}/perl5/${PV}/*/CORE)/libperl.so
Andrew Geissler635e0e42020-08-21 15:58:33 -0500142
143 # Try to catch Bug #13946
144 if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
145 bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
146 fi
Andrew Geissler82c905d2020-04-13 13:39:40 -0500147}
148
149do_install_append_class-target() {
150 # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
151 ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
152
153 # This contains host-specific information used for building miniperl (a helper executable built with host compiler)
154 # and therefore isn't reproducible. I believe the file isn't actually needed on target.
155 rm ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
156}
157
158do_install_append_class-nativesdk() {
159 # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
160 ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
161
162 create_wrapper ${D}${bindir}/perl \
Andrew Geisslerd25ed322020-06-27 00:28:28 -0500163 PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
Andrew Geissler82c905d2020-04-13 13:39:40 -0500164}
165
166do_install_append_class-native () {
167 # Those wrappers mean that perl installed from sstate (which may change
168 # path location) works and that in the nativesdk case, the SDK can be
169 # installed to a different location from the one it was built for.
170 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}'
171
172 # Use /usr/bin/env nativeperl for the perl script.
173 for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
174 sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
175 done
176}
177
178PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
179
180perl_package_preprocess () {
181 # Fix up installed configuration
182 sed -i -e "s,${D},,g" \
183 -e "s,${DEBUG_PREFIX_MAP},,g" \
184 -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
185 -e "s,-isystem${STAGING_INCDIR} ,,g" \
186 -e "s,${STAGING_LIBDIR},${libdir},g" \
187 -e "s,${STAGING_BINDIR},${bindir},g" \
188 -e "s,${STAGING_INCDIR},${includedir},g" \
189 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
190 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
191 -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
192 -e 's:${RECIPE_SYSROOT}::g' \
193 ${PKGD}${bindir}/h2xs.perl \
194 ${PKGD}${bindir}/h2ph.perl \
195 ${PKGD}${bindir}/pod2man.perl \
196 ${PKGD}${bindir}/pod2text.perl \
197 ${PKGD}${bindir}/pod2usage.perl \
198 ${PKGD}${bindir}/podchecker.perl \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500199 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
200 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
201 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
202 ${PKGD}${libdir}/perl5/${PV}/Config.pm \
203 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
204 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
205 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
206 ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
207 ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
208 ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
209 ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
210 ${PKGD}${libdir}/perl5/config.sh
211}
212
213inherit update-alternatives
214
215ALTERNATIVE_PRIORITY = "100"
216
217ALTERNATIVE_${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
Andrew Geissler475cb722020-07-10 16:00:51 -0500218 piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500219 prove ptar ptardiff ptargrep shasum splain xsubpp zipdetails"
220ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
221ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
222ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
223ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
224ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
225ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
226ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
227ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
228ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
229ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
230ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
231ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
232ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
233ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
234ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
235ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500236ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
237ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
238ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
239ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
240ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
241ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
242ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
243ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
244
245require perl-ptest.inc
246
247FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
248 ${libdir}/perl5/site_perl \
249 ${libdir}/perl5/${PV}/Config.pm \
250 ${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
251 ${libdir}/perl5/${PV}/*/Config_git.pl \
252 ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
253 ${libdir}/perl5/config.sh \
254 ${libdir}/perl5/${PV}/strict.pm \
255 ${libdir}/perl5/${PV}/warnings.pm \
256 ${libdir}/perl5/${PV}/warnings \
257 ${libdir}/perl5/${PV}/vars.pm \
258 ${libdir}/perl5/site_perl \
259 ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
260 ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
261 ${libdir}/perl5/${PV}/ExtUtils/typemap \
262 "
263RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
264 perl-module-warnings-register"
265
266FILES_${PN}-staticdev_append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
267
268FILES_${PN}-dev_append = " ${libdir}/perl5/${PV}/*/CORE"
269
270FILES_${PN}-doc_append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
271 ${libdir}/perl5/${PV}/*/.packlist \
272 ${libdir}/perl5/${PV}/Encode/encode.h \
273 "
274PACKAGES += "${PN}-misc"
275
276FILES_${PN}-misc = "${bindir}/*"
277
278PACKAGES += "${PN}-pod"
279
280FILES_${PN}-pod = "${libdir}/perl5/${PV}/pod \
281 ${libdir}/perl5/${PV}/*.pod \
282 ${libdir}/perl5/${PV}/*/*.pod \
283 ${libdir}/perl5/${PV}/*/*/*.pod \
284 ${libdir}/perl5/${PV}/*/*/*/*.pod \
285 "
286
287PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
288
289FILES_${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
290 "
291FILES_${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
292
293ALTERNATIVE_PRIORITY = "40"
294ALTERNATIVE_${PN}-doc = "Thread.3"
295ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
296
297# Create a perl-modules package recommending all the other perl
298# packages (actually the non modules packages and not created too)
299ALLOW_EMPTY_${PN}-modules = "1"
300PACKAGES += "${PN}-modules "
301
302PACKAGESPLITFUNCS_prepend = "split_perl_packages "
303
304python split_perl_packages () {
305 libdir = d.expand('${libdir}/perl5/${PV}')
306 do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
307 do_split_packages(d, libdir, r'.*linux/([^\/]*)\.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/([^\/]*)\.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/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
310 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)
Andrew Geisslerd25ed322020-06-27 00:28:28 -0500311 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)
Andrew Geissler82c905d2020-04-13 13:39:40 -0500312
313 # perl-modules should recommend every perl module, and only the
314 # modules. Don't attempt to use the result of do_split_packages() as some
315 # modules are manually split (eg. perl-module-unicore).
316 packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
317 d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
318
319 # Read the pre-generated dependency file, and use it to set module dependecies
320 for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
321 splitline = line.split()
322 if bb.data.inherits_class('native', d):
323 module = splitline[0] + '-native'
324 depends = "perl-native"
325 else:
326 module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}")
327 depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
328 d.appendVar(d.expand(module), " " + depends)
329}
330
331python() {
332 if d.getVar('CLASSOVERRIDE') == "class-target":
Andrew Geissler1e34c2d2020-05-29 16:02:59 -0500333 d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
Andrew Geissler82c905d2020-04-13 13:39:40 -0500334 elif d.getVar('CLASSOVERRIDE') == "class-native":
335 d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
336 elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
337 d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
338}
339
340RDEPENDS_${PN}-misc += "perl perl-modules"
341RDEPENDS_${PN}-pod += "perl"
342
343BBCLASSEXTEND = "native nativesdk"
344
345SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
346
347do_create_rdepends_inc() {
348 cd ${WORKDIR}
349 cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
350
351# Some additional dependencies that the above doesn't manage to figure out
352RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
353RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
354RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
355RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
356
357# Generated depends list beyond this line
358EOPREAMBLE
359 test -e packages-split.new && rm -rf packages-split.new
360 cp -r packages-split packages-split.new && cd packages-split.new
361 find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
362 egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
363 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:] | \
364 awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
365 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 | \
366 sort -u | \
367 sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
368 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' | \
369 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
370 cp ${WORKDIR}/perl-rdepends.generated ${THISDIR}/files/perl-rdepends.txt
371}
372
373# bitbake perl -c create_rdepends_inc
374addtask do_create_rdepends_inc
375
376SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
377
378perl_sysroot_create_wrapper () {
379 mkdir -p ${SYSROOT_DESTDIR}${bindir}
380 # Create a wrapper that /usr/bin/env perl will use to get perl-native.
381 # This MUST live in the normal bindir.
382 cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
383#!/bin/sh
384realpath=\`readlink -fn \$0\`
385exec \`dirname \$realpath\`/perl-native/perl "\$@"
386EOF
387 chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
388 cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
389}