perl_5.40.2.bb 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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. SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
  10. file://perl-rdepends.txt \
  11. file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
  12. file://errno_ver.diff \
  13. file://native-perlinc.patch \
  14. file://perl-dynloader.patch \
  15. file://0002-Constant-Fix-up-shebang.patch \
  16. file://determinism.patch \
  17. file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
  18. "
  19. SRC_URI:append:class-native = " \
  20. file://perl-configpm-switch.patch \
  21. "
  22. SRC_URI:append:class-target = " \
  23. file://encodefix.patch \
  24. "
  25. SRC_URI[perl.sha256sum] = "10d4647cfbb543a7f9ae3e5f6851ec49305232ea7621aed24c7cfbb0bef4b70d"
  26. B = "${WORKDIR}/perl-${PV}-build"
  27. inherit upstream-version-is-even update-alternatives
  28. DEPENDS += "perlcross-native zlib virtual/crypt"
  29. # make 4.1 has race issues with the double-colon usage of MakeMaker, see #14096
  30. DEPENDS += "make-native"
  31. PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
  32. PACKAGECONFIG ??= "gdbm"
  33. PACKAGECONFIG:append:libc-musl = " anylocale lcallnopairs"
  34. PACKAGECONFIG[bdb] = ",-Ui_db,db"
  35. PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
  36. PACKAGECONFIG[anylocale] = "-Dd_setlocale_accepts_any_locale_name=define,,"
  37. PACKAGECONFIG[lcallnopairs] = "-Dd_perl_lc_all_uses_name_value_pairs=undef -Dd_perl_lc_all_category_positions_init=define -Dd_perl_lc_all_separator=define,,"
  38. PACKAGECONFIG_CONFARGS:append:libc-musl = " -Dperl_lc_all_category_positions_init='{ 0, 1, 2, 3, 4, 5 }' -Dperl_lc_all_separator='";"'"
  39. # Don't generate comments in enc2xs output files. They are not reproducible
  40. export ENC2XS_NO_COMMENTS = "1"
  41. CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
  42. do_configure:prepend() {
  43. rm -rf ${B}
  44. cp -rfp ${S} ${B}
  45. cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${B}
  46. cd ${B}
  47. }
  48. do_configure:class-target() {
  49. ./configure --prefix=${prefix} --libdir=${libdir} \
  50. --target=${TARGET_SYS} \
  51. -Duse64bitint \
  52. -Duseshrplib \
  53. -Dusethreads \
  54. -Dsoname=libperl.so.5 \
  55. -Dvendorprefix=${prefix} \
  56. -Dvendorlibdir=${libdir} \
  57. -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
  58. -Dlibpth='${libdir} ${base_libdir}' \
  59. -Dglibpth='${libdir} ${base_libdir}' \
  60. -Alddlflags=' ${LDFLAGS}' \
  61. -Dd_gnulibc=define \
  62. ${PACKAGECONFIG_CONFARGS}
  63. #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
  64. #adds the archlibexp path to @INC during run-time initialization of a
  65. #new perl interpreter.
  66. #Because we've changed this value in a temporary way to make it
  67. #possible to use ExtUtils::Embed in the target build (the temporary
  68. #value in config.sh gets re-stripped out during packaging), the
  69. #ARCHLIB_EXP value that gets generated still uses the temporary version
  70. #instead of the original expected version (i.e. becauses it's in the
  71. #generated config.h, it doesn't get stripped out during packaging like
  72. #the others in config.sh).
  73. sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
  74. }
  75. do_configure:class-nativesdk() {
  76. ./configure --prefix=${prefix} --libdir=${libdir} \
  77. --target=${TARGET_SYS} \
  78. -Duseshrplib \
  79. -Dusethreads \
  80. -Dsoname=libperl.so.5 \
  81. -Dvendorprefix=${prefix} \
  82. -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
  83. -Alddlflags=' ${LDFLAGS}' \
  84. ${PACKAGECONFIG_CONFARGS}
  85. # See the comment above
  86. sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
  87. }
  88. do_configure:class-native() {
  89. ./configure --prefix=${prefix} \
  90. -Dbin=${bindir}/perl-native \
  91. -Duseshrplib \
  92. -Dusethreads \
  93. -Dsoname=libperl.so.5 \
  94. -Dvendorprefix=${prefix} \
  95. -Ui_xlocale \
  96. -Alddlflags=' ${LDFLAGS}' \
  97. ${PACKAGECONFIG_CONFARGS}
  98. # This prevents leakage of build paths into perl-native binaries, which
  99. # causes non-deterministic troubles when those paths no longer exist or aren't accessible.
  100. sed -i -e "s,${STAGING_LIBDIR},/completelyboguspath,g" config.h
  101. }
  102. do_configure:append() {
  103. if [ -n "$SOURCE_DATE_EPOCH" ]; then
  104. PERL_BUILD_DATE="$(${PYTHON} -c "\
  105. from datetime import datetime, timezone; \
  106. print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
  107. ")"
  108. echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
  109. fi
  110. }
  111. do_compile() {
  112. oe_runmake
  113. }
  114. do_install() {
  115. oe_runmake 'DESTDIR=${D}' install
  116. install -d ${D}${libdir}/perl5
  117. install -d ${D}${libdir}/perl5/${PV}/
  118. install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
  119. # Save native config
  120. install config.sh ${D}${libdir}/perl5
  121. install lib/Config.pm ${D}${libdir}/perl5/${PV}/
  122. install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
  123. # Fix up shared library
  124. dir=$(echo ${D}/${libdir}/perl5/${PV}/*/CORE)
  125. rm $dir/libperl.so
  126. ln -sf ../../../../libperl.so.${PERL_LIB_VER} $dir/libperl.so
  127. # Try to catch Bug #13946
  128. if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
  129. bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
  130. fi
  131. }
  132. do_install:append:class-target() {
  133. # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
  134. ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
  135. # xconfig.h contains references to build host architecture, and yet is included from various other places.
  136. # To make it reproducible let's make it a copy of config.h patch that is specific to the target architecture.
  137. # It is believed that the original header is the product of building miniperl (a helper executable built with host compiler).
  138. cp ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
  139. }
  140. do_install:append:class-nativesdk() {
  141. # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
  142. ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
  143. create_wrapper ${D}${bindir}/perl \
  144. PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
  145. }
  146. do_install:append:class-native () {
  147. # Those wrappers mean that perl installed from sstate (which may change
  148. # path location) works and that in the nativesdk case, the SDK can be
  149. # installed to a different location from the one it was built for.
  150. 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}'
  151. # Use /usr/bin/env nativeperl for the perl script.
  152. for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
  153. sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
  154. done
  155. }
  156. PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
  157. perl_package_preprocess () {
  158. # Fix up installed configuration
  159. sed -i -e "s,${D},,g" \
  160. -e "s,${DEBUG_PREFIX_MAP},,g" \
  161. -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
  162. -e "s,-isystem${STAGING_INCDIR} ,,g" \
  163. -e "s,${STAGING_LIBDIR},${libdir},g" \
  164. -e "s,${STAGING_BINDIR},${bindir},g" \
  165. -e "s,${STAGING_INCDIR},${includedir},g" \
  166. -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
  167. -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
  168. -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
  169. -e 's:${RECIPE_SYSROOT}::g' \
  170. ${PKGD}${bindir}/h2xs.perl \
  171. ${PKGD}${bindir}/h2ph.perl \
  172. ${PKGD}${bindir}/pod2man.perl \
  173. ${PKGD}${bindir}/pod2text.perl \
  174. ${PKGD}${bindir}/pod2usage.perl \
  175. ${PKGD}${bindir}/podchecker.perl \
  176. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
  177. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h \
  178. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
  179. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
  180. ${PKGD}${libdir}/perl5/${PV}/Config.pm \
  181. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
  182. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
  183. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
  184. ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
  185. ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
  186. ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
  187. ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
  188. ${PKGD}${libdir}/perl5/config.sh
  189. }
  190. inherit update-alternatives
  191. ALTERNATIVE_PRIORITY = "100"
  192. ALTERNATIVE:${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
  193. piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
  194. prove ptar ptardiff ptargrep shasum splain streamzip xsubpp zipdetails"
  195. ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
  196. ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
  197. ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
  198. ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
  199. ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
  200. ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
  201. ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
  202. ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
  203. ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
  204. ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
  205. ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
  206. ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
  207. ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
  208. ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
  209. ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
  210. ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
  211. ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
  212. ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
  213. ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
  214. ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
  215. ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
  216. ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
  217. ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip"
  218. ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
  219. ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
  220. require perl-ptest.inc
  221. FILES:${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
  222. ${libdir}/perl5/site_perl \
  223. ${libdir}/perl5/${PV}/Config.pm \
  224. ${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
  225. ${libdir}/perl5/${PV}/*/Config_git.pl \
  226. ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
  227. ${libdir}/perl5/config.sh \
  228. ${libdir}/perl5/${PV}/strict.pm \
  229. ${libdir}/perl5/${PV}/warnings.pm \
  230. ${libdir}/perl5/${PV}/warnings \
  231. ${libdir}/perl5/${PV}/vars.pm \
  232. ${libdir}/perl5/site_perl \
  233. ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
  234. ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
  235. ${libdir}/perl5/${PV}/ExtUtils/typemap \
  236. "
  237. RPROVIDES:${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
  238. perl-module-warnings-register perl-module-config-git"
  239. FILES:${PN}-staticdev:append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
  240. FILES:${PN}-dev:append = " ${libdir}/perl5/${PV}/*/CORE"
  241. FILES:${PN}-doc:append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
  242. ${libdir}/perl5/${PV}/*/.packlist \
  243. ${libdir}/perl5/${PV}/Encode/encode.h \
  244. "
  245. PACKAGES += "${PN}-misc"
  246. FILES:${PN}-misc = "${bindir}/*"
  247. PACKAGES += "${PN}-pod"
  248. FILES:${PN}-pod = "${libdir}/perl5/${PV}/pod \
  249. ${libdir}/perl5/${PV}/*.pod \
  250. ${libdir}/perl5/${PV}/*/*.pod \
  251. ${libdir}/perl5/${PV}/*/*/*.pod \
  252. ${libdir}/perl5/${PV}/*/*/*/*.pod \
  253. "
  254. PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
  255. FILES:${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
  256. "
  257. FILES:${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
  258. ALTERNATIVE_PRIORITY = "40"
  259. ALTERNATIVE:${PN}-doc = "Thread.3"
  260. ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
  261. # Create a perl-modules package that represents the collection of all the
  262. # other perl packages (actually the non modules packages and not created too).
  263. ALLOW_EMPTY:${PN}-modules = "1"
  264. PACKAGES += "${PN}-modules "
  265. PACKAGESPLITFUNCS =+ "split_perl_packages"
  266. python split_perl_packages () {
  267. libdir = d.expand('${libdir}/perl5/${PV}')
  268. do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
  269. do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
  270. do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
  271. do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
  272. 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)
  273. 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)
  274. # perl-modules should runtime-depend on every perl module, and only the
  275. # modules. Don't attempt to use the result of do_split_packages() as some
  276. # modules are manually split (eg. perl-module-unicore). Also, the split
  277. # packages should not include packages defined in RPROVIDES:${PN}.
  278. perl_sub_pkgs = d.getVar(d.expand("RPROVIDES:${PN}")).split()
  279. packages = filter(lambda p: 'perl-module-' in p and p not in perl_sub_pkgs, d.getVar('PACKAGES').split())
  280. d.setVar(d.expand("RDEPENDS:${PN}-modules"), ' '.join(packages))
  281. # Read the pre-generated dependency file, and use it to set module dependecies
  282. for line in open(d.getVar("UNPACKDIR") + '/perl-rdepends.txt').readlines():
  283. splitline = line.split()
  284. # Filter empty lines and comments
  285. if len(splitline) == 0 or splitline[0].startswith("#"):
  286. continue
  287. if bb.data.inherits_class('native', d):
  288. module = splitline[0] + '-native'
  289. depends = "perl-native"
  290. else:
  291. module = splitline[0].replace("RDEPENDS:perl", "RDEPENDS:${PN}")
  292. depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
  293. d.appendVar(d.expand(module), " " + depends)
  294. }
  295. python() {
  296. if d.getVar('CLASSOVERRIDE') == "class-target":
  297. d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
  298. elif d.getVar('CLASSOVERRIDE') == "class-native":
  299. d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
  300. elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
  301. d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
  302. }
  303. RDEPENDS:${PN}-misc += "perl"
  304. RRECOMMENDS:${PN}-misc += "perl-modules"
  305. RDEPENDS:${PN}-pod += "perl"
  306. BBCLASSEXTEND = "native nativesdk"
  307. SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
  308. do_create_rdepends_inc() {
  309. cd ${WORKDIR}
  310. cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
  311. # Some additional dependencies that the above doesn't manage to figure out
  312. RDEPENDS:${PN}-module-file-path += "${PN}-module-file-spec"
  313. RDEPENDS:${PN}-module-file-spec += "${PN}-module-file-spec-unix"
  314. RDEPENDS:${PN}-module-file-spec += "${PN}-module-constant"
  315. RDEPENDS:${PN}-module-scalar-util += "${PN}-module-list-util"
  316. RDEPENDS:${PN}-module-file-temp += "${PN}-module-scalar-util"
  317. RDEPENDS:${PN}-module-file-temp += "${PN}-module-file-spec"
  318. RDEPENDS:${PN}-module-io-file += "${PN}-module-symbol"
  319. RDEPENDS:${PN}-module-io-file += "${PN}-module-carp"
  320. RDEPENDS:${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
  321. RDEPENDS:${PN}-module-test-builder += "${PN}-module-list-util"
  322. RDEPENDS:${PN}-module-test-builder += "${PN}-module-scalar-util"
  323. RDEPENDS:${PN}-module-test-builder-formatter += "${PN}-module-test2-formatter-tap"
  324. RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-fail"
  325. RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-pass"
  326. RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-v2"
  327. RDEPENDS:${PN}-module-test2-formatter-tap += "${PN}-module-test2-formatter"
  328. RDEPENDS:${PN}-module-thread-queue += "${PN}-module-attributes"
  329. RDEPENDS:${PN}-module-overload += "${PN}-module-overloading"
  330. # Generated depends list beyond this line
  331. EOPREAMBLE
  332. test -e packages-split.new && rm -rf packages-split.new
  333. cp -r packages-split packages-split.new && cd packages-split.new
  334. find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
  335. egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
  336. 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:] | \
  337. awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
  338. grep -v -e "\-vms\-" -e module-5 -e module-v5 -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 | \
  339. sort -u | \
  340. sed 's/^/RDEPENDS:/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
  341. egrep -wv 'module-devel-mat-dumper|module-net-ssleay|module-pluggable|module-io-compress-xz|module-io-compress-zstd' | \
  342. 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' | \
  343. 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
  344. cat ${WORKDIR}/perl-rdepends.inc ${WORKDIR}/perl-rdepends.generated > ${THISDIR}/files/perl-rdepends.txt
  345. }
  346. # bitbake perl -c create_rdepends_inc
  347. addtask do_create_rdepends_inc
  348. SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
  349. perl_sysroot_create_wrapper () {
  350. mkdir -p ${SYSROOT_DESTDIR}${bindir}
  351. # Create a wrapper that /usr/bin/env perl will use to get perl-native.
  352. # This MUST live in the normal bindir.
  353. cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
  354. #!/bin/sh
  355. realpath=\`readlink -fn \$0\`
  356. exec \`dirname \$realpath\`/perl-native/perl "\$@"
  357. EOF
  358. chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
  359. cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
  360. }
  361. SSTATE_HASHEQUIV_FILEMAP = " \
  362. populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${TMPDIR} \
  363. populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${COREBASE} \
  364. populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \
  365. populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \
  366. "