diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-native_5.24.4.bb')
-rw-r--r-- | meta/recipes-devtools/perl/perl-native_5.24.4.bb | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-native_5.24.4.bb b/meta/recipes-devtools/perl/perl-native_5.24.4.bb new file mode 100644 index 0000000000..90a1615551 --- /dev/null +++ b/meta/recipes-devtools/perl/perl-native_5.24.4.bb | |||
@@ -0,0 +1,139 @@ | |||
1 | require perl.inc | ||
2 | |||
3 | # We need gnugrep (for -I) | ||
4 | DEPENDS = "db-native grep-native gdbm-native zlib-native" | ||
5 | |||
6 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
7 | |||
8 | SRC_URI += "\ | ||
9 | file://Configure-multilib.patch \ | ||
10 | file://perl-configpm-switch.patch \ | ||
11 | file://native-nopacklist.patch \ | ||
12 | file://native-perlinc.patch \ | ||
13 | file://MM_Unix.pm.patch \ | ||
14 | file://debian/errno_ver.diff \ | ||
15 | file://dynaloaderhack.patch \ | ||
16 | file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \ | ||
17 | file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \ | ||
18 | file://perl-5.26.1-guard_old_libcrypt_fix.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "04622bc4d3941dc7eb571c52b7c02993" | ||
22 | SRC_URI[sha256sum] = "7f080287ff64750270689843ae945f02159a33cb8f2fc910248c15befba5db84" | ||
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 | -Dlddlflags="${LDFLAGS} -shared" \ | ||
36 | -Dcf_by="Open Embedded" \ | ||
37 | -Dprefix=${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/vendor_perl/${PV} \ | ||
45 | -Dvendorarch=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \ | ||
46 | -Dsitelib=${STAGING_LIBDIR}/perl/site_perl/${PV} \ | ||
47 | -Dsitearch=${STAGING_LIBDIR}/perl/site_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 | -Ui_gdbm_ndbm \ | ||
59 | -Ui_gdbmndbm \ | ||
60 | -Di_shadow \ | ||
61 | -Di_syslog \ | ||
62 | -Duseperlio \ | ||
63 | -Dman3ext=3pm \ | ||
64 | -Dsed=/bin/sed \ | ||
65 | -Uafs \ | ||
66 | -Ud_csh \ | ||
67 | -Uusesfio \ | ||
68 | -Uusenm -des | ||
69 | } | ||
70 | |||
71 | do_install () { | ||
72 | oe_runmake 'DESTDIR=${D}' install | ||
73 | |||
74 | # We need a hostperl link for building perl | ||
75 | ln -sf perl${PV} ${D}${bindir}/hostperl | ||
76 | |||
77 | ln -sf perl ${D}${libdir}/perl5 | ||
78 | |||
79 | install -d ${D}${libdir}/perl/${PV}/CORE \ | ||
80 | ${D}${datadir}/perl/${PV}/ExtUtils | ||
81 | |||
82 | # Save native config | ||
83 | install config.sh ${D}${libdir}/perl | ||
84 | install lib/Config.pm ${D}${libdir}/perl/${PV}/ | ||
85 | install lib/ExtUtils/typemap ${D}${libdir}/perl/${PV}/ExtUtils/ | ||
86 | |||
87 | # perl shared library headers | ||
88 | # reference perl 5.20.0-1 in debian: | ||
89 | # https://packages.debian.org/experimental/i386/perl/filelist | ||
90 | for i in av.h bitcount.h charclass_invlists.h config.h cop.h cv.h dosish.h \ | ||
91 | embed.h embedvar.h EXTERN.h fakesdio.h feature.h form.h git_version.h \ | ||
92 | gv.h handy.h hv_func.h hv.h inline.h INTERN.h intrpvar.h iperlsys.h \ | ||
93 | keywords.h l1_char_class_tab.h malloc_ctl.h metaconfig.h mg_data.h \ | ||
94 | mg.h mg_raw.h mg_vtable.h mydtrace.h nostdio.h opcode.h op.h \ | ||
95 | opnames.h op_reg_common.h overload.h pad.h parser.h patchlevel.h \ | ||
96 | perlapi.h perl.h perlio.h perliol.h perlsdio.h perlvars.h perly.h \ | ||
97 | pp.h pp_proto.h proto.h reentr.h regcharclass.h regcomp.h regexp.h \ | ||
98 | regnodes.h scope.h sv.h thread.h time64_config.h time64.h uconfig.h \ | ||
99 | unicode_constants.h unixish.h utf8.h utfebcdic.h util.h uudmap.h \ | ||
100 | vutil.h warnings.h XSUB.h | ||
101 | do | ||
102 | install $i ${D}${libdir}/perl/${PV}/CORE | ||
103 | done | ||
104 | |||
105 | # Those wrappers mean that perl installed from sstate (which may change | ||
106 | # path location) works and that in the nativesdk case, the SDK can be | ||
107 | # installed to a different location from the one it was built for. | ||
108 | create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}' | ||
109 | create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}' | ||
110 | |||
111 | # Use /usr/bin/env nativeperl for the perl script. | ||
112 | for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do | ||
113 | sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f | ||
114 | done | ||
115 | |||
116 | # The packlist is large with hardcoded paths meaning it needs relocating | ||
117 | # so just remove it. | ||
118 | rm ${D}${libdir}/perl/${PV}/.packlist | ||
119 | } | ||
120 | |||
121 | SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper" | ||
122 | |||
123 | perl_sysroot_create_wrapper () { | ||
124 | mkdir -p ${SYSROOT_DESTDIR}${bindir} | ||
125 | # Create a wrapper that /usr/bin/env perl will use to get perl-native. | ||
126 | # This MUST live in the normal bindir. | ||
127 | cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF | ||
128 | #!/bin/sh | ||
129 | realpath=\`readlink -fn \$0\` | ||
130 | exec \`dirname \$realpath\`/perl-native/perl "\$@" | ||
131 | EOF | ||
132 | chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl | ||
133 | cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl | ||
134 | } | ||
135 | |||
136 | # Fix the path in sstate | ||
137 | SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" | ||
138 | PACKAGES_DYNAMIC_class-native += "^perl-module-.*native$" | ||
139 | |||