summaryrefslogtreecommitdiffstats
path: root/meta/packages/perl/perl_5.8.8.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/perl/perl_5.8.8.bb')
-rw-r--r--meta/packages/perl/perl_5.8.8.bb187
1 files changed, 187 insertions, 0 deletions
diff --git a/meta/packages/perl/perl_5.8.8.bb b/meta/packages/perl/perl_5.8.8.bb
new file mode 100644
index 0000000000..c8e7afebc7
--- /dev/null
+++ b/meta/packages/perl/perl_5.8.8.bb
@@ -0,0 +1,187 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "devel"
4LICENSE = "Artistic|GPL"
5PRIORITY = "optional"
6# We need gnugrep (for -I)
7DEPENDS = "virtual/db perl-native grep-native"
8PR = "r16"
9
10# Major part of version
11PVM = "5.8"
12
13SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
14 file://Makefile.patch;patch=1 \
15 file://Makefile.SH.patch \
16 file://perl-dynloader.patch;patch=1 \
17 file://perl-moreconfig.patch;patch=1 \
18 file://letgcc-find-errno.patch;patch=1 \
19 file://generate-sh.patch;patch=1 \
20 file://09_fix_installperl.patch;patch=1 \
21 file://52_debian_extutils_hacks.patch;patch=1 \
22 file://53_debian_mod_paths.patch;patch=1 \
23 file://54_debian_perldoc-r.patch;patch=1 \
24 file://58_debian_cpan_config_path.patch;patch=1 \
25 file://60_debian_libnet_config_path.patch;patch=1 \
26 file://62_debian_cpan_definstalldirs.patch;patch=1 \
27 file://64_debian_enc2xs_inc.patch;patch=1 \
28 file://config.sh \
29 file://config.sh-32 \
30 file://config.sh-32-le \
31 file://config.sh-32-be \
32 file://config.sh-64 \
33 file://config.sh-64-le \
34 file://config.sh-64-be"
35
36# Where to find the native perl
37HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl${PV}"
38
39# Where to find .so files - use the -native versions not those from the target build
40export PERLHOSTLIB = "${STAGING_DIR}/${BUILD_SYS}/lib/perl5/${PV}/${BUILD_ARCH}-${BUILD_OS}-thread-multi/"
41
42do_configure() {
43 # Make hostperl in build directory be the native perl
44 cp -f ${HOSTPERL} hostperl
45
46 # This is silly - should just patch Makefile.SH directly
47 cd Cross
48 cp -f ${WORKDIR}/Makefile.SH.patch .
49
50 # Generate configuration
51 rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
52 for i in ${WORKDIR}/config.sh \
53 ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)} \
54 ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)}-${@siteinfo_get_endianess(d)}; do
55 cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
56 done
57
58 # Fixups for uclibc
59 if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
60 sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
61 -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
62 -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
63 -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
64 -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
65 config.sh-${TARGET_ARCH}-${TARGET_OS}
66 fi
67
68 # Update some paths in the configuration
69 sed -i -e 's,@DESTDIR@,${D},g' \
70 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
71 -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
72 config.sh-${TARGET_ARCH}-${TARGET_OS}
73
74 if test "${MACHINE}" != "native"; then
75 # These are strewn all over the source tree
76 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
77 echo Fixing: $foo
78 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
79 done
80 fi
81
82 rm -f config
83 echo "ARCH = ${TARGET_ARCH}" > config
84 echo "OS = ${TARGET_OS}" >> config
85
86 oe_runmake patch
87}
88do_compile() {
89 if test "${MACHINE}" != "native"; then
90 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
91 fi
92 cd Cross
93 oe_runmake perl LD="${TARGET_SYS}-gcc"
94}
95do_install() {
96 oe_runmake install
97
98 # Add perl pointing at current version
99 ln -sf perl${PV} ${D}/usr/bin/perl
100
101 # Fix up versioned directories
102 mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
103 mv ${D}/${datadir}/perl/${PVM} ${D}/${datadir}/perl/${PV}
104 ln -sf ${PV} ${D}/${libdir}/perl/${PVM}
105 ln -sf ${PV} ${D}/${datadir}/perl/${PVM}
106
107 # Remove unwanted file
108 rm -f ${D}/${libdir}/perl/${PV}/.packlist
109
110 # Fix up shared library
111 mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
112 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
113
114 # Fix up installed configuration
115 if test "${MACHINE}" != "native"; then
116 sed -i -e "s,${D},,g" \
117 -e "s,-isystem${STAGING_INCDIR} ,,g" \
118 -e "s,${STAGING_LIBDIR},${libdir},g" \
119 -e "s,${STAGING_INCDIR},${includedir},g" \
120 ${D}/${libdir}/perl/${PV}/Config_heavy.pl
121 fi
122}
123do_stage() {
124 install -d ${STAGING_DIR}/${HOST_SYS}/perl/
125 install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/
126 install lib/Config_heavy.pl ${STAGING_DIR}/${BUILD_SYS}/lib/perl5/${PV}/Config_heavy-target.pl
127}
128
129PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"
130FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV}"
131FILES_${PN}-lib = "${libdir}/libperl.so* ${libdir}/perl/${PVM} ${datadir}/perl/${PVM}"
132FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
133FILES_${PN}-pod = "${datadir}/perl/${PV}/pod \
134 ${datadir}/perl/${PV}/*/*.pod \
135 ${datadir}/perl/${PV}/*/*/*.pod \
136 ${libdir}/perl/${PV}/*.pod"
137FILES_perl-misc = "${bindir}/*"
138FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
139 ${libdir}/perl/${PV}/auto/*/*/.debug \
140 ${libdir}/perl/${PV}/auto/*/*/*/.debug \
141 ${datadir}/perl/${PV}/auto/*/.debug \
142 ${datadir}/perl/${PV}/auto/*/*/.debug \
143 ${datadir}/perl/${PV}/auto/*/*/*/.debug \
144 ${libdir}/perl/${PV}/CORE/.debug"
145FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \
146 ${datadir}/perl/${PV}/*/*/*.txt \
147 ${datadir}/perl/${PV}/Net/*.eg \
148 ${datadir}/perl/${PV}/CGI/eg \
149 ${datadir}/perl/${PV}/ExtUtils/PATCHING \
150 ${datadir}/perl/${PV}/ExtUtils/NOTES \
151 ${datadir}/perl/${PV}/ExtUtils/typemap \
152 ${datadir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
153 ${datadir}/perl/${PV}/CPAN/SIGNATURE \
154 ${datadir}/perl/${PV}/CPAN/PAUSE2003.pub \
155 ${datadir}/perl/${PV}/B/assemble \
156 ${datadir}/perl/${PV}/B/makeliblinks \
157 ${datadir}/perl/${PV}/B/disassemble \
158 ${datadir}/perl/${PV}/B/cc_harness \
159 ${datadir}/perl/${PV}/ExtUtils/xsubpp \
160 ${datadir}/perl/${PV}/Encode/encode.h \
161 ${datadir}/perl/${PV}/unicore/mktables \
162 ${datadir}/perl/${PV}/unicore/mktables.lst \
163 ${datadir}/perl/${PV}/unicore/version"
164
165RPROVIDES_perl-lib = "perl-lib"
166
167# Create a perl-modules package recommending all the other perl
168# packages (actually the non modules packages and not created too)
169ALLOW_EMPTY_perl-modules = "1"
170PACKAGES_append = " perl-modules "
171RRECOMMENDS_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 ', '')}"
172
173python populate_packages_prepend () {
174 libdir = bb.data.expand('${libdir}/perl/${PV}', d)
175 do_split_packages(d, libdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
176 do_split_packages(d, libdir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
177 datadir = bb.data.expand('${datadir}/perl/${PV}', d)
178 do_split_packages(d, datadir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
179 do_split_packages(d, datadir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
180}
181
182PACKAGES_DYNAMIC = "perl-module-*"
183
184require perl-rdepends_${PV}.inc
185require perl-rprovides.inc
186
187PARALLEL_MAKE = ""