summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl_5.14.3.bb
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2013-01-21 16:57:12 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-25 12:42:48 +0000
commit526498282688c6e110727c9184efd1b69997c9db (patch)
tree96f2869b1983b070fc4bbd72eeb31aa1f9d5149c /meta/recipes-devtools/perl/perl_5.14.3.bb
parente80f02a93b1c717e6bc7001a05c773290ca68992 (diff)
downloadpoky-526498282688c6e110727c9184efd1b69997c9db.tar.gz
perl: update to 5.14.3
There is a securty issue: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5195 Update perl to 5.14.3 to resolve this problem. Patches hurd-ccflags.diff, h2ph-multiarch.diff, index-tainting.diff and hurd-hints.diff have been merged, so remove them from SRC_URI. Update patches config.sh and Makefile.SH.patch with new PV. [Yocto 3701] (From OE-Core rev: b1fd25e05308cabb56afe1d4276470bf7380ea59) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.14.3.bb')
-rw-r--r--meta/recipes-devtools/perl/perl_5.14.3.bb324
1 files changed, 324 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..2e33e6621a
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl_5.14.3.bb
@@ -0,0 +1,324 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "devel"
4LICENSE = "Artistic-1.0 | GPL-1.0"
5LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
6 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
7# We need gnugrep (for -I)
8DEPENDS = "virtual/db grep-native"
9DEPENDS += "gdbm zlib"
10PR = "r0"
11
12# 5.10.1 has Module::Build built-in
13PROVIDES += "libmodule-build-perl"
14
15SRC_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://config.sh \
69 file://config.sh-32 \
70 file://config.sh-32-le \
71 file://config.sh-32-be \
72 file://config.sh-64 \
73 file://config.sh-64-le \
74 file://config.sh-64-be"
75# file://debian/fakeroot.diff
76
77SRC_URI[md5sum] = "f6a3d878c688d111b495c87db56c5be5"
78SRC_URI[sha256sum] = "03638a4f01bc26b81231233671524b4163849a3a9ea5cc2397293080c4ea339f"
79
80inherit perlnative siteinfo
81
82# Where to find the native perl
83HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
84
85# Where to find .so files - use the -native versions not those from the target build
86export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
87
88# LDFLAGS for shared libraries
89export LDDLFLAGS = "${LDFLAGS} -shared"
90
91LDFLAGS_append = " -fstack-protector"
92
93# We're almost Debian, aren't we?
94CFLAGS += "-DDEBIAN"
95
96do_nolargefile() {
97 sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
98 -e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
99 -e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
100 -e "/ccflags_uselargefiles/d" \
101 -e "s/-Duselargefiles//" \
102 -e "s/-D_FILE_OFFSET_BITS=64//" \
103 -e "s/-D_LARGEFILE_SOURCE//" \
104 ${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
105}
106
107do_configure() {
108 # Make hostperl in build directory be the native perl
109 ln -sf ${HOSTPERL} hostperl
110
111 # Do our work in the cross subdir
112 cd Cross
113
114 # Generate configuration
115 rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
116 for i in ${WORKDIR}/config.sh \
117 ${WORKDIR}/config.sh-${SITEINFO_BITS} \
118 ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do
119 cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
120 done
121
122 # Fixups for uclibc
123 if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
124 sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
125 -e "s,\(d_futimes=\)'define',\1'undef',g" \
126 -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
127 -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
128 -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
129 -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
130 -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
131 -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
132 -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
133 -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
134 -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
135 -e "s,\(d_eaccess=\)'define',\1'undef',g" \
136 -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
137 -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
138 -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
139 -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
140 -e "s,-fstack-protector,-fno-stack-protector,g" \
141 config.sh-${TARGET_ARCH}-${TARGET_OS}
142 fi
143
144 ${@base_contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
145
146 # Update some paths in the configuration
147 sed -i -e 's,@ARCH@-thread-multi,,g' \
148 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
149 -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
150 -e "s,@INCLUDEDIR@,${STAGING_INCDIR},g" \
151 -e "s,@LIBDIR@,${libdir},g" \
152 -e "s,@BASELIBDIR@,${base_libdir},g" \
153 -e "s,@EXECPREFIX@,${exec_prefix},g" \
154 -e 's,@USRBIN@,${bindir},g' \
155 config.sh-${TARGET_ARCH}-${TARGET_OS}
156
157 case "${TARGET_ARCH}" in
158 x86_64 | powerpc | s390)
159 sed -i -e "s,\(need_va_copy=\)'undef',\1'define',g" \
160 config.sh-${TARGET_ARCH}-${TARGET_OS}
161 ;;
162 arm)
163 sed -i -e "s,\(d_u32align=\)'undef',\1'define',g" \
164 config.sh-${TARGET_ARCH}-${TARGET_OS}
165 ;;
166 esac
167 # These are strewn all over the source tree
168 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
169 echo Fixing: $foo
170 sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
171 done
172
173 rm -f config
174 echo "ARCH = ${TARGET_ARCH}" > config
175 echo "OS = ${TARGET_OS}" >> config
176}
177
178do_compile() {
179 # Fix to avoid recursive substitution of path
180 sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" ext/Errno/Errno_pm.PL
181 sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" cpan/Compress-Raw-Zlib/config.in
182 sed -i -e 's|/usr/lib|""|g' cpan/Compress-Raw-Zlib/config.in
183 sed -i -e 's|SYSROOTLIB|${STAGING_LIBDIR}|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
184
185 cd Cross
186 oe_runmake perl LD="${CCLD}"
187}
188
189do_install() {
190 oe_runmake install DESTDIR=${D}
191 # Add perl pointing at current version
192 ln -sf perl${PV} ${D}${bindir}/perl
193
194 ln -sf perl ${D}/${libdir}/perl5
195
196 # Remove unwanted file and empty directories
197 rm -f ${D}/${libdir}/perl/${PV}/.packlist
198 rmdir ${D}/${libdir}/perl/site_perl/${PV}
199 rmdir ${D}/${libdir}/perl/site_perl
200
201 # Fix up shared library
202 mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
203 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
204 ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so
205
206 # target config, used by cpan.bbclass to extract version information
207 install config.sh ${D}${libdir}/perl
208
209 ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
210
211}
212
213PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
214
215perl_package_preprocess () {
216 # Fix up installed configuration
217 sed -i -e "s,${D},,g" \
218 -e "s,-isystem${STAGING_INCDIR} ,,g" \
219 -e "s,${STAGING_LIBDIR},${libdir},g" \
220 -e "s,${STAGING_BINDIR},${bindir},g" \
221 -e "s,${STAGING_INCDIR},${includedir},g" \
222 -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
223 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
224 ${PKGD}${bindir}/h2xs \
225 ${PKGD}${bindir}/h2ph \
226 ${PKGD}${bindir}/pod2man \
227 ${PKGD}${bindir}/pod2text \
228 ${PKGD}${bindir}/pod2usage \
229 ${PKGD}${bindir}/podchecker \
230 ${PKGD}${bindir}/podselect \
231 ${PKGD}${libdir}/perl/${PV}/pod/*.pod \
232 ${PKGD}${libdir}/perl/${PV}/cacheout.pl \
233 ${PKGD}${libdir}/perl/${PV}/FileCache.pm \
234 ${PKGD}${libdir}/perl/config.sh \
235 ${PKGD}${libdir}/perl/${PV}/Config.pm \
236 ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
237 ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
238 ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
239}
240
241PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \
242 perl-module-cpan perl-module-cpanplus perl-module-unicore"
243FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV} \
244 ${libdir}/perl/${PV}/Config.pm \
245 ${libdir}/perl/${PV}/strict.pm \
246 ${libdir}/perl/${PV}/warnings.pm \
247 ${libdir}/perl/${PV}/warnings \
248 ${libdir}/perl/${PV}/vars.pm \
249 "
250RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
251 perl-module-warnings-register"
252FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
253FILES_${PN}-lib = "${libdir}/libperl.so* \
254 ${libdir}/perl5 \
255 ${libdir}/perl/config.sh \
256 ${libdir}/perl/${PV}/Config_heavy.pl \
257 ${libdir}/perl/${PV}/Config_heavy-target.pl"
258FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
259 ${libdir}/perl/${PV}/*.pod \
260 ${libdir}/perl/${PV}/*/*.pod \
261 ${libdir}/perl/${PV}/*/*/*.pod "
262FILES_perl-misc = "${bindir}/*"
263FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
264 ${libdir}/perl/${PV}/auto/*/*/.debug \
265 ${libdir}/perl/${PV}/auto/*/*/*/.debug \
266 ${libdir}/perl/${PV}/CORE/.debug \
267 ${libdir}/perl/${PV}/*/.debug \
268 ${libdir}/perl/${PV}/*/*/.debug \
269 ${libdir}/perl/${PV}/*/*/*/.debug "
270FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \
271 ${libdir}/perl/${PV}/*/*/*.txt \
272 ${libdir}/perl/${PV}/B/assemble \
273 ${libdir}/perl/${PV}/B/cc_harness \
274 ${libdir}/perl/${PV}/B/disassemble \
275 ${libdir}/perl/${PV}/B/makeliblinks \
276 ${libdir}/perl/${PV}/CGI/eg \
277 ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \
278 ${libdir}/perl/${PV}/CPAN/SIGNATURE \
279 ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \
280 ${libdir}/perl/${PV}/Encode/encode.h \
281 ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
282 ${libdir}/perl/${PV}/ExtUtils/NOTES \
283 ${libdir}/perl/${PV}/ExtUtils/PATCHING \
284 ${libdir}/perl/${PV}/ExtUtils/typemap \
285 ${libdir}/perl/${PV}/ExtUtils/xsubpp \
286 ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \
287 ${libdir}/perl/${PV}/Net/*.eg \
288 ${libdir}/perl/${PV}/unicore/mktables \
289 ${libdir}/perl/${PV}/unicore/mktables.lst \
290 ${libdir}/perl/${PV}/unicore/version "
291
292FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \
293 ${libdir}/perl/${PV}/CPAN.pm"
294FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \
295 ${libdir}/perl/${PV}/CPANPLUS.pm"
296FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
297
298# Create a perl-modules package recommending all the other perl
299# packages (actually the non modules packages and not created too)
300ALLOW_EMPTY_perl-modules = "1"
301PACKAGES_append = " perl-modules "
302
303python populate_packages_prepend () {
304 libdir = d.expand('${libdir}/perl/${PV}')
305 do_split_packages(d, libdir, 'auto/(.*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
306 do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
307 do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
308 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)
309 d.setVar("RRECOMMENDS_${PN}-modules", d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', ''))
310}
311
312PACKAGES_DYNAMIC += "^perl-module-.*"
313PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
314
315RPROVIDES_perl-lib = "perl-lib"
316
317require perl-rdepends_${PV}.inc
318require perl-rprovides.inc
319require perl-rprovides_${PV}.inc
320include perl-tests.inc
321
322SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
323
324BBCLASSEXTEND = "nativesdk"