summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl_5.12.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl_5.12.3.bb')
-rw-r--r--meta/recipes-devtools/perl/perl_5.12.3.bb283
1 files changed, 283 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl_5.12.3.bb b/meta/recipes-devtools/perl/perl_5.12.3.bb
new file mode 100644
index 0000000000..584d64368d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl_5.12.3.bb
@@ -0,0 +1,283 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "devel"
4LICENSE = "Artistic|GPL"
5LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
6 file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
7PRIORITY = "optional"
8# We need gnugrep (for -I)
9DEPENDS = "virtual/db perl-native-${PV} grep-native"
10DEPENDS += "gdbm zlib"
11PR = "r0"
12
13# 5.10.1 has Module::Build built-in
14PROVIDES += "libmodule-build-perl"
15
16# Major part of version
17#PVM = "5.13"
18
19SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
20 file://debian/arm_thread_stress_timeout.diff \
21 file://debian/cpan_config_path.diff \
22 file://debian/cpan_definstalldirs.diff \
23 file://debian/db_file_ver.diff \
24 file://debian/doc_info.diff \
25 file://debian/enc2xs_inc.diff \
26 file://debian/errno_ver.diff \
27 file://debian/extutils_hacks.diff \
28 file://debian/instmodsh_doc.diff \
29 file://debian/ld_run_path.diff \
30 file://debian/libnet_config_path.diff \
31 file://debian/m68k_thread_stress.diff \
32 file://debian/mod_paths.diff \
33 file://debian/module_build_man_extensions.diff \
34 file://debian/prune_libs.diff \
35 file://debian/fixes/net_smtp_docs.diff \
36 file://debian/fixes/processPL.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/fixes/autodie-flock.diff \
42 file://debian/devel-ppport-ia64-optim.diff \
43 file://debian/fixes/cpanplus-without-home.diff \
44 file://debian/arm_optim.diff \
45 file://debian/deprecate-with-apt.diff \
46 file://debian/fixes/hurd-ccflags.diff \
47 file://debian/squelch-locale-warnings.diff \
48 file://debian/fixes/lc-numeric-docs.diff \
49 file://debian/fixes/lc-numeric-sprintf.diff \
50 file://debian/fixes/concat-stack-corruption.diff \
51 file://debian/fixes/h2ph-gcc-4.5.diff \
52 file://debian/patchlevel \
53 \
54 file://Makefile.patch;patch=1 \
55 file://parallel_build_fix_1.patch \
56 file://parallel_build_fix_2.patch \
57 file://parallel_build_fix_3.patch \
58 file://parallel_build_fix_4.patch \
59 file://parallel_build_fix_5.patch \
60 file://parallel_build_fix_6.patch \
61 file://Makefile.SH.patch;patch=1 \
62 file://installperl.patch;patch=1 \
63 file://perl-dynloader.patch;patch=1 \
64 file://perl-moreconfig.patch;patch=1 \
65 file://letgcc-find-errno.patch;patch=1 \
66 file://generate-sh.patch;patch=1 \
67 file://09_fix_installperl.patch;patch=1 \
68 file://native-perlinc.patch \
69 file://perl-enable-gdbm.patch \
70 file://cross-generate_uudmap.patch \
71 \
72 file://config.sh \
73 file://config.sh-32 \
74 file://config.sh-32-le \
75 file://config.sh-32-be \
76 file://config.sh-64 \
77 file://config.sh-64-le \
78 file://config.sh-64-be"
79# file://debian/fakeroot.diff
80
81SRC_URI[md5sum] = "29975a69dce54e47fcd6331c085c6c99"
82SRC_URI[sha256sum] = "5678bfd5c2cd59253a26171bf3e681235433b00c730eea8a8046e1b225c11d2f"
83
84inherit siteinfo
85
86# Where to find the native perl
87HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl${PV}"
88
89# Where to find .so files - use the -native versions not those from the target build
90export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl/${PV}/"
91
92# LDFLAGS for shared libraries
93export LDDLFLAGS = "${LDFLAGS} -shared"
94
95# We're almost Debian, aren't we?
96CFLAGS += "-DDEBIAN"
97
98do_nolargefile() {
99 sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
100 -e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
101 -e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
102 -e "/ccflags_uselargefiles/d" \
103 -e "s/-Duselargefiles//" \
104 -e "s/-D_FILE_OFFSET_BITS=64//" \
105 -e "s/-D_LARGEFILE_SOURCE//" \
106 ${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
107}
108
109do_configure() {
110 # Make hostperl in build directory be the native perl
111 ln -sf ${HOSTPERL} hostperl
112
113 # Do our work in the cross subdir
114 cd Cross
115
116 # Generate configuration
117 rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
118 for i in ${WORKDIR}/config.sh \
119 ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)} \
120 ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)}-${@siteinfo_get_endianess(d)}; do
121 cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
122 done
123
124 # Fixups for uclibc
125 if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
126 sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
127 -e "s,\(d_futimes=\)'define',\1'undef',g" \
128 -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
129 -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
130 -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
131 -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
132 -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
133 -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
134 -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
135 -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
136 -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
137 config.sh-${TARGET_ARCH}-${TARGET_OS}
138 fi
139
140 ${@base_contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
141
142 # Update some paths in the configuration
143 sed -i -e 's,@DESTDIR@,${prefix},g' \
144 -e 's,@ARCH@-thread-multi,,g' \
145 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
146 -e "s%/usr/include%${STAGING_INCDIR}%g" \
147 -e 's,/usr/,${exec_prefix}/,g' \
148 -e 's,/perl5,/perl,g' \
149 config.sh-${TARGET_ARCH}-${TARGET_OS}
150
151 # These are strewn all over the source tree
152 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
153 echo Fixing: $foo
154 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
155 done
156
157 rm -f config
158 echo "ARCH = ${TARGET_ARCH}" > config
159 echo "OS = ${TARGET_OS}" >> config
160}
161
162do_compile() {
163 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
164 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' cpan/Compress-Raw-Zlib/config.in
165 sed -i -e 's|/usr/lib|${STAGING_LIBDIR}|g' cpan/Compress-Raw-Zlib/config.in
166
167 cd Cross
168 oe_runmake perl LD="${CCLD}"
169}
170
171do_install() {
172 oe_runmake install DESTDIR=${D}
173 # Add perl pointing at current version
174 ln -sf perl${PV} ${D}${bindir}/perl
175
176 ln -sf perl ${D}/${libdir}/perl5
177
178 # Remove unwanted file
179 rm -f ${D}/${libdir}/perl/${PV}/.packlist
180
181 # Fix up shared library
182 mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
183 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
184
185 # target config, used by cpan.bbclass to extract version information
186 install config.sh ${D}${libdir}/perl
187
188 ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
189
190}
191
192PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
193
194perl_package_preprocess () {
195 # Fix up installed configuration
196 sed -i -e "s,${D},,g" \
197 -e "s,-isystem${STAGING_INCDIR} ,,g" \
198 -e "s,${STAGING_LIBDIR},${libdir},g" \
199 -e "s,${STAGING_BINDIR},${bindir},g" \
200 -e "s,${STAGING_INCDIR},${includedir},g" \
201 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
202 ${PKGD}${bindir}/h2xs \
203 ${PKGD}${bindir}/h2ph \
204 ${PKGD}${libdir}/perl/${PV}/pod/*.pod \
205 ${PKGD}${libdir}/perl/${PV}/cacheout.pl \
206 ${PKGD}${libdir}/perl/${PV}/FileCache.pm \
207 ${PKGD}${libdir}/perl/config.sh \
208 ${PKGD}${libdir}/perl/${PV}/Config.pm \
209 ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
210 ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
211 ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
212}
213
214PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \
215 perl-module-cpan perl-module-cpanplus perl-module-unicore"
216FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV}"
217FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
218FILES_${PN}-lib = "${libdir}/libperl.so* \
219 ${libdir}/perl5 \
220 ${libdir}/perl/config.sh \
221 ${libdir}/perl/${PV}/Config_heavy.pl \
222 ${libdir}/perl/${PV}/Config_heavy-target.pl"
223FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
224 ${libdir}/perl/${PV}/*.pod \
225 ${libdir}/perl/${PV}/*/*.pod \
226 ${libdir}/perl/${PV}/*/*/*.pod "
227FILES_perl-misc = "${bindir}/*"
228FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
229 ${libdir}/perl/${PV}/auto/*/*/.debug \
230 ${libdir}/perl/${PV}/auto/*/*/*/.debug \
231 ${libdir}/perl/${PV}/CORE/.debug \
232 ${libdir}/perl/${PV}/*/.debug \
233 ${libdir}/perl/${PV}/*/*/.debug \
234 ${libdir}/perl/${PV}/*/*/*/.debug "
235FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \
236 ${libdir}/perl/${PV}/*/*/*.txt \
237 ${libdir}/perl/${PV}/B/assemble \
238 ${libdir}/perl/${PV}/B/cc_harness \
239 ${libdir}/perl/${PV}/B/disassemble \
240 ${libdir}/perl/${PV}/B/makeliblinks \
241 ${libdir}/perl/${PV}/CGI/eg \
242 ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \
243 ${libdir}/perl/${PV}/CPAN/SIGNATURE \
244 ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \
245 ${libdir}/perl/${PV}/Encode/encode.h \
246 ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
247 ${libdir}/perl/${PV}/ExtUtils/NOTES \
248 ${libdir}/perl/${PV}/ExtUtils/PATCHING \
249 ${libdir}/perl/${PV}/ExtUtils/typemap \
250 ${libdir}/perl/${PV}/ExtUtils/xsubpp \
251 ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \
252 ${libdir}/perl/${PV}/Net/*.eg \
253 ${libdir}/perl/${PV}/unicore/mktables \
254 ${libdir}/perl/${PV}/unicore/mktables.lst \
255 ${libdir}/perl/${PV}/unicore/version "
256
257FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \
258 ${libdir}/perl/${PV}/CPAN.pm"
259FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \
260 ${libdir}/perl/${PV}/CPANPLUS.pm"
261FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
262
263# Create a perl-modules package recommending all the other perl
264# packages (actually the non modules packages and not created too)
265ALLOW_EMPTY_perl-modules = "1"
266PACKAGES_append = " perl-modules "
267RRECOMMENDS_perl-modules = "${@bb.data.getVar('PACKAGES', d, 1).replace('perl-modules ', '').replace('perl-dbg ', '').replace('perl-misc ', '').replace('perl-dev ', '').replace('perl-pod ', '').replace('perl-doc ', '')}"
268
269python populate_packages_prepend () {
270 libdir = bb.data.expand('${libdir}/perl/${PV}', d)
271 do_split_packages(d, libdir, 'auto/(Encode/.[^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
272 do_split_packages(d, libdir, 'auto/([^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
273 do_split_packages(d, libdir, 'Module/([^\/]*).*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
274 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)
275}
276
277PACKAGES_DYNAMIC = "perl-module-*"
278
279RPROVIDES_perl-lib = "perl-lib"
280
281require perl-rdepends_${PV}.inc
282require perl-rprovides.inc
283require perl-rprovides_${PV}.inc