]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: Update from OE.dev and convert to use do_install for staging
authorRichard Purdie <rpurdie@linux.intel.com>
Wed, 18 Nov 2009 20:05:55 +0000 (20:05 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 18 Nov 2009 20:05:55 +0000 (20:05 +0000)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
13 files changed:
meta/classes/cpan-base.bbclass
meta/classes/cpan.bbclass
meta/classes/cpan_build.bbclass
meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch
meta/packages/perl/libxml-parser-perl-native_2.36.bb [moved from meta/packages/perl/libxml-parser-perl-native_2.34.bb with 65% similarity]
meta/packages/perl/libxml-parser-perl_2.36.bb [moved from meta/packages/perl/libxml-parser-perl_2.34.bb with 76% similarity]
meta/packages/perl/perl-5.8.8/Makefile.SH.patch
meta/packages/perl/perl-5.8.8/config.sh
meta/packages/perl/perl-5.8.8/native-perlinc.patch
meta/packages/perl/perl-5.8.8/native-ssp.patch
meta/packages/perl/perl-native_5.8.8.bb
meta/packages/perl/perl.inc [deleted file]
meta/packages/perl/perl_5.8.8.bb

index 82fd5b459abd1017fc95c6119f01acb41e7238f8..c90a8fbc27eb021933edbd04db9a4bbe1d4e26a6 100644 (file)
@@ -24,20 +24,10 @@ def get_perl_version(d):
                        return m.group(1)
        return None
 
-# Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout
-def is_new_perl(d):
-       ver = get_perl_version(d)
-       if ver == "5.8.4" or ver == "5.8.7":
-               return "no"
-       return "yes"
-
 # Determine where the library directories are
 def perl_get_libdirs(d):
        libdir = bb.data.getVar('libdir', d, 1)
-       if is_new_perl(d) == "yes":
-               libdirs = libdir + '/perl5'
-       else:
-               libdirs = libdir + '/*/*/perl5'
+       libdirs = libdir + '/*/*/perl5'
        return libdirs
 
 def is_target(d):
@@ -45,7 +35,6 @@ def is_target(d):
         return "yes"
     return "no"
 
-IS_NEW_PERL = "${@is_new_perl(d)}"
 PERLLIBDIRS = "${@perl_get_libdirs(d)}"
 
 FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
index 66054bc755def9fe01b6c0150d8e5e4ca03d01b5..3b1280c07b3a72733ed5fad175826c7c055d6c7d 100644 (file)
@@ -14,54 +14,26 @@ export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}"
 export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
 
 cpan_do_configure () {
+       export PERL5LIB="${PERL_ARCHLIB}"
        yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
        if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
                . ${STAGING_LIBDIR}/perl/config.sh
-               if [ "${IS_NEW_PERL}" = "yes" ]; then
-                       sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
-                               -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
-                               -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \
-                               -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \
-                               -e "s:\(LDDLFLAGS.*\)${STAGING_LIBDIR_NATIVE}:\1${STAGING_LIBDIR}:" \
-                               Makefile
-               else
-                       sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
-                               -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
-                               -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \
-                               -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \
-                               -e "s:\(LDDLFLAGS.*\)${STAGING_LIBDIR_NATIVE}:\1${STAGING_LIBDIR}:" \
-                               Makefile
-               fi
+               # Use find since there can be a Makefile generated for each Makefile.PL
+               for f in `find -name Makefile.PL`; do
+                       f2=`echo $f | sed -e 's/.PL//'`
+                       sed -i -e "s:\(PERL_ARCHLIB = \).*:\1${PERL_ARCHLIB}:" \
+                       $f2
+               done
        fi
 }
 
 cpan_do_compile () {
-       if [ "${IS_NEW_PERL}" = "yes" ]; then
-               oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
-       else
-               # You must use gcc to link on sh
-               OPTIONS=""
-               if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
-                       OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
-               fi
-               if test ${TARGET_ARCH} = "powerpc" ; then
-                       OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
-               fi
-               oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
-       fi
+       oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
 }
 
