Merge branch 'opendreambox-1.6' into vuplus-1.6
[vuplus_openembedded] / recipes / perl / perl-native_5.8.8.bb
1 DESCRIPTION = "Perl is a popular scripting language."
2 HOMEPAGE = "http://www.perl.org/"
3 SECTION = "libs"
4 LICENSE = "Artistic|GPL"
5 DEPENDS = "virtual/db-native gdbm-native"
6 PR = "r15"
7
8 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}"
9
10 SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
11            file://perl-5.8.8-gcc-4.2.patch;patch=1 \
12            file://Configure-multilib.patch;patch=1 \
13            file://perl-configpm-switch.patch;patch=1 \
14            file://native-nopacklist.patch;patch=1 \
15            file://native-no-gdbminc.patch;patch=1 \
16            file://native-perlinc.patch;patch=1 \
17            file://makedepend-dash.patch;patch=1 \
18            file://asm-pageh-fix.patch;patch=1"
19
20 S = "${WORKDIR}/perl-${PV}"
21
22 inherit native
23
24 do_configure () {
25     ./Configure \
26         -Dcc="${CC}" \
27         -Dcflags="${CFLAGS}" \
28         -Dldflags="${LDFLAGS}" \
29         -Dcf_by="Open Embedded" \
30         -Dprefix=${prefix} \
31         -Dvendorprefix=${prefix} \
32         -Dvendorprefix=${prefix} \
33         -Dsiteprefix=${prefix} \
34         \
35         -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
36         -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
37         -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
38         -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
39         -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
40         -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
41         \
42         -Duseshrplib \
43         -Dusethreads \
44         -Duseithreads \
45         -Duselargefiles \
46         -Dnoextensions=ODBM_File \
47         -Ud_dosuid \
48         -Ui_db \
49         -Ui_ndbm \
50         -Ui_gdbm \
51         -Di_shadow \
52         -Di_syslog \
53         -Duseperlio \
54         -Dman3ext=3pm \
55         -Uafs \
56         -Ud_csh \
57         -Uusesfio \
58         -Uusenm -des
59     sed "s!${STAGING_DIR}/bin!${STAGING_BINDIR}!;
60          s!${STAGING_DIR}/lib!${STAGING_LIBDIR}!;
61          s!^installbin=.*!installbin=\'${STAGING_BINDIR}\'!;
62          s!^installsitebin=.*!installsitebin=\'${STAGING_BINDIR}\'!" < config.sh > config.sh.new
63     mv config.sh.new config.sh
64 }
65 do_stage_append() {
66         # We need a hostperl link for building perl
67         ln -sf ${STAGING_BINDIR_NATIVE}/perl${PV} ${STAGING_BINDIR_NATIVE}/hostperl
68         # Store native config in non-versioned directory
69         install -d ${STAGING_LIBDIR_NATIVE}/perl/${PV}/CORE \
70                    ${STAGING_DATADIR_NATIVE}/perl/${PV}/ExtUtils
71         install config.sh ${STAGING_LIBDIR}/perl
72         # target configuration
73         install lib/Config.pm       ${STAGING_LIBDIR_NATIVE}/perl/${PV}/
74         install lib/ExtUtils/typemap ${STAGING_DATADIR_NATIVE}/perl/${PV}/ExtUtils/
75         # perl shared library headers
76         for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
77                  uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
78                  perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
79                  hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
80                  cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
81                  reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
82                  nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
83                  dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
84                  thread.h warnings.h; do
85             install $i ${STAGING_LIBDIR_NATIVE}/perl/${PV}/CORE
86         done
87 }
88 do_stage_append_nylon() {
89         # get rid of definitions not supported by the gcc version we use for nylon...
90         for i in ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy.pl ${STAGING_LIBDIR}/perl/config.sh; do
91                 perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
92         done
93 }
94
95 PARALLEL_MAKE = ""