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.bb80
1 files changed, 38 insertions, 42 deletions
diff --git a/meta/packages/perl/perl_5.8.8.bb b/meta/packages/perl/perl_5.8.8.bb
index 0696de577f..fa1a8d34c9 100644
--- a/meta/packages/perl/perl_5.8.8.bb
+++ b/meta/packages/perl/perl_5.8.8.bb
@@ -29,6 +29,7 @@ SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
29 file://62_debian_cpan_definstalldirs.patch;patch=1 \ 29 file://62_debian_cpan_definstalldirs.patch;patch=1 \
30 file://64_debian_enc2xs_inc.patch;patch=1 \ 30 file://64_debian_enc2xs_inc.patch;patch=1 \
31 file://asm-pageh-fix.patch;patch=1 \ 31 file://asm-pageh-fix.patch;patch=1 \
32 file://native-perlinc.patch;patch=1 \
32 file://config.sh \ 33 file://config.sh \
33 file://config.sh-32 \ 34 file://config.sh-32 \
34 file://config.sh-32-le \ 35 file://config.sh-32-le \
@@ -74,23 +75,28 @@ do_configure() {
74 fi 75 fi
75 76
76 # Update some paths in the configuration 77 # Update some paths in the configuration
77 sed -i -e 's,@DESTDIR@,${D},g' \ 78 sed -i -e 's,@LIBDIR@,${libdir},g' \
79 -e 's,@BINDIR@,${bindir},g' \
80 -e 's,@MANDIR@,${mandir},g' \
81 -e 's,@PREFIX@,${prefix},g' \
82 -e 's,@DATADIR@,${datadir},g' \
78 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \ 83 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
79 -e "s%/usr/include/%${STAGING_INCDIR}/%g" \ 84 -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
85 -e 's,/usr/,${exec_prefix}/,g' \
80 config.sh-${TARGET_ARCH}-${TARGET_OS} 86 config.sh-${TARGET_ARCH}-${TARGET_OS}
81 87
82 if test "${MACHINE}" != "native"; then 88
83 # These are strewn all over the source tree 89 # These are strewn all over the source tree
84 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do 90 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
85 echo Fixing: $foo 91 echo Fixing: $foo
86 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo 92 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
87 done 93 done
88 fi
89 94
90 rm -f config 95 rm -f config
91 echo "ARCH = ${TARGET_ARCH}" > config 96 echo "ARCH = ${TARGET_ARCH}" > config
92 echo "OS = ${TARGET_OS}" >> config 97 echo "OS = ${TARGET_OS}" >> config
93} 98}
99
94do_compile() { 100do_compile() {
95 if test "${MACHINE}" != "native"; then 101 if test "${MACHINE}" != "native"; then
96 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL 102 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
@@ -98,11 +104,12 @@ do_compile() {
98 cd Cross 104 cd Cross
99 oe_runmake perl LD="${TARGET_SYS}-gcc" 105 oe_runmake perl LD="${TARGET_SYS}-gcc"
100} 106}
107
101do_install() { 108do_install() {
102 oe_runmake install 109 oe_runmake 'DESTDIR=${D}' install
103 110
104 # Add perl pointing at current version 111 # Add perl pointing at current version
105 ln -sf perl${PV} ${D}/usr/bin/perl 112 ln -sf perl${PV} ${D}${bindir}/perl
106 113
107 # Fix up versioned directories 114 # Fix up versioned directories
108 mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV} 115 mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
@@ -117,44 +124,33 @@ do_install() {
117 mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV} 124 mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
118 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5 125 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
119 126
127 # target config, used by cpan.bbclass to extract version information
128 install config.sh ${D}${libdir}/perl/
129
130 install -d ${D}${datadir}/perl/${PV}/ExtUtils
131 install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
132}
133
134PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
135
136perl_package_preprocess () {
120 # Fix up installed configuration 137 # Fix up installed configuration
121 if test "${MACHINE}" != "native"; then 138 sed -i -e "s,${D},,g" \
122 sed -i -e "s,${D},,g" \
123 -e "s,-isystem${STAGING_INCDIR} ,,g" \ 139 -e "s,-isystem${STAGING_INCDIR} ,,g" \
124 -e "s,${STAGING_LIBDIR},${libdir},g" \ 140 -e "s,${STAGING_LIBDIR},${libdir},g" \
125 -e "s,${STAGING_BINDIR},${bindir},g" \ 141 -e "s,${STAGING_BINDIR},${bindir},g" \
126 -e "s,${STAGING_INCDIR},${includedir},g" \ 142 -e "s,${STAGING_INCDIR},${includedir},g" \
127 -e "s,${CROSS_DIR}${base_bindir}/,,g" \ 143 -e "s,${CROSS_DIR}${base_bindir}/,,g" \
128 ${D}${bindir}/h2xs \ 144 ${PKGD}${bindir}/h2xs \
129 ${D}${bindir}/h2ph \ 145 ${PKGD}${bindir}/h2ph \
130 ${D}${datadir}/perl/${PV}/pod/*.pod \ 146 ${PKGD}${datadir}/perl/${PV}/pod/*.pod \
131 ${D}${datadir}/perl/${PV}/cacheout.pl \ 147 ${PKGD}${datadir}/perl/${PV}/cacheout.pl \
132 ${D}${datadir}/perl/${PV}/FileCache.pm \ 148 ${PKGD}${datadir}/perl/${PV}/FileCache.pm \
133 ${D}${libdir}/perl/${PV}/Config.pm \ 149 ${PKGD}${libdir}/perl/config.sh \
134 ${D}${libdir}/perl/${PV}/Config_heavy.pl \ 150 ${PKGD}${libdir}/perl/${PV}/Config.pm \
135 ${D}${libdir}/perl/${PV}/CORE/perl.h \ 151 ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
136 ${D}${libdir}/perl/${PV}/CORE/pp.h 152 ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
137 fi 153 ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
138}
139do_stage() {
140 install -d ${STAGING_LIBDIR_NATIVE}/perl/${PV} \
141 ${STAGING_LIBDIR}/perl/${PV}/CORE
142 # target config, used by cpan.bbclass to extract version information
143 install config.sh ${STAGING_LIBDIR}/perl/
144 # target configuration, used by native perl when cross-compiling
145 install lib/Config_heavy.pl ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-target.pl
146 # perl shared library headers
147 for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
148 uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
149 perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
150 hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
151 cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
152 reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
153 nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
154 dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
155 thread.h warnings.h; do
156 install $i ${STAGING_LIBDIR}/perl/${PV}/CORE
157 done
158} 154}
159 155
160PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc" 156PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"