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