+NATIVE_INSTALL_WORKS = "1"
 cpan_do_install () {
-       if [ ${@is_target(d)} = "yes" ]; then
-               oe_runmake install_vendor
-       fi
-}
-
-cpan_do_stage () {
-       if [ ${@is_target(d)} = "no" ]; then
-               oe_runmake install_vendor
-       fi
+       oe_runmake DESTDIR="${D}" install_vendor
 }
-                                                               
 
 EXPORT_FUNCTIONS do_configure do_compile do_install do_stage
index 6cac85c5fe0c5e152f0ab66adec1cc9cd87df00b..944e8d4ac06922a4580d5293cd54a08e963afc54 100644 (file)
@@ -23,7 +23,7 @@ cpan_build_do_configure () {
        if [ ${@is_target(d)} == "yes" ]; then
                # build for target
                . ${STAGING_LIBDIR}/perl/config.sh
-               if [ "${IS_NEW_PERL}" = "yes" ]; then
+
                        perl Build.PL --installdirs vendor \
                                --destdir ${D} \
                                --install_path lib="${datadir}/perl5" \
@@ -32,19 +32,9 @@ cpan_build_do_configure () {
                                --install_path bin=${bindir} \
                                --install_path bindoc=${mandir}/man1 \
                                --install_path libdoc=${mandir}/man3
-               else
-                       perl Build.PL --installdirs vendor \
-                               --destdir ${D} \
-                               --install_path lib="${libdir}/perl5/site_perl/${version}" \
-                               --install_path arch="${libdir}/perl5/site_perl/${version}/${TARGET_SYS}" \
-                               --install_path script=${bindir} \
-                               --install_path bin=${bindir} \
-                               --install_path bindoc=${mandir}/man1 \
-                               --install_path libdoc=${mandir}/man3
-               fi
        else
                # build for host
-               perl Build.PL --installdirs site
+               perl Build.PL --installdirs site --destdir ${D}
        fi
 }
 
@@ -52,16 +42,9 @@ cpan_build_do_compile () {
         perl Build
 }
 
+NATIVE_INSTALL_WORKS = "1"
 cpan_build_do_install () {
-       if [ ${@is_target(d)} == "yes" ]; then
-               perl Build install
-       fi
-}
-
-do_stage () {
-       if [ ${@is_target(d)} == "no" ]; then
-               perl Build install
-       fi
+       perl Build install
 }
 
 EXPORT_FUNCTIONS do_configure do_compile do_install
index d9869e19741ab41fc9e79f8b67f200bef1cd0a6b..653a4758f41fa99e2ab7e8528b39ce3c3be52857 100644 (file)
@@ -1,4 +1,4 @@
-See http://bugs.openembedded.org/show_bug.cgi?id=2168
+See http://bugs.openembedded.net/show_bug.cgi?id=2168
 Fix for gcc 4.2
 
 --- perl-5.8.8/makedepend.SH.ark       2006-11-01 16:32:05.000000000 +0100
similarity index 65%
rename from meta/packages/perl/libxml-parser-perl-native_2.34.bb
rename to meta/packages/perl/libxml-parser-perl-native_2.36.bb
index 93b831b5dca9fc7a03a8531cd56e17bfef316bf9..6ba56b3b8921ae90944a245775269ddf03dffad2 100644 (file)
@@ -1,7 +1,7 @@
 SECTION = "libs"
 
-inherit native
-
 require libxml-parser-perl_${PV}.bb
 
-DEPENDS = "expat-native perl-native"
+inherit native
+
+DEPENDS = "expat-native perl-native"
\ No newline at end of file
similarity index 76%
rename from meta/packages/perl/libxml-parser-perl_2.34.bb
rename to meta/packages/perl/libxml-parser-perl_2.36.bb
index dd502a8f6345072e91d955a63dddc2848e6244fe..818840504a089e8eb8b59a2f9669953d18fc0db5 100644 (file)
@@ -1,7 +1,6 @@
 SECTION = "libs"
 LICENSE = "Artistic"
 DEPENDS += "expat expat-native"
-PR = "r11"
 
 SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
 
@@ -11,5 +10,12 @@ EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}
 
 inherit cpan
 
