summaryrefslogtreecommitdiffstats
path: root/meta/packages/perl/perl.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/perl/perl.inc')
-rw-r--r--meta/packages/perl/perl.inc73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/packages/perl/perl.inc b/meta/packages/perl/perl.inc
new file mode 100644
index 0000000000..52418903a2
--- /dev/null
+++ b/meta/packages/perl/perl.inc
@@ -0,0 +1,73 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3LICENSE = "Artistic|GPL"
4SECTION = "devel"
5PRIORITY = "optional"
6DEPENDS = "virtual/db perl-native"
7
8SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
9 file://Makefile.patch;patch=1 \
10 file://config.sh-arm-linux.patch;patch=1 \
11 file://libperl-5.8.3-create-libperl-soname.patch;patch=1;pnum=0 \
12 file://uclibc.patch;patch=1 \
13 file://Makefile.SH.patch \
14 file://config.sh-mipsel-linux \
15 file://config.sh-i686-linux"
16
17HOSTPERL=${STAGING_BINDIR}/perl${PV}
18
19do_configure() {
20 ln -sf ${HOSTPERL} ${STAGING_BINDIR}/hostperl
21 cp ${HOSTPERL} hostperl
22 cd Cross
23 rm Makefile.SH.patch
24 cp ${WORKDIR}/Makefile.SH.patch .
25 cp ${WORKDIR}/config.sh-mipsel-linux .
26 cp ${WORKDIR}/config.sh-i686-linux .
27 cat config.sh-arm-linux | sed -e "s,arm-linux,armeb-linux,g" > config.sh-armeb-linux
28 for i in config.sh-*-linux; do
29 a="`echo $i|sed -e 's,^config.sh-,,; s,-linux$,,'`"
30 newfile="`echo $i|sed -e 's,-linux$,-linux-uclibc,g'`"
31 cat $i | sed -e "s,${a}-linux,${a}-linux-uclibc,g; \
32 s,d_sockatmark='define',d_sockatmark='undef',g;" > $newfile
33 done
34 sed -i -e 's,./install_me_here,${D},g' config.sh-${TARGET_ARCH}-${TARGET_OS}
35 rm -f config
36 echo "ARCH = ${TARGET_ARCH}" > config
37 echo "OS = ${TARGET_OS}" >> config
38 oe_runmake patch
39}
40
41do_compile() {
42 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
43 cd Cross
44 oe_runmake perl
45}
46
47do_install() {
48 oe_runmake install
49 mv ${D}/${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
50 ( cd ${D}/usr/bin/; rm perl; ln -s perl${PV} perl )
51}
52
53do_stage() {
54 install -d ${STAGING_DIR}/${HOST_SYS}/perl/
55 install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/
56}
57
58PACKAGES_DYNAMIC = "perl-module-*"
59
60python populate_packages_prepend () {
61 libdir = bb.data.expand('${libdir}/perl5/${PV}', d)
62 archlibdir = bb.data.expand('${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}', d)
63 do_split_packages(d, archlibdir, 'auto/(.*)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
64 do_split_packages(d, archlibdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
65 do_split_packages(d, libdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
66}
67
68PACKAGES = "perl perl-misc perl-lib perl-dev perl-pod"
69FILES_${PN} = "/usr/bin/perl /usr/bin/perl${PV}"
70FILES_${PN}-lib = "/usr/lib/libperl.so*"
71FILES_${PN}-dev = "/usr/lib/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/"
72FILES_${PN}-pod = "/usr/lib/perl5/${PV}/pod"
73FILES_perl-misc = "/usr/bin/"