diff options
Diffstat (limited to 'openembedded/packages/perl/perl.inc')
-rw-r--r-- | openembedded/packages/perl/perl.inc | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/openembedded/packages/perl/perl.inc b/openembedded/packages/perl/perl.inc new file mode 100644 index 0000000000..5ee5418fc4 --- /dev/null +++ b/openembedded/packages/perl/perl.inc | |||
@@ -0,0 +1,70 @@ | |||
1 | DESCRIPTION = "Perl is a popular scripting language." | ||
2 | HOMEPAGE = "http://www.perl.org/" | ||
3 | LICENSE = "Artistic|GPL" | ||
4 | SECTION = "devel" | ||
5 | PRIORITY = "optional" | ||
6 | DEPENDS = "db3 perl-native" | ||
7 | |||
8 | SRC_URI = "http://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 | |||
17 | HOSTPERL=${STAGING_BINDIR}/perl${PV} | ||
18 | |||
19 | do_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 | |||
41 | do_compile() { | ||
42 | cd Cross | ||
43 | oe_runmake perl | ||
44 | } | ||
45 | |||
46 | do_install() { | ||
47 | oe_runmake install | ||
48 | mv ${D}/${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV} | ||
49 | ( cd ${D}/usr/bin/; rm perl; ln -s perl${PV} perl ) | ||
50 | } | ||
51 | |||
52 | do_stage() { | ||
53 | install -d ${STAGING_DIR}/${HOST_SYS}/perl/ | ||
54 | install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/ | ||
55 | } | ||
56 | |||
57 | python populate_packages_prepend () { | ||
58 | libdir = bb.data.expand('${libdir}/perl5/${PV}', d) | ||
59 | archlibdir = bb.data.expand('${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}', d) | ||
60 | do_split_packages(d, archlibdir, 'auto/(.*)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
61 | do_split_packages(d, archlibdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
62 | do_split_packages(d, libdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True) | ||
63 | } | ||
64 | |||
65 | PACKAGES = "perl perl-misc perl-lib perl-dev perl-pod" | ||
66 | FILES_${PN} = "/usr/bin/perl /usr/bin/perl${PV}" | ||
67 | FILES_${PN}-lib = "/usr/lib/libperl.so*" | ||
68 | FILES_${PN}-dev = "/usr/lib/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/" | ||
69 | FILES_${PN}-pod = "/usr/lib/perl5/${PV}/pod" | ||
70 | FILES_perl-misc = "/usr/bin/" | ||