+do_compile() {
+       export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+       cpan_do_compile
+}
+
+
+
 FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
                 ${PERLLIBDIRS}/XML"
index a30074be2b64aeed018407154024ee3a7a174aa7..ab9c4b7d63340ecd00faa974fceff457eb36fbef 100644 (file)
@@ -62,7 +62,7 @@ Index: perl-5.8.8/Makefile.SH
 +#     @echo " ";
 +#     @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
 +
-+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT)
++all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) $(unidatafiles)
 +
 +more: extra.pods $(private) $(public)
 +
@@ -208,7 +208,7 @@ Index: perl-5.8.8/Makefile.SH
 -
 -install.man:  all installman
 -      $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
-+      ./hostperl -Ifake_config_library -Ilib -MConfig installperl $(INSTALLFLAGS) $(STRIPFLAGS)
++      ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
  
  # XXX Experimental. Hardwired values, but useful for testing.
  # Eventually Configure could ask for some of these values.
index ac8d237cac6d65f79d747340d9ad757957549463..8d1f904f2010bcb84a07f1ba8a2000ea9f9163c7 100644 (file)
@@ -668,34 +668,34 @@ inc_version_list=' '
 inc_version_list_init='0'
 incpath=''
 inews=''
-installarchlib='@DESTDIR@/usr/lib/perl/5.8'
-installbin='@DESTDIR@/usr/bin'
+installarchlib='@LIBDIR@/perl/5.8'
+installbin='@BINDIR@'
 installhtml1dir=''
 installhtml3dir=''
-installman1dir='@DESTDIR@/usr/share/man/man1'
-installman3dir='@DESTDIR@/usr/share/man/man3'
-installprefix='@DESTDIR@/usr'
-installprefixexp='@DESTDIR@/usr'
-installprivlib='@DESTDIR@/usr/share/perl/5.8'
-installscript='@DESTDIR@/usr/bin'
-installsitearch='@DESTDIR@/usr/local/lib/perl/5.8.8'
-installsitebin='@DESTDIR@/usr/local/bin'
+installman1dir='@MANDIR@/man1'
+installman3dir='@MANDIR@/man3'
+installprefix='@PREFIX@'
+installprefixexp='@PREFIX@/usr'
+installprivlib='@DATADIR@/perl/5.8'
+installscript='@BINDIR@'
+installsitearch='@PREFIX@/local/lib/perl/5.8.8'
+installsitebin='@PREFIX@/local/bin'
 installsitehtml1dir=''
 installsitehtml3dir=''
-installsitelib='@DESTDIR@/usr/local/share/perl/5.8.8'
-installsiteman1dir='@DESTDIR@/usr/local/man/man1'
-installsiteman3dir='@DESTDIR@/usr/local/man/man3'
-installsitescript='@DESTDIR@/usr/local/bin'
+installsitelib='@PREFIX@/local/share/perl/5.8.8'
+installsiteman1dir='@PREFIX@/local/man/man1'
+installsiteman3dir='@PREFIX@/local/man/man3'
+installsitescript='@PREFIX@/local/bin'
 installstyle='lib/perl5'
 installusrbinperl='define'
-installvendorarch='@DESTDIR@/usr/lib/perl5'
-installvendorbin='@DESTDIR@/usr/bin'
+installvendorarch='@LIBDIR@/perl5'
+installvendorbin='@BINDIR@'
 installvendorhtml1dir=''
 installvendorhtml3dir=''
-installvendorlib='@DESTDIR@/usr/share/perl5'
-installvendorman1dir='@DESTDIR@/usr/share/man/man1'
-installvendorman3dir='@DESTDIR@/usr/share/man/man3'
-installvendorscript='@DESTDIR@/usr/bin'
+installvendorlib='@DATADIR@/perl5'
+installvendorman1dir='@MANDIR@/man1'
+installvendorman3dir='@MANDIR@/man3'
+installvendorscript='@BINDIR@'
 intsize='4'
 issymlink='test -h'
 ivdformat='"ld"'
