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