diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-18 20:05:55 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-18 20:05:55 +0000 |
commit | ca5f36ee6ad756e1e540288a56a504c1d8ecc7a3 (patch) | |
tree | 9ad90f44e75c449f54f30bb702aa797ee8083a78 /meta/packages/perl | |
parent | 06685d7558891dc50b439cf82c394cfadc3ee1d4 (diff) | |
download | openembedded-core-ca5f36ee6ad756e1e540288a56a504c1d8ecc7a3.tar.gz openembedded-core-ca5f36ee6ad756e1e540288a56a504c1d8ecc7a3.tar.bz2 openembedded-core-ca5f36ee6ad756e1e540288a56a504c1d8ecc7a3.zip |
perl: Update from OE.dev and convert to use do_install for staging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/perl')
-rw-r--r-- | meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch | 2 | ||||
-rw-r--r-- | meta/packages/perl/libxml-parser-perl-native_2.36.bb (renamed from meta/packages/perl/libxml-parser-perl-native_2.34.bb) | 6 | ||||
-rw-r--r-- | meta/packages/perl/libxml-parser-perl_2.36.bb (renamed from meta/packages/perl/libxml-parser-perl_2.34.bb) | 8 | ||||
-rw-r--r-- | meta/packages/perl/perl-5.8.8/Makefile.SH.patch | 4 | ||||
-rw-r--r-- | meta/packages/perl/perl-5.8.8/config.sh | 87 | ||||
-rw-r--r-- | meta/packages/perl/perl-5.8.8/native-perlinc.patch | 14 | ||||
-rw-r--r-- | meta/packages/perl/perl-5.8.8/native-ssp.patch | 2 | ||||
-rw-r--r-- | meta/packages/perl/perl-native_5.8.8.bb | 110 | ||||
-rw-r--r-- | meta/packages/perl/perl.inc | 63 | ||||
-rw-r--r-- | meta/packages/perl/perl_5.8.8.bb | 80 |
10 files changed, 174 insertions, 202 deletions
diff --git a/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch b/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch index d9869e1974..653a4758f4 100644 --- a/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch +++ b/meta/packages/perl/files/perl-5.8.8-gcc-4.2.patch @@ -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 diff --git a/meta/packages/perl/libxml-parser-perl-native_2.34.bb b/meta/packages/perl/libxml-parser-perl-native_2.36.bb index 93b831b5dc..6ba56b3b89 100644 --- a/meta/packages/perl/libxml-parser-perl-native_2.34.bb +++ b/meta/packages/perl/libxml-parser-perl-native_2.36.bb @@ -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 diff --git a/meta/packages/perl/libxml-parser-perl_2.34.bb b/meta/packages/perl/libxml-parser-perl_2.36.bb index dd502a8f63..818840504a 100644 --- a/meta/packages/perl/libxml-parser-perl_2.34.bb +++ b/meta/packages/perl/libxml-parser-perl_2.36.bb @@ -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" diff --git a/meta/packages/perl/perl-5.8.8/Makefile.SH.patch b/meta/packages/perl/perl-5.8.8/Makefile.SH.patch index a30074be2b..ab9c4b7d63 100644 --- a/meta/packages/perl/perl-5.8.8/Makefile.SH.patch +++ b/meta/packages/perl/perl-5.8.8/Makefile.SH.patch @@ -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. diff --git a/meta/packages/perl/perl-5.8.8/config.sh b/meta/packages/perl/perl-5.8.8/config.sh index ac8d237cac..8d1f904f20 100644 --- a/meta/packages/perl/perl-5.8.8/config.sh +++ b/meta/packages/perl/perl-5.8.8/config.sh @@ -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 diff --git a/meta/packages/perl/perl-5.8.8/native-perlinc.patch b/meta/packages/perl/perl-5.8.8/native-perlinc.patch index aea38a0b56..6dc4b9538d 100644 --- a/meta/packages/perl/perl-5.8.8/native-perlinc.patch +++ b/meta/packages/perl/perl-5.8.8/native-perlinc.patch @@ -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}; diff --git a/meta/packages/perl/perl-5.8.8/native-ssp.patch b/meta/packages/perl/perl-5.8.8/native-ssp.patch index f815aad452..1c825f50d0 100644 --- a/meta/packages/perl/perl-5.8.8/native-ssp.patch +++ b/meta/packages/perl/perl-5.8.8/native-ssp.patch @@ -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 diff --git a/meta/packages/perl/perl-native_5.8.8.bb b/meta/packages/perl/perl-native_5.8.8.bb index fb8be281bf..05b4c1e64e 100644 --- a/meta/packages/perl/perl-native_5.8.8.bb +++ b/meta/packages/perl/perl-native_5.8.8.bb @@ -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 index 15ae55cf17..0000000000 --- a/meta/packages/perl/perl.inc +++ /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" - 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 \ 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" |