Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Perl scripting language" |
| 2 | HOMEPAGE = "http://www.perl.org/" |
| 3 | SECTION = "devel" |
| 4 | LICENSE = "Artistic-1.0 | GPL-1.0+" |
| 5 | LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \ |
| 6 | file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \ |
| 7 | " |
| 8 | |
| 9 | |
| 10 | SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 11 | https://github.com/arsv/perl-cross/releases/download/1.3/perl-cross-1.3.tar.gz;name=perl-cross \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 12 | 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 \ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 21 | file://fix-setgroup.patch \ |
Brad Bishop | c8f4712 | 2019-06-24 09:36:18 -0400 | [diff] [blame] | 22 | file://0001-enc2xs-Add-environment-variable-to-suppress-comments.patch \ |
| 23 | file://0002-Constant-Fix-up-shebang.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 24 | " |
| 25 | SRC_URI_append_class-native = " \ |
| 26 | file://perl-configpm-switch.patch \ |
| 27 | " |
| 28 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 29 | SRC_URI[perl.md5sum] = "9770584cdf9b5631c38097645ce33549" |
| 30 | SRC_URI[perl.sha256sum] = "851213c754d98ccff042caa40ba7a796b2cee88c5325f121be5cbb61bbf975f2" |
| 31 | SRC_URI[perl-cross.md5sum] = "4dda3daf9c4fe42b3d6a5dd052852a48" |
| 32 | SRC_URI[perl-cross.sha256sum] = "49edea1ea2cd6c5c47386ca71beda8d150c748835781354dbe7f75b1df27e703" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 33 | |
| 34 | S = "${WORKDIR}/perl-${PV}" |
| 35 | |
| 36 | inherit upstream-version-is-even |
| 37 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 38 | DEPENDS += "zlib virtual/crypt" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 39 | |
| 40 | PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0" |
| 41 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 42 | PACKAGECONFIG ??= "bdb gdbm" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 43 | PACKAGECONFIG[bdb] = ",-Ui_db,db" |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 44 | PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 45 | |
Brad Bishop | c8f4712 | 2019-06-24 09:36:18 -0400 | [diff] [blame] | 46 | # Don't generate comments in enc2xs output files. They are not reproducible |
| 47 | export ENC2XS_NO_COMMENTS = "1" |
| 48 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 49 | do_unpack_append() { |
| 50 | bb.build.exec_func('do_copy_perlcross', d) |
| 51 | } |
| 52 | |
| 53 | do_copy_perlcross() { |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 54 | cp -rfp ${WORKDIR}/perl-cross*/* ${S} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | do_configure_class-target() { |
| 58 | ./configure --prefix=${prefix} --libdir=${libdir} \ |
| 59 | --target=${TARGET_SYS} \ |
| 60 | -Duseshrplib \ |
| 61 | -Dsoname=libperl.so.5 \ |
| 62 | -Dvendorprefix=${prefix} \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 63 | -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \ |
| 64 | ${PACKAGECONFIG_CONFARGS} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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 | -Dsoname=libperl.so.5 \ |
| 86 | -Dvendorprefix=${prefix} \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 87 | -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \ |
| 88 | ${PACKAGECONFIG_CONFARGS} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 89 | |
| 90 | # See the comment above |
| 91 | sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h |
| 92 | } |
| 93 | |
| 94 | do_configure_class-native() { |
| 95 | ./configure --prefix=${prefix} \ |
| 96 | -Dbin=${bindir}/perl-native \ |
| 97 | -Duseshrplib \ |
| 98 | -Dsoname=libperl.so.5 \ |
| 99 | -Dvendorprefix=${prefix} \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 100 | -Ui_xlocale \ |
| 101 | ${PACKAGECONFIG_CONFARGS} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 102 | } |
| 103 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 104 | do_configure_append() { |
| 105 | if [ -n "$SOURCE_DATE_EPOCH" ]; then |
| 106 | PERL_BUILD_DATE="$(${PYTHON} -c "\ |
| 107 | from datetime import datetime, timezone; \ |
| 108 | print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \ |
| 109 | ")" |
| 110 | echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h |
| 111 | fi |
| 112 | } |
| 113 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 114 | do_compile() { |
| 115 | oe_runmake |
| 116 | } |
| 117 | |
| 118 | do_install() { |
| 119 | oe_runmake 'DESTDIR=${D}' install |
| 120 | |
| 121 | install -d ${D}${libdir}/perl5 |
| 122 | install -d ${D}${libdir}/perl5/${PV}/ |
| 123 | install -d ${D}${libdir}/perl5/${PV}/ExtUtils/ |
| 124 | |
| 125 | # Save native config |
| 126 | install config.sh ${D}${libdir}/perl5 |
| 127 | install lib/Config.pm ${D}${libdir}/perl5/${PV}/ |
| 128 | install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/ |
| 129 | |
| 130 | # Fix up shared library |
| 131 | rm ${D}/${libdir}/perl5/${PV}/*/CORE/libperl.so |
| 132 | ln -sf ../../../../libperl.so.${PERL_LIB_VER} $(echo ${D}/${libdir}/perl5/${PV}/*/CORE)/libperl.so |
| 133 | } |
| 134 | |
| 135 | do_install_append_class-target() { |
| 136 | # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch |
| 137 | ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl |
| 138 | |
| 139 | } |
| 140 | |
| 141 | do_install_append_class-nativesdk() { |
| 142 | # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch |
| 143 | ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl |
| 144 | |
| 145 | create_wrapper ${D}${bindir}/perl \ |
| 146 | PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl5/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl5/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl5/${PV}' |
| 147 | } |
| 148 | |
| 149 | do_install_append_class-native () { |
| 150 | # Those wrappers mean that perl installed from sstate (which may change |
| 151 | # path location) works and that in the nativesdk case, the SDK can be |
| 152 | # installed to a different location from the one it was built for. |
| 153 | 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}' |
| 154 | |
| 155 | # Use /usr/bin/env nativeperl for the perl script. |
| 156 | for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do |
| 157 | sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f |
| 158 | done |
| 159 | } |
| 160 | |
| 161 | PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess" |
| 162 | |
| 163 | perl_package_preprocess () { |
| 164 | # Fix up installed configuration |
| 165 | sed -i -e "s,${D},,g" \ |
| 166 | -e "s,${DEBUG_PREFIX_MAP},,g" \ |
| 167 | -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ |
| 168 | -e "s,-isystem${STAGING_INCDIR} ,,g" \ |
| 169 | -e "s,${STAGING_LIBDIR},${libdir},g" \ |
| 170 | -e "s,${STAGING_BINDIR},${bindir},g" \ |
| 171 | -e "s,${STAGING_INCDIR},${includedir},g" \ |
| 172 | -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ |
| 173 | -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ |
| 174 | -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \ |
| 175 | -e 's:${RECIPE_SYSROOT}::g' \ |
| 176 | ${PKGD}${bindir}/h2xs \ |
| 177 | ${PKGD}${bindir}/h2ph \ |
| 178 | ${PKGD}${bindir}/pod2man \ |
| 179 | ${PKGD}${bindir}/pod2text \ |
| 180 | ${PKGD}${bindir}/pod2usage \ |
| 181 | ${PKGD}${bindir}/podchecker \ |
| 182 | ${PKGD}${bindir}/podselect \ |
| 183 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \ |
| 184 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \ |
| 185 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \ |
| 186 | ${PKGD}${libdir}/perl5/${PV}/Config.pm \ |
| 187 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \ |
| 188 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 189 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 190 | ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \ |
| 191 | ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \ |
| 192 | ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \ |
| 193 | ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \ |
| 194 | ${PKGD}${libdir}/perl5/config.sh |
| 195 | } |
| 196 | |
| 197 | require perl-ptest.inc |
| 198 | |
| 199 | FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \ |
| 200 | ${libdir}/perl5/site_perl \ |
| 201 | ${libdir}/perl5/${PV}/Config.pm \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 202 | ${libdir}/perl5/${PV}/*/Config_git.pl \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 203 | ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \ |
| 204 | ${libdir}/perl5/config.sh \ |
| 205 | ${libdir}/perl5/${PV}/strict.pm \ |
| 206 | ${libdir}/perl5/${PV}/warnings.pm \ |
| 207 | ${libdir}/perl5/${PV}/warnings \ |
| 208 | ${libdir}/perl5/${PV}/vars.pm \ |
| 209 | ${libdir}/perl5/site_perl \ |
| 210 | " |
| 211 | RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \ |
| 212 | perl-module-warnings-register" |
| 213 | |
| 214 | FILES_${PN}-staticdev_append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a" |
| 215 | |
| 216 | FILES_${PN}-dev_append = " ${libdir}/perl5/${PV}/*/CORE" |
| 217 | |
| 218 | FILES_${PN}-doc_append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \ |
| 219 | ${libdir}/perl5/${PV}/*/.packlist \ |
| 220 | ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \ |
| 221 | ${libdir}/perl5/${PV}/ExtUtils/xsubpp \ |
| 222 | ${libdir}/perl5/${PV}/ExtUtils/typemap \ |
| 223 | ${libdir}/perl5/${PV}/Encode/encode.h \ |
| 224 | " |
| 225 | PACKAGES += "${PN}-misc" |
| 226 | |
| 227 | FILES_${PN}-misc = "${bindir}/*" |
| 228 | |
| 229 | PACKAGES += "${PN}-pod" |
| 230 | |
| 231 | FILES_${PN}-pod = "${libdir}/perl5/${PV}/pod \ |
| 232 | ${libdir}/perl5/${PV}/*.pod \ |
| 233 | ${libdir}/perl5/${PV}/*/*.pod \ |
| 234 | ${libdir}/perl5/${PV}/*/*/*.pod \ |
| 235 | ${libdir}/perl5/${PV}/*/*/*/*.pod \ |
| 236 | " |
| 237 | |
| 238 | PACKAGES += "${PN}-module-cpan ${PN}-module-unicore" |
| 239 | |
| 240 | FILES_${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \ |
| 241 | " |
| 242 | FILES_${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore" |
| 243 | |
| 244 | # Create a perl-modules package recommending all the other perl |
| 245 | # packages (actually the non modules packages and not created too) |
| 246 | ALLOW_EMPTY_${PN}-modules = "1" |
| 247 | PACKAGES += "${PN}-modules " |
| 248 | |
| 249 | PACKAGESPLITFUNCS_prepend = "split_perl_packages " |
| 250 | |
| 251 | python split_perl_packages () { |
| 252 | libdir = d.expand('${libdir}/perl5/${PV}') |
| 253 | do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False) |
| 254 | do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) |
| 255 | do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) |
| 256 | do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) |
| 257 | 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) |
| 258 | do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) |
| 259 | |
| 260 | # perl-modules should recommend every perl module, and only the |
| 261 | # modules. Don't attempt to use the result of do_split_packages() as some |
| 262 | # modules are manually split (eg. perl-module-unicore). |
| 263 | packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split()) |
| 264 | d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages)) |
| 265 | |
| 266 | # Read the pre-generated dependency file, and use it to set module dependecies |
| 267 | for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines(): |
| 268 | splitline = line.split() |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 269 | if bb.data.inherits_class('native', d): |
| 270 | module = splitline[0] + '-native' |
| 271 | depends = "perl-native" |
| 272 | else: |
| 273 | module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}") |
| 274 | depends = splitline[2].strip('"').replace("perl-module", "${PN}-module") |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 275 | d.appendVar(d.expand(module), " " + depends) |
| 276 | } |
| 277 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 278 | python() { |
| 279 | if d.getVar('CLASSOVERRIDE') == "class-target": |
| 280 | d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*(?<!native)$") |
| 281 | elif d.getVar('CLASSOVERRIDE') == "class-native": |
| 282 | d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$") |
| 283 | elif d.getVar('CLASSOVERRIDE') == "class-nativesdk": |
| 284 | d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*") |
| 285 | } |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 286 | |
| 287 | RDEPENDS_${PN}-misc += "perl perl-modules" |
| 288 | RDEPENDS_${PN}-pod += "perl" |
| 289 | |
| 290 | BBCLASSEXTEND = "native nativesdk" |
| 291 | |
| 292 | SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" |
| 293 | |
| 294 | do_create_rdepends_inc() { |
| 295 | cd ${WORKDIR} |
| 296 | cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc |
| 297 | |
| 298 | # Some additional dependencies that the above doesn't manage to figure out |
| 299 | RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix" |
| 300 | RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc" |
| 301 | RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes" |
| 302 | RDEPENDS_${PN}-module-overload += "${PN}-module-overloading" |
| 303 | |
| 304 | # Generated depends list beyond this line |
| 305 | EOPREAMBLE |
| 306 | test -e packages-split.new && rm -rf packages-split.new |
| 307 | cp -r packages-split packages-split.new && cd packages-split.new |
| 308 | find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d' |
| 309 | egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \ |
| 310 | 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:] | \ |
| 311 | awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \ |
| 312 | 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 | \ |
| 313 | sort -u | \ |
| 314 | sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \ |
| 315 | 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' | \ |
| 316 | 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 |
| 317 | cp ${WORKDIR}/perl-rdepends.generated ${THISDIR}/files/perl-rdepends.txt |
| 318 | } |
| 319 | |
| 320 | # bitbake perl -c create_rdepends_inc |
| 321 | addtask do_create_rdepends_inc |
| 322 | |
| 323 | SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper" |
| 324 | |
| 325 | perl_sysroot_create_wrapper () { |
| 326 | mkdir -p ${SYSROOT_DESTDIR}${bindir} |
| 327 | # Create a wrapper that /usr/bin/env perl will use to get perl-native. |
| 328 | # This MUST live in the normal bindir. |
| 329 | cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF |
| 330 | #!/bin/sh |
| 331 | realpath=\`readlink -fn \$0\` |
| 332 | exec \`dirname \$realpath\`/perl-native/perl "\$@" |
| 333 | EOF |
| 334 | chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl |
| 335 | cat ${SYSROOT_DESTDIR}${bindir}/nativeperl |
| 336 | } |
| 337 | |