diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.32.1.bb')
-rw-r--r-- | meta/recipes-devtools/perl/perl_5.32.1.bb | 390 |
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 @@ | |||
1 | SUMMARY = "Perl scripting language" | ||
2 | HOMEPAGE = "http://www.perl.org/" | ||
3 | DESCRIPTION = "Perl is a highly capable, feature-rich programming language" | ||
4 | SECTION = "devel" | ||
5 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
6 | LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \ | ||
7 | file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \ | ||
8 | " | ||
9 | |||
10 | |||
11 | SRC_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 | " | ||
25 | SRC_URI_append_class-native = " \ | ||
26 | file://perl-configpm-switch.patch \ | ||
27 | " | ||
28 | SRC_URI_append_class-target = " \ | ||
29 | file://encodefix.patch \ | ||
30 | " | ||
31 | |||
32 | SRC_URI[perl.sha256sum] = "03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c" | ||
33 | SRC_URI[perl-cross.sha256sum] = "91c66f6b2b99fccfd4fee14660b677380b0c98f9456359e91449798c2ad2ef25" | ||
34 | |||
35 | S = "${WORKDIR}/perl-${PV}" | ||
36 | |||
37 | inherit upstream-version-is-even update-alternatives | ||
38 | |||
39 | DEPENDS += "zlib virtual/crypt" | ||
40 | |||
41 | PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0" | ||
42 | |||
43 | PACKAGECONFIG ??= "bdb gdbm" | ||
44 | PACKAGECONFIG[bdb] = ",-Ui_db,db" | ||
45 | PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm" | ||
46 | |||
47 | # Don't generate comments in enc2xs output files. They are not reproducible | ||
48 | export ENC2XS_NO_COMMENTS = "1" | ||
49 | |||
50 | do_unpack_append() { | ||
51 | bb.build.exec_func('do_copy_perlcross', d) | ||
52 | } | ||
53 | |||
54 | do_copy_perlcross() { | ||
55 | cp -rfp ${WORKDIR}/perl-cross*/* ${S} | ||
56 | } | ||
57 | |||
58 | do_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 | |||
82 | do_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 | |||
95 | do_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 | |||
105 | do_configure_append() { | ||
106 | if [ -n "$SOURCE_DATE_EPOCH" ]; then | ||
107 | PERL_BUILD_DATE="$(${PYTHON} -c "\ | ||
108 | from datetime import datetime, timezone; \ | ||
109 | print(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 | |||
115 | do_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 | |||
127 | do_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 | |||
150 | do_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 | |||
159 | do_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 | |||
167 | do_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 | |||
179 | PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess" | ||
180 | |||
181 | perl_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 | |||
214 | inherit update-alternatives | ||
215 | |||
216 | ALTERNATIVE_PRIORITY = "100" | ||
217 | |||
218 | ALTERNATIVE_${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" | ||
221 | ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist" | ||
222 | ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan" | ||
223 | ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs" | ||
224 | ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess" | ||
225 | ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph" | ||
226 | ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs" | ||
227 | ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh" | ||
228 | ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp" | ||
229 | ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg" | ||
230 | ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv" | ||
231 | ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm" | ||
232 | ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html" | ||
233 | ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man" | ||
234 | ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text" | ||
235 | ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage" | ||
236 | ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker" | ||
237 | ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove" | ||
238 | ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar" | ||
239 | ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff" | ||
240 | ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep" | ||
241 | ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum" | ||
242 | ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain" | ||
243 | ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp" | ||
244 | ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails" | ||
245 | |||
246 | require perl-ptest.inc | ||
247 | |||
248 | FILES_${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 | " | ||
264 | RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \ | ||
265 | perl-module-warnings-register" | ||
266 | |||
267 | FILES_${PN}-staticdev_append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a" | ||
268 | |||
269 | FILES_${PN}-dev_append = " ${libdir}/perl5/${PV}/*/CORE" | ||
270 | |||
271 | FILES_${PN}-doc_append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \ | ||
272 | ${libdir}/perl5/${PV}/*/.packlist \ | ||
273 | ${libdir}/perl5/${PV}/Encode/encode.h \ | ||
274 | " | ||
275 | PACKAGES += "${PN}-misc" | ||
276 | |||
277 | FILES_${PN}-misc = "${bindir}/*" | ||
278 | |||
279 | PACKAGES += "${PN}-pod" | ||
280 | |||
281 | FILES_${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 | |||
288 | PACKAGES += "${PN}-module-cpan ${PN}-module-unicore" | ||
289 | |||
290 | FILES_${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \ | ||
291 | " | ||
292 | FILES_${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore" | ||
293 | |||
294 | ALTERNATIVE_PRIORITY = "40" | ||
295 | ALTERNATIVE_${PN}-doc = "Thread.3" | ||
296 | ALTERNATIVE_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) | ||
300 | ALLOW_EMPTY_${PN}-modules = "1" | ||
301 | PACKAGES += "${PN}-modules " | ||
302 | |||
303 | PACKAGESPLITFUNCS_prepend = "split_perl_packages " | ||
304 | |||
305 | python 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 | |||
332 | python() { | ||
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 | |||
341 | RDEPENDS_${PN}-misc += "perl perl-modules" | ||
342 | RDEPENDS_${PN}-pod += "perl" | ||
343 | |||
344 | BBCLASSEXTEND = "native nativesdk" | ||
345 | |||
346 | SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" | ||
347 | |||
348 | do_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 | ||
353 | RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix" | ||
354 | RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc" | ||
355 | RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes" | ||
356 | RDEPENDS_${PN}-module-overload += "${PN}-module-overloading" | ||
357 | |||
358 | # Generated depends list beyond this line | ||
359 | EOPREAMBLE | ||
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 | ||
375 | addtask do_create_rdepends_inc | ||
376 | |||
377 | SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper" | ||
378 | |||
379 | perl_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 | ||
385 | realpath=\`readlink -fn \$0\` | ||
386 | exec \`dirname \$realpath\`/perl-native/perl "\$@" | ||
387 | EOF | ||
388 | chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl | ||
389 | cat ${SYSROOT_DESTDIR}${bindir}/nativeperl | ||
390 | } | ||