summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-native_5.22.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-native_5.22.0.bb')
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.22.0.bb128
1 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-native_5.22.0.bb b/meta/recipes-devtools/perl/perl-native_5.22.0.bb
new file mode 100644
index 0000000000..dbfd82d23f
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-native_5.22.0.bb
@@ -0,0 +1,128 @@
1SUMMARY = "Perl scripting language"
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "libs"
4LICENSE = "Artistic-1.0 | GPL-1.0+"
5
6LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
7 file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
8
9SRC_URI = "http://www.cpan.org/src/5.0/${BP}.tar.xz \
10 file://Configure-multilib.patch \
11 file://perl-configpm-switch.patch \
12 file://native-nopacklist.patch \
13 file://native-perlinc.patch \
14 file://MM_Unix.pm.patch \
15 file://debian/errno_ver.diff \
16 file://dynaloaderhack.patch \
17 "
18
19SRC_URI[md5sum] = "ff0f09b17de426eff323426cb140ee79"
20SRC_URI[sha256sum] = "be83ead0c5c26cbbe626fa4bac1a4beabe23a9eebc15d35ba49ccde11878e196"
21
22S = "${WORKDIR}/perl-${PV}"
23
24inherit native
25
26NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
27
28export LD="${CCLD}"
29
30do_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 -Dsed=/bin/sed \
63 -Uafs \
64 -Ud_csh \
65 -Uusesfio \
66 -Uusenm -des
67}
68
69do_install () {
70 oe_runmake 'DESTDIR=${D}' install
71
72 # We need a hostperl link for building perl
73 ln -sf perl${PV} ${D}${bindir}/hostperl
74
75 ln -sf perl ${D}${libdir}/perl5
76
77 install -d ${D}${libdir}/perl/${PV}/CORE \
78 ${D}${datadir}/perl/${PV}/ExtUtils
79
80 # Save native config
81 install config.sh ${D}${libdir}/perl
82 install lib/Config.pm ${D}${libdir}/perl/${PV}/
83 install lib/ExtUtils/typemap ${D}${libdir}/perl/${PV}/ExtUtils/
84
85 # perl shared library headers
86 # reference perl 5.20.0-1 in debian:
87 # https://packages.debian.org/experimental/i386/perl/filelist
88 for i in av.h bitcount.h charclass_invlists.h config.h cop.h cv.h dosish.h \
89 embed.h embedvar.h EXTERN.h fakesdio.h feature.h form.h git_version.h \
90 gv.h handy.h hv_func.h hv.h inline.h INTERN.h intrpvar.h iperlsys.h \
91 keywords.h l1_char_class_tab.h malloc_ctl.h metaconfig.h mg_data.h \
92 mg.h mg_raw.h mg_vtable.h mydtrace.h nostdio.h opcode.h op.h \
93 opnames.h op_reg_common.h overload.h pad.h parser.h patchlevel.h \
94 perlapi.h perl.h perlio.h perliol.h perlsdio.h perlvars.h perly.h \
95 pp.h pp_proto.h proto.h reentr.h regcharclass.h regcomp.h regexp.h \
96 regnodes.h scope.h sv.h thread.h time64_config.h time64.h uconfig.h \
97 unicode_constants.h unixish.h utf8.h utfebcdic.h util.h uudmap.h \
98 vutil.h warnings.h XSUB.h
99 do
100 install $i ${D}${libdir}/perl/${PV}/CORE
101 done
102
103 create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
104 create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
105
106 # Use /usr/bin/env nativeperl for the perl script.
107 for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
108 sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
109 done
110}
111
112SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
113
114perl_sysroot_create_wrapper () {
115 mkdir -p ${SYSROOT_DESTDIR}${bindir}
116 # Create a wrapper that /usr/bin/env perl will use to get perl-native.
117 # This MUST live in the normal bindir.
118 cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF
119#!/bin/sh
120realpath=\`readlink -fn \$0\`
121exec \`dirname \$realpath\`/perl-native/perl "\$@"
122EOF
123 chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl
124 cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl
125}
126
127# Fix the path in sstate
128SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"