@@ -981,36 +981,35 @@ zcat=''
 zip='zip'
 # Configure command line arguments.
 config_arg0='Configure'
-config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dinstallprefix=@DESTDIR@ -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.8 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
-config_argc=28
+config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.8 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
+config_argc=27
 config_arg1='-des'
 config_arg2='-Doptimize=-O2'
 config_arg3='-Dmyhostname=localhost'
 config_arg4='-Dperladmin=root@localhost'
 config_arg5='-Dcc=gcc'
 config_arg6='-Dcf_by=Open Embedded'
-config_arg7='-Dinstallprefix=@DESTDIR@'
-config_arg8='-Dprefix=/usr'
-config_arg9='-Dvendorprefix=/usr'
-config_arg10='-Dsiteprefix=/usr'
-config_arg11='-Dotherlibdirs=/usr/lib/perl5/5.8.8'
-config_arg12='-Duseshrplib'
-config_arg13='-Dusethreads'
-config_arg14='-Duseithreads'
-config_arg15='-Duselargefiles'
-config_arg16='-Ud_dosuid'
-config_arg17='-Dd_semctl_semun'
-config_arg18='-Ui_db'
-config_arg19='-Ui_ndbm'
-config_arg20='-Ui_gdbm'
-config_arg21='-Di_shadow'
-config_arg22='-Di_syslog'
-config_arg23='-Dman3ext=3pm'
-config_arg24='-Duseperlio'
-config_arg25='-Dinstallusrbinperl'
-config_arg26='-Ubincompat5005'
-config_arg27='-Uversiononly'
-config_arg28='-Dpager=/usr/bin/less -isr'
+config_arg7='-Dprefix=/usr'
+config_arg8='-Dvendorprefix=/usr'
+config_arg9='-Dsiteprefix=/usr'
+config_arg10='-Dotherlibdirs=/usr/lib/perl5/5.8.8'
+config_arg11='-Duseshrplib'
+config_arg12='-Dusethreads'
+config_arg13='-Duseithreads'
+config_arg14='-Duselargefiles'
+config_arg15='-Ud_dosuid'
+config_arg16='-Dd_semctl_semun'
+config_arg17='-Ui_db'
+config_arg18='-Ui_ndbm'
+config_arg19='-Ui_gdbm'
+config_arg20='-Di_shadow'
+config_arg21='-Di_syslog'
+config_arg22='-Dman3ext=3pm'
+config_arg23='-Duseperlio'
+config_arg24='-Dinstallusrbinperl'
+config_arg25='-Ubincompat5005'
+config_arg26='-Uversiononly'
+config_arg27='-Dpager=/usr/bin/less -isr'
 PERL_REVISION=5
 PERL_VERSION=8
 PERL_SUBVERSION=8
index aea38a0b568b5411a37d99edcd248414368b06bb..6dc4b9538df3aaa83cee7af9f9deb1296227993d 100644 (file)
@@ -1,12 +1,20 @@
 Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
 ===================================================================
---- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm    2007-05-30 15:16:47.000000000 +1000
-+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2007-05-30 15:18:12.000000000 +1000
-@@ -1597,6 +1597,11 @@
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm    2008-10-31 22:01:35.000000000 +0000
++++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2008-11-08 16:01:12.000000000 +0000
+@@ -1597,6 +1597,19 @@
        $self->{PERL_LIB}     ||= $Config{privlibexp};
        $self->{PERL_ARCHLIB} ||= $Config{archlibexp};
        $self->{PERL_INC}     = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
 +      # Check for environment override so we'll find the headers in the correct place
