diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.14.3.bb')
-rw-r--r-- | meta/recipes-devtools/perl/perl_5.14.3.bb | 343 |
1 files changed, 343 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl_5.14.3.bb b/meta/recipes-devtools/perl/perl_5.14.3.bb new file mode 100644 index 0000000000..422796499e --- /dev/null +++ b/meta/recipes-devtools/perl/perl_5.14.3.bb | |||
@@ -0,0 +1,343 @@ | |||
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=2b4c6ffbcfcbdee469f02565f253d81a \ | ||
6 | file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8" | ||
7 | # We need gnugrep (for -I) | ||
8 | DEPENDS = "virtual/db grep-native" | ||
9 | DEPENDS += "gdbm zlib" | ||
10 | PR = "r1" | ||
11 | |||
12 | # 5.10.1 has Module::Build built-in | ||
13 | PROVIDES += "libmodule-build-perl" | ||
14 | |||
15 | SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \ | ||
16 | file://debian/arm_thread_stress_timeout.diff \ | ||
17 | file://debian/cpan_definstalldirs.diff \ | ||
18 | file://debian/db_file_ver.diff \ | ||
19 | file://debian/doc_info.diff \ | ||
20 | file://debian/enc2xs_inc.diff \ | ||
21 | file://debian/errno_ver.diff \ | ||
22 | file://debian/libperl_embed_doc.diff \ | ||
23 | file://debian/fixes/respect_umask.diff \ | ||
24 | file://debian/writable_site_dirs.diff \ | ||
25 | file://debian/extutils_set_libperl_path.diff \ | ||
26 | file://debian/no_packlist_perllocal.diff \ | ||
27 | file://debian/prefix_changes.diff \ | ||
28 | file://debian/fakeroot.diff \ | ||
29 | file://debian/instmodsh_doc.diff \ | ||
30 | file://debian/ld_run_path.diff \ | ||
31 | file://debian/libnet_config_path.diff \ | ||
32 | file://debian/m68k_thread_stress.diff \ | ||
33 | file://debian/mod_paths.diff \ | ||
34 | file://debian/module_build_man_extensions.diff \ | ||
35 | file://debian/prune_libs.diff \ | ||
36 | file://debian/fixes/net_smtp_docs.diff \ | ||
37 | file://debian/perlivp.diff \ | ||
38 | file://debian/disable-zlib-bundling.diff \ | ||
39 | file://debian/cpanplus_definstalldirs.diff \ | ||
40 | file://debian/cpanplus_config_path.diff \ | ||
41 | file://debian/deprecate-with-apt.diff \ | ||
42 | file://debian/squelch-locale-warnings.diff \ | ||
43 | file://debian/skip-upstream-git-tests.diff \ | ||
44 | file://debian/fixes/extutils-cbuilder-cflags.diff \ | ||
45 | file://debian/fixes/module-build-home-directory.diff \ | ||
46 | file://debian/skip-kfreebsd-crash.diff \ | ||
47 | file://debian/fixes/document_makemaker_ccflags.diff \ | ||
48 | file://debian/fixes/sys-syslog-socket-timeout-kfreebsd.patch \ | ||
49 | file://debian/fixes/pod_fixes.diff \ | ||
50 | file://debian/find_html2text.diff \ | ||
51 | \ | ||
52 | file://Makefile.patch \ | ||
53 | file://Makefile.SH.patch \ | ||
54 | file://installperl.patch \ | ||
55 | file://perl-dynloader.patch \ | ||
56 | file://perl-moreconfig.patch \ | ||
57 | file://letgcc-find-errno.patch \ | ||
58 | file://generate-sh.patch \ | ||
59 | file://09_fix_installperl.patch \ | ||
60 | file://native-perlinc.patch \ | ||
61 | file://perl-enable-gdbm.patch \ | ||
62 | file://cross-generate_uudmap.patch \ | ||
63 | file://fix_bad_rpath.patch \ | ||
64 | file://perl-build-in-t-dir.patch \ | ||
65 | file://perl-archlib-exp.patch \ | ||
66 | file://dynaloaderhack.patch \ | ||
67 | \ | ||
68 | file://0001-Fix-misparsing-of-maketext-strings.patch \ | ||
69 | file://0001-Prevent-premature-hsplit-calls-and-only-trigger-REHA.patch \ | ||
70 | \ | ||
71 | file://config.sh \ | ||
72 | file://config.sh-32 \ | ||
73 | file://config.sh-32-le \ | ||
74 | file://config.sh-32-be \ | ||
75 | file://config.sh-64 \ | ||
76 | file://config.sh-64-le \ | ||
77 | file://config.sh-64-be" | ||
78 | # file://debian/fakeroot.diff | ||
79 | |||
80 | SRC_URI[md5sum] = "f6a3d878c688d111b495c87db56c5be5" | ||
81 | SRC_URI[sha256sum] = "03638a4f01bc26b81231233671524b4163849a3a9ea5cc2397293080c4ea339f" | ||
82 | |||
83 | inherit perlnative siteinfo | ||
84 | |||
85 | # Where to find the native perl | ||
86 | HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}" | ||
87 | |||
88 | # Where to find .so files - use the -native versions not those from the target build | ||
89 | export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/" | ||
90 | |||
91 | # LDFLAGS for shared libraries | ||
92 | export LDDLFLAGS = "${LDFLAGS} -shared" | ||
93 | |||
94 | LDFLAGS_append = " -fstack-protector" | ||
95 | |||
96 | # We're almost Debian, aren't we? | ||
97 | CFLAGS += "-DDEBIAN" | ||
98 | |||
99 | do_nolargefile() { | ||
100 | sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \ | ||
101 | -e "s,\(d_readdir64_r=\)'define',\1'undef',g" \ | ||
102 | -e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \ | ||
103 | -e "/ccflags_uselargefiles/d" \ | ||
104 | -e "s/-Duselargefiles//" \ | ||
105 | -e "s/-D_FILE_OFFSET_BITS=64//" \ | ||
106 | -e "s/-D_LARGEFILE_SOURCE//" \ | ||
107 | ${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
108 | } | ||
109 | |||
110 | do_configure() { | ||
111 | # Make hostperl in build directory be the native perl | ||
112 | ln -sf ${HOSTPERL} hostperl | ||
113 | |||
114 | # Do our work in the cross subdir | ||
115 | cd Cross | ||
116 | |||
117 | # Generate configuration | ||
118 | rm -f config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
119 | for i in ${WORKDIR}/config.sh \ | ||
120 | ${WORKDIR}/config.sh-${SITEINFO_BITS} \ | ||
121 | ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do | ||
122 | cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
123 | done | ||
124 | |||
125 | # Fixups for uclibc | ||
126 | if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then | ||
127 | sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \ | ||
128 | -e "s,\(d_futimes=\)'define',\1'undef',g" \ | ||
129 | -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \ | ||
130 | -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \ | ||
131 | -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \ | ||
132 | -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \ | ||
133 | -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \ | ||
134 | -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \ | ||
135 | -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \ | ||
136 | -e "s,\(d_sockatmark=\)'define',\1'undef',g" \ | ||
137 | -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \ | ||
138 | -e "s,\(d_eaccess=\)'define',\1'undef',g" \ | ||
139 | -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \ | ||
140 | -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \ | ||
141 | -e "s,\(d_stdiobase=\)'define',\1'undef',g" \ | ||
142 | -e "s,\(d_stdstdio=\)'define',\1'undef',g" \ | ||
143 | -e "s,-fstack-protector,-fno-stack-protector,g" \ | ||
144 | config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
145 | fi | ||
146 | |||
147 | ${@base_contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)} | ||
148 | |||
149 | # Update some paths in the configuration | ||
150 | sed -i -e 's,@ARCH@-thread-multi,,g' \ | ||
151 | -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \ | ||
152 | -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \ | ||
153 | -e "s,@INCLUDEDIR@,${STAGING_INCDIR},g" \ | ||
154 | -e "s,@LIBDIR@,${libdir},g" \ | ||
155 | -e "s,@BASELIBDIR@,${base_libdir},g" \ | ||
156 | -e "s,@EXECPREFIX@,${exec_prefix},g" \ | ||
157 | -e 's,@USRBIN@,${bindir},g' \ | ||
158 | config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
159 | |||
160 | case "${TARGET_ARCH}" in | ||
161 | x86_64 | powerpc | s390) | ||
162 | sed -i -e "s,\(need_va_copy=\)'undef',\1'define',g" \ | ||
163 | config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
164 | ;; | ||
165 | arm) | ||
166 | sed -i -e "s,\(d_u32align=\)'undef',\1'define',g" \ | ||
167 | config.sh-${TARGET_ARCH}-${TARGET_OS} | ||
168 | ;; | ||
169 | esac | ||
170 | # These are strewn all over the source tree | ||
171 | for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do | ||
172 | echo Fixing: $foo | ||
173 | sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo | ||
174 | done | ||
175 | |||
176 | rm -f config | ||
177 | echo "ARCH = ${TARGET_ARCH}" > config | ||
178 | echo "OS = ${TARGET_OS}" >> config | ||
179 | } | ||
180 | |||
181 | do_compile() { | ||
182 | # Fix to avoid recursive substitution of path | ||
183 | sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" ext/Errno/Errno_pm.PL | ||
184 | sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" cpan/Compress-Raw-Zlib/config.in | ||
185 | sed -i -e 's|/usr/lib|""|g' cpan/Compress-Raw-Zlib/config.in | ||
186 | sed -i -e 's|SYSROOTLIB|${STAGING_LIBDIR}|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | ||
187 | |||
188 | cd Cross | ||
189 | oe_runmake perl LD="${CCLD}" | ||
190 | } | ||
191 | |||
192 | do_install() { | ||
193 | oe_runmake install DESTDIR=${D} | ||
194 | # Add perl pointing at current version | ||
195 | ln -sf perl${PV} ${D}${bindir}/perl | ||
196 | |||
197 | ln -sf perl ${D}/${libdir}/perl5 | ||
198 | |||
199 | # Remove unwanted file and empty directories | ||
200 | rm -f ${D}/${libdir}/perl/${PV}/.packlist | ||
201 | rmdir ${D}/${libdir}/perl/site_perl/${PV} | ||
202 | rmdir ${D}/${libdir}/perl/site_perl | ||
203 | |||
204 | # Fix up shared library | ||
205 | mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV} | ||
206 | ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5 | ||
207 | ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so | ||
208 | |||
209 | # target config, used by cpan.bbclass to extract version information | ||
210 | install config.sh ${D}${libdir}/perl | ||
211 | |||
212 | ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl | ||
213 | } | ||
214 | |||
215 | do_install_append_class-nativesdk () { | ||
216 | create_wrapper ${D}${bindir}/perl \ | ||
217 | PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}' | ||
218 | } | ||
219 | |||
220 | PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess" | ||
221 | |||
222 | perl_package_preprocess () { | ||
223 | # Fix up installed configuration | ||
224 | sed -i -e "s,${D},,g" \ | ||
225 | -e "s,--sysroot=${STAGING_DIR_HOST},,g" \ | ||
226 | -e "s,-isystem${STAGING_INCDIR} ,,g" \ | ||
227 | -e "s,${STAGING_LIBDIR},${libdir},g" \ | ||
228 | -e "s,${STAGING_BINDIR},${bindir},g" \ | ||
229 | -e "s,${STAGING_INCDIR},${includedir},g" \ | ||
230 | -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \ | ||
231 | -e "s,${STAGING_BINDIR_NATIVE}/,,g" \ | ||
232 | -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \ | ||
233 | ${PKGD}${bindir}/h2xs \ | ||
234 | ${PKGD}${bindir}/h2ph \ | ||
235 | ${PKGD}${bindir}/pod2man \ | ||
236 | ${PKGD}${bindir}/pod2text \ | ||
237 | ${PKGD}${bindir}/pod2usage \ | ||
238 | ${PKGD}${bindir}/podchecker \ | ||
239 | ${PKGD}${bindir}/podselect \ | ||
240 | ${PKGD}${libdir}/perl/${PV}/CORE/config.h \ | ||
241 | ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \ | ||
242 | ${PKGD}${libdir}/perl/${PV}/CORE/pp.h \ | ||
243 | ${PKGD}${libdir}/perl/${PV}/Config.pm \ | ||
244 | ${PKGD}${libdir}/perl/${PV}/Config.pod \ | ||
245 | ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \ | ||
246 | ${PKGD}${libdir}/perl/${PV}/ExtUtils/Liblist/Kid.pm \ | ||
247 | ${PKGD}${libdir}/perl/${PV}/FileCache.pm \ | ||
248 | ${PKGD}${libdir}/perl/${PV}/cacheout.pl \ | ||
249 | ${PKGD}${libdir}/perl/${PV}/pod/*.pod \ | ||
250 | ${PKGD}${libdir}/perl/config.sh | ||
251 | } | ||
252 | |||
253 | PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \ | ||
254 | perl-module-cpan perl-module-cpanplus perl-module-unicore" | ||
255 | FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV} \ | ||
256 | ${libdir}/perl/${PV}/Config.pm \ | ||
257 | ${libdir}/perl/${PV}/strict.pm \ | ||
258 | ${libdir}/perl/${PV}/warnings.pm \ | ||
259 | ${libdir}/perl/${PV}/warnings \ | ||
260 | ${libdir}/perl/${PV}/vars.pm \ | ||
261 | " | ||
262 | FILES_${PN}_append_class-nativesdk = " ${bindir}/perl.real" | ||
263 | RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \ | ||
264 | perl-module-warnings-register" | ||
265 | FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE" | ||
266 | FILES_${PN}-lib = "${libdir}/libperl.so* \ | ||
267 | ${libdir}/perl5 \ | ||
268 | ${libdir}/perl/config.sh \ | ||
269 | ${libdir}/perl/${PV}/Config_heavy.pl \ | ||
270 | ${libdir}/perl/${PV}/Config_heavy-target.pl" | ||
271 | FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \ | ||
272 | ${libdir}/perl/${PV}/*.pod \ | ||
273 | ${libdir}/perl/${PV}/*/*.pod \ | ||
274 | ${libdir}/perl/${PV}/*/*/*.pod " | ||
275 | FILES_perl-misc = "${bindir}/*" | ||
276 | FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \ | ||
277 | ${libdir}/perl/${PV}/auto/*/*/.debug \ | ||
278 | ${libdir}/perl/${PV}/auto/*/*/*/.debug \ | ||
279 | ${libdir}/perl/${PV}/CORE/.debug \ | ||
280 | ${libdir}/perl/${PV}/*/.debug \ | ||
281 | ${libdir}/perl/${PV}/*/*/.debug \ | ||
282 | ${libdir}/perl/${PV}/*/*/*/.debug " | ||
283 | FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \ | ||
284 | ${libdir}/perl/${PV}/*/*/*.txt \ | ||
285 | ${libdir}/perl/${PV}/auto/XS/Typemap \ | ||
286 | ${libdir}/perl/${PV}/B/assemble \ | ||
287 | ${libdir}/perl/${PV}/B/cc_harness \ | ||
288 | ${libdir}/perl/${PV}/B/disassemble \ | ||
289 | ${libdir}/perl/${PV}/B/makeliblinks \ | ||
290 | ${libdir}/perl/${PV}/CGI/eg \ | ||
291 | ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \ | ||
292 | ${libdir}/perl/${PV}/CPAN/SIGNATURE \ | ||
293 | ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \ | ||
294 | ${libdir}/perl/${PV}/Encode/encode.h \ | ||
295 | ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \ | ||
296 | ${libdir}/perl/${PV}/ExtUtils/NOTES \ | ||
297 | ${libdir}/perl/${PV}/ExtUtils/PATCHING \ | ||
298 | ${libdir}/perl/${PV}/ExtUtils/typemap \ | ||
299 | ${libdir}/perl/${PV}/ExtUtils/xsubpp \ | ||
300 | ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \ | ||
301 | ${libdir}/perl/${PV}/Net/*.eg \ | ||
302 | ${libdir}/perl/${PV}/unicore/mktables \ | ||
303 | ${libdir}/perl/${PV}/unicore/mktables.lst \ | ||
304 | ${libdir}/perl/${PV}/unicore/version " | ||
305 | |||
306 | FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \ | ||
307 | ${libdir}/perl/${PV}/CPAN.pm" | ||
308 | FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \ | ||
309 | ${libdir}/perl/${PV}/CPANPLUS.pm" | ||
310 | FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore" | ||
311 | |||
312 | # Create a perl-modules package recommending all the other perl | ||
313 | # packages (actually the non modules packages and not created too) | ||
314 | ALLOW_EMPTY_perl-modules = "1" | ||
315 | PACKAGES_append = " perl-modules " | ||
316 | |||
317 | python populate_packages_prepend () { | ||
318 | libdir = d.expand('${libdir}/perl/${PV}') | ||
319 | do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False) | ||
320 | do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) | ||
321 | do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) | ||
322 | do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) | ||
323 | |||
324 | # perl-modules should recommend every perl module, and only the | ||
325 | # modules. Don't attempt to use the result of do_split_packages() as some | ||
326 | # modules are manually split (eg. perl-module-unicore). | ||
327 | packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split()) | ||
328 | d.setVar("RRECOMMENDS_${PN}-modules", ' '.join(packages)) | ||
329 | } | ||
330 | |||
331 | PACKAGES_DYNAMIC += "^perl-module-.*" | ||
332 | PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*" | ||
333 | |||
334 | RPROVIDES_perl-lib = "perl-lib" | ||
335 | |||
336 | require perl-rdepends_${PV}.inc | ||
337 | require perl-rprovides.inc | ||
338 | require perl-rprovides_${PV}.inc | ||
339 | require perl-ptest.inc | ||
340 | |||
341 | SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" | ||
342 | |||
343 | BBCLASSEXTEND = "nativesdk" | ||