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