++        if (defined $ENV{PERL_LIB})
++        {
++            $self->{PERL_LIB} = $ENV{PERL_LIB};
++        }
++        if (defined $ENV{PERL_ARCHLIB})
++        {
++            $self->{PERL_ARCHLIB} = $ENV{PERL_ARCHLIB};
++        }
 +        if (defined $ENV{PERL_INC})
 +        {
 +            $self->{PERL_INC} = $ENV{PERL_INC};
index f815aad452b9db28228be744ed05eab2d0817fb3..1c825f50d0068fbdbb1710cbb8a0538f3552d10e 100644 (file)
@@ -1,5 +1,5 @@
 Fix for compiling with ssp enabled gcc:
-See http://bugs.openembedded.org/show_bug.cgi?id=1980
+See http://bugs.openembedded.net/show_bug.cgi?id=1980
 
 diff -Naur perl-5.8.7.orig/cflags.SH perl-5.8.7/cflags.SH
 --- perl-5.8.7.orig/cflags.SH  2002-09-30 10:59:07.000000000 +0000
index fb8be281bf1f01265434646de6661f36619227d8..05b4c1e64e55e0c84e5b378984df049de0d24316 100644 (file)
@@ -20,49 +20,75 @@ S = "${WORKDIR}/perl-${PV}"
 inherit native
 
 do_configure () {
-    ./Configure \
-        -Dcc="${CC}" \
-        -Dcflags="${CFLAGS}" \
-        -Dldflags="${LDFLAGS}" \
-        -Dcf_by="Open Embedded" \
-        -Dprefix=${prefix} \
-        -Dvendorprefix=${prefix} \
-        -Dvendorprefix=${prefix} \
-        -Dsiteprefix=${prefix} \
-        \
-        -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
-        -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
-        -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
-        -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
-        -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
-        -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
-        \
-        -Duseshrplib \
-        -Dusethreads \
-        -Duseithreads \
-        -Duselargefiles \
-        -Ud_dosuid \
-        -Ui_db \
-        -Ui_ndbm \
-        -Ui_gdbm \
-        -Di_shadow \
-        -Di_syslog \
-        -Duseperlio \
-        -Dman3ext=3pm \
-        -Uafs \
-        -Ud_csh \
-        -Uusesfio \
-        -Uusenm -des
-    sed 's!${STAGING_DIR}/bin!${STAGING_BINDIR}!;
-         s!${STAGING_DIR}/lib!${STAGING_LIBDIR}!' < config.sh > config.sh.new
-    mv config.sh.new config.sh
+       ./Configure \
+               -Dcc="${CC}" \
+               -Dcflags="${CFLAGS}" \
+               -Dldflags="${LDFLAGS}" \
+               -Dcf_by="Open Embedded" \
+               -Dprefix=${prefix} \
+               -Dvendorprefix=${prefix} \
+               -Dvendorprefix=${prefix} \
+               -Dsiteprefix=${prefix} \
+               \
+               -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
+               -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
+               -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
+               -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
+               -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
+               -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
+               \
+               -Duseshrplib \
+               -Dusethreads \
+               -Duseithreads \
+               -Duselargefiles \
+               -Dnoextensions=ODBM_File \
+               -Ud_dosuid \
+               -Ui_db \
+               -Ui_ndbm \
+               -Ui_gdbm \
+               -Di_shadow \
+               -Di_syslog \
+               -Duseperlio \
+               -Dman3ext=3pm \
+               -Uafs \
+               -Ud_csh \
+               -Uusesfio \
+               -Uusenm -des
 }
-do_stage_append() {
-        # We need a hostperl link for building perl
-        ln -sf ${STAGING_BINDIR_NATIVE}/perl${PV} ${STAGING_BINDIR_NATIVE}/hostperl
-        # Store native config in non-versioned directory
-        install -d ${STAGING_LIBDIR}/perl
-        install config.sh ${STAGING_LIBDIR}/perl
+
+NATIVE_INSTALL_WORKS = "1"
+do_install () {
+       oe_runmake 'DESTDIR=${D}' install
+
+       # We need a hostperl link for building perl
+       ln -sf perl${PV} ${D}${bindir}/hostperl
+
+       install -d ${D}${libdir}/perl/${PV}/CORE \
+                  ${D}${datadir}/perl/${PV}/ExtUtils
+
+       # Save native config 
+       install config.sh ${D}${libdir}/perl
+       install lib/Config.pm ${D}${libdir}/perl/${PV}/
+       install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
+
+       # perl shared library headers
+       for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
+                uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
+                perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
+                hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
+                cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
+                reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
+                nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
+                dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
+                thread.h warnings.h; do
+               install $i ${D}${libdir}/perl/${PV}/CORE
+       done
+}
+do_install_append_nylon() {
+       # get rid of definitions not supported by the gcc version we use for nylon...
+       for i in ${D}${libdir}/perl/${PV}/Config_heavy.pl ${D}${libdir}/perl/config.sh; do
+               perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
+       done
 }
 
 PARALLEL_MAKE = ""
diff --git a/meta/packages/perl/perl.inc b/meta/packages/perl/perl.inc
deleted file mode 100644 (file)
index 15ae55c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-DESCRIPTION = "Perl is a popular scripting language."
-HOMEPAGE = "http://www.perl.org/"
-LICENSE = "Artistic|GPL"
-SECTION = "devel"
-PRIORITY = "optional"
-DEPENDS = "virtual/db perl-native"
-
-SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
-       file://Makefile.patch;patch=1 \
-       file://config.sh-arm-linux.patch;patch=1 \
-       file://libperl-5.8.3-create-libperl-soname.patch;patch=1;pnum=0 \
-       file://Makefile.SH.patch"
-
-HOSTPERL="${STAGING_BINDIR_NATIVE}/perl${PV}"
-
-do_compile() {
-       sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
-       cd Cross
-       # You must use gcc to link on sh
-       OPTIONS=""
-       if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
-               OPTIONS="LD=${TARGET_SYS}-gcc"
-       fi
-       # You must use gcc to link on powerpc also 
-       if test ${TARGET_ARCH} = "powerpc" ; then 
-               OPTIONS="LD=${TARGET_SYS}-gcc" 
-       fi 
-
-       oe_runmake perl $OPTIONS
-}
-
-do_install() {
-       oe_runmake install
-       mv ${D}/${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
-       ( cd ${D}/usr/bin/; rm -f perl; ln -s perl${PV} perl )
-}
-
-do_stage() {
-       install -d ${STAGING_LIBDIR}/perl/
-       install config.sh ${STAGING_LIBDIR}/perl/
-}
-
-PACKAGES_DYNAMIC = "perl-module-*"
-
-python populate_packages_prepend () {
-       libdir = bb.data.expand('${libdir}/perl5/${PV}', d)
-       archlibdir =  bb.data.expand('${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}', d)
-       do_split_packages(d, archlibdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
-       do_split_packages(d, archlibdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
-       do_split_packages(d, libdir, '(.*)\.(pm|pl)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
-}
-
-PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod"
-FILES_${PN} = "/usr/bin/perl /usr/bin/perl${PV}"
-FILES_${PN}-lib = "/usr/lib/libperl.so*"
-FILES_${PN}-dev = "/usr/lib/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/CORE/"
-FILES_${PN}-pod = "/usr/lib/perl5/${PV}/pod"
-FILES_perl-misc = "/usr/bin/*"
-FILES_${PN}-dbg += " \
-        ${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/auto/*/.debug \
-        ${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/auto/*/*/.debug \
-        ${libdir}/perl5/${PV}/${TARGET_ARCH}-${TARGET_OS}/auto/*/*/*/.debug"
-
index 0696de577ffde587dc8db65b3e0d56a6fb214363..fa1a8d34c9ccff523aa5f9a5ac276724bdd96b6f 100644 (file)
@@ -29,6 +29,7 @@ SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
         file://62_debian_cpan_definstalldirs.patch;patch=1 \
         file://64_debian_enc2xs_inc.patch;patch=1 \
         file://asm-pageh-fix.patch;patch=1 \
+        file://native-perlinc.patch;patch=1 \
         file://config.sh \
         file://config.sh-32 \
         file://config.sh-32-le \
@@ -74,23 +75,28 @@ do_configure() {
         fi
 
         # Update some paths in the configuration
-        sed -i -e 's,@DESTDIR@,${D},g' \
+        sed -i -e 's,@LIBDIR@,${libdir},g' \
+               -e 's,@BINDIR@,${bindir},g' \
+               -e 's,@MANDIR@,${mandir},g' \
+               -e 's,@PREFIX@,${prefix},g' \
+               -e 's,@DATADIR@,${datadir},g' \
                -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
                -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
+              -e 's,/usr/,${exec_prefix}/,g' \
             config.sh-${TARGET_ARCH}-${TARGET_OS}
 
-        if test "${MACHINE}" != "native"; then
-            # These are strewn all over the source tree
-            for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
-                echo Fixing: $foo
-                sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
-            done
-        fi
+
+         # These are strewn all over the source tree
+        for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
+            echo Fixing: $foo
+            sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
+        done
 
         rm -f config
         echo "ARCH = ${TARGET_ARCH}" > config
         echo "OS = ${TARGET_OS}" >> config
 }
+
 do_compile() {
         if test "${MACHINE}" != "native"; then
             sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
@@ -98,11 +104,12 @@ do_compile() {
         cd Cross
         oe_runmake perl LD="${TARGET_SYS}-gcc"
 }
+
 do_install() {
-        oe_runmake install
+       oe_runmake 'DESTDIR=${D}' install
 
         # Add perl pointing at current version
-        ln -sf perl${PV} ${D}/usr/bin/perl
+        ln -sf perl${PV} ${D}${bindir}/perl
 
         # Fix up versioned directories
         mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
@@ -117,44 +124,33 @@ do_install() {
         mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
         ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
 
+        # target config, used by cpan.bbclass to extract version information
+        install config.sh ${D}${libdir}/perl/
+
+        install -d ${D}${datadir}/perl/${PV}/ExtUtils
+       install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
+}
+
+PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
+
+perl_package_preprocess () {
         # Fix up installed configuration
-        if test "${MACHINE}" != "native"; then
-            sed -i -e "s,${D},,g" \
+        sed -i -e "s,${D},,g" \
                    -e "s,-isystem${STAGING_INCDIR} ,,g" \
                    -e "s,${STAGING_LIBDIR},${libdir},g" \
                    -e "s,${STAGING_BINDIR},${bindir},g" \
                    -e "s,${STAGING_INCDIR},${includedir},g" \
                    -e "s,${CROSS_DIR}${base_bindir}/,,g" \
-                ${D}${bindir}/h2xs \
-                ${D}${bindir}/h2ph \
-                ${D}${datadir}/perl/${PV}/pod/*.pod \
-                ${D}${datadir}/perl/${PV}/cacheout.pl \
-                ${D}${datadir}/perl/${PV}/FileCache.pm \
-                ${D}${libdir}/perl/${PV}/Config.pm \
-                ${D}${libdir}/perl/${PV}/Config_heavy.pl \
-                ${D}${libdir}/perl/${PV}/CORE/perl.h \
-                ${D}${libdir}/perl/${PV}/CORE/pp.h
-        fi
-}
-do_stage() {
-        install -d ${STAGING_LIBDIR_NATIVE}/perl/${PV} \
-                   ${STAGING_LIBDIR}/perl/${PV}/CORE
-        # target config, used by cpan.bbclass to extract version information
-        install config.sh ${STAGING_LIBDIR}/perl/
-        # target configuration, used by native perl when cross-compiling
-        install lib/Config_heavy.pl ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy-target.pl
-        # perl shared library headers
-        for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
-                 uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
-                 perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
-                 hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
-                 cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
-                 reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
-                 nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
-                 dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
-                 thread.h warnings.h; do
-            install $i ${STAGING_LIBDIR}/perl/${PV}/CORE
-        done
+                ${PKGD}${bindir}/h2xs \
+                ${PKGD}${bindir}/h2ph \
+                ${PKGD}${datadir}/perl/${PV}/pod/*.pod \
+                ${PKGD}${datadir}/perl/${PV}/cacheout.pl \
+                ${PKGD}${datadir}/perl/${PV}/FileCache.pm \
+                ${PKGD}${libdir}/perl/config.sh \
+                ${PKGD}${libdir}/perl/${PV}/Config.pm \
+                ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
+                ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
+                ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
 }
 
 PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"