summaryrefslogtreecommitdiffstats
path: root/meta/classes/cpan.bbclass
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-05-30 09:32:36 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-05-30 09:32:36 +0000
commit6c47cd48aff1dbc3b2550ea71307c48debca9298 (patch)
tree96e18b82c2f72e76c3c1ddbc148c7ef2fbf56ad7 /meta/classes/cpan.bbclass
parent4ed25e747d7a5a636d9e517b59601ff66f1d6c15 (diff)
downloadpoky-6c47cd48aff1dbc3b2550ea71307c48debca9298.tar.gz
cpan classes: sync Perl with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1815 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/cpan.bbclass')
-rw-r--r--meta/classes/cpan.bbclass52
1 files changed, 36 insertions, 16 deletions
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 159633d17a..4fff5974c1 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -1,32 +1,52 @@
1# 1#
2# This is for perl modules that use the old Makefile.PL build system 2# This is for perl modules that use the old Makefile.PL build system
3# 3#
4FILES_${PN} += '${libdir}/perl5' 4inherit cpan-base
5EXTRA_CPANFLAGS = ""
6 5
7DEPENDS += "perl-native perl" 6EXTRA_CPANFLAGS ?= ""
8RDEPENDS += "perl" 7
8# Env var which tells perl if it should use host (no) or target (yes) settings
9export PERLCONFIGTARGET = "${@is_target(d)}"
10
11# Env var which tells perl where the perl include files are
12export PERL_INC = "${STAGING_DIR}/${BUILD_SYS}/lib/perl/${@get_perl_version(d)}/CORE"
9 13
10cpan_do_configure () { 14cpan_do_configure () {
11 perl Makefile.PL ${EXTRA_CPANFLAGS} 15 yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
12 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then 16 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
13 . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh 17 . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
14 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ 18 if [ "${IS_NEW_PERL}" = "yes" ]; then
15 -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ 19 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
16 -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ 20 -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
17 -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ 21 -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \
18 -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ 22 -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \
19 Makefile 23 -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \
24 Makefile
25 else
26 sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
27 -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
28 -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \
29 -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \
30 -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \
31 Makefile
32 fi
20 fi 33 fi
21} 34}
22 35
23cpan_do_compile () { 36cpan_do_compile () {
24 # You must use gcc to link on sh 37 if [ "${IS_NEW_PERL}" = "yes" ]; then
25 OPTIONS="" 38 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
26 if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then 39 else
27 OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" 40 # You must use gcc to link on sh
41 OPTIONS=""
42 if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
43 OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
44 fi
45 if test ${TARGET_ARCH} = "powerpc" ; then
46 OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
47 fi
48 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
28 fi 49 fi
29 oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
30} 50}
31 51
32cpan_do_install () { 52cpan_do_install () {