diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-05-30 09:32:36 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-05-30 09:32:36 +0000 |
commit | 6c47cd48aff1dbc3b2550ea71307c48debca9298 (patch) | |
tree | 96e18b82c2f72e76c3c1ddbc148c7ef2fbf56ad7 /meta/classes/cpan.bbclass | |
parent | 4ed25e747d7a5a636d9e517b59601ff66f1d6c15 (diff) | |
download | poky-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.bbclass | 52 |
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 | # |
4 | FILES_${PN} += '${libdir}/perl5' | 4 | inherit cpan-base |
5 | EXTRA_CPANFLAGS = "" | ||
6 | 5 | ||
7 | DEPENDS += "perl-native perl" | 6 | EXTRA_CPANFLAGS ?= "" |
8 | RDEPENDS += "perl" | 7 | |
8 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
9 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
10 | |||
11 | # Env var which tells perl where the perl include files are | ||
12 | export PERL_INC = "${STAGING_DIR}/${BUILD_SYS}/lib/perl/${@get_perl_version(d)}/CORE" | ||
9 | 13 | ||
10 | cpan_do_configure () { | 14 | cpan_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 | ||
23 | cpan_do_compile () { | 36 | cpan_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 | ||
32 | cpan_do_install () { | 52 | cpan_do_install () { |