diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-native_5.14.2.bb')
| -rw-r--r-- | meta/recipes-devtools/perl/perl-native_5.14.2.bb | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-native_5.14.2.bb b/meta/recipes-devtools/perl/perl-native_5.14.2.bb new file mode 100644 index 0000000000..0f49950478 --- /dev/null +++ b/meta/recipes-devtools/perl/perl-native_5.14.2.bb | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | DESCRIPTION = "Perl is a popular scripting language." | ||
| 2 | HOMEPAGE = "http://www.perl.org/" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "Artistic|GPL" | ||
| 5 | LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ | ||
| 6 | file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" | ||
| 7 | PR = "r0" | ||
| 8 | |||
| 9 | LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ | ||
| 10 | file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" | ||
| 11 | |||
| 12 | SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \ | ||
| 13 | file://Configure-multilib.patch \ | ||
| 14 | file://perl-configpm-switch.patch \ | ||
| 15 | file://native-nopacklist.patch \ | ||
| 16 | file://native-perlinc.patch \ | ||
| 17 | file://MM_Unix.pm.patch" | ||
| 18 | |||
| 19 | SRC_URI[md5sum] = "3306fbaf976dcebdcd49b2ac0be00eb9" | ||
| 20 | SRC_URI[sha256sum] = "6488359573bd7d41761bf935f66f827dc220fb3df961ef9b775d51fbd66548d3" | ||
| 21 | |||
| 22 | S = "${WORKDIR}/perl-${PV}" | ||
| 23 | |||
| 24 | inherit native | ||
| 25 | |||
| 26 | NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" | ||
| 27 | |||
| 28 | export LD="${CCLD}" | ||
| 29 | |||
| 30 | do_configure () { | ||
| 31 | ./Configure \ | ||
| 32 | -Dcc="${CC}" \ | ||
| 33 | -Dcflags="${CFLAGS}" \ | ||
| 34 | -Dldflags="${LDFLAGS}" \ | ||
| 35 | -Dcf_by="Open Embedded" \ | ||
| 36 | -Dprefix=${prefix} \ | ||
| 37 | -Dvendorprefix=${prefix} \ | ||
| 38 | -Dvendorprefix=${prefix} \ | ||
| 39 | -Dsiteprefix=${prefix} \ | ||
| 40 | \ | ||
| 41 | -Dbin=${STAGING_BINDIR}/${PN} \ | ||
| 42 | -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \ | ||
| 43 | -Darchlib=${STAGING_LIBDIR}/perl/${PV} \ | ||
| 44 | -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \ | ||
| 45 | -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \ | ||
| 46 | -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \ | ||
| 47 | -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \ | ||
| 48 | \ | ||
| 49 | -Duseshrplib \ | ||
| 50 | -Dusethreads \ | ||
| 51 | -Duseithreads \ | ||
| 52 | -Duselargefiles \ | ||
| 53 | -Dnoextensions=ODBM_File \ | ||
| 54 | -Ud_dosuid \ | ||
| 55 | -Ui_db \ | ||
| 56 | -Ui_ndbm \ | ||
| 57 | -Ui_gdbm \ | ||
| 58 | -Di_shadow \ | ||
| 59 | -Di_syslog \ | ||
| 60 | -Duseperlio \ | ||
| 61 | -Dman3ext=3pm \ | ||
| 62 | -Uafs \ | ||
| 63 | -Ud_csh \ | ||
| 64 | -Uusesfio \ | ||
| 65 | -Uusenm -des | ||
| 66 | } | ||
| 67 | |||
| 68 | do_install () { | ||
| 69 | oe_runmake 'DESTDIR=${D}' install | ||
| 70 | |||
| 71 | # We need a hostperl link for building perl | ||
| 72 | ln -sf perl${PV} ${D}${bindir}/hostperl | ||
| 73 | |||
| 74 | ln -sf perl ${D}${libdir}/perl5 | ||
| 75 | |||
| 76 | install -d ${D}${libdir}/perl/${PV}/CORE \ | ||
| 77 | ${D}${datadir}/perl/${PV}/ExtUtils | ||
| 78 | |||
| 79 | # Save native config | ||
| 80 | install config.sh ${D}${libdir}/perl | ||
| 81 | install lib/Config.pm ${D}${libdir}/perl/${PV}/ | ||
| 82 | install lib/ExtUtils/typemap ${D}${libdir}/perl/${PV}/ExtUtils/ | ||
| 83 | |||
| 84 | # perl shared library headers | ||
| 85 | for i in av.h bitcount.h config.h cop.h cv.h dosish.h embed.h embedvar.h \ | ||
| 86 | EXTERN.h fakesdio.h fakethr.h form.h gv.h handy.h hv.h INTERN.h \ | ||
| 87 | intrpvar.h iperlsys.h keywords.h l1_char_class_tab.h malloc_ctl.h \ | ||
| 88 | metaconfig.h mg.h mydtrace.h nostdio.h opcode.h op.h opnames.h \ | ||
| 89 | op_reg_common.h overload.h pad.h parser.h patchlevel.h perlapi.h \ | ||
| 90 | perl.h perlio.h perliol.h perlsdio.h perlsfio.h perlvars.h \ | ||
| 91 | perly.h pp.h pp_proto.h proto.h reentr.h regcharclass.h regcomp.h \ | ||
| 92 | regexp.h regnodes.h scope.h sv.h thread.h time64_config.h \ | ||
| 93 | time64.h uconfig.h unixish.h utf8.h utfebcdic.h util.h \ | ||
| 94 | uudmap.h warnings.h XSUB.h | ||
| 95 | do | ||
| 96 | install $i ${D}${libdir}/perl/${PV}/CORE | ||
| 97 | done | ||
| 98 | |||
| 99 | create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/' | ||
| 100 | create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/' | ||
| 101 | } | ||
| 102 | |||
| 103 | SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper" | ||
| 104 | |||
| 105 | perl_sysroot_create_wrapper () { | ||
| 106 | mkdir -p ${SYSROOT_DESTDIR}${bindir} | ||
| 107 | # Create a wrapper that /usr/bin/env perl will use to get perl-native. | ||
| 108 | # This MUST live in the normal bindir. | ||
| 109 | cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF | ||
| 110 | #!/bin/sh | ||
| 111 | realpath=\`readlink -fn \$0\` | ||
| 112 | exec \`dirname \$realpath\`/perl-native/perl "\$@" | ||
| 113 | EOF | ||
| 114 | chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl | ||
| 115 | cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl | ||
| 116 | } | ||
