]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: Sync with OE, fix hardcoded staging references
authorRichard Purdie <richard@openedhand.com>
Tue, 30 Oct 2007 08:21:24 +0000 (08:21 +0000)
committerRichard Purdie <richard@openedhand.com>
Tue, 30 Oct 2007 08:21:24 +0000 (08:21 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3034 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/perl/perl-5.8.8/Makefile.SH.patch
meta/packages/perl/perl-5.8.8/Makefile.patch
meta/packages/perl/perl-5.8.8/asm-pageh-fix.patch [new file with mode: 0644]
meta/packages/perl/perl-5.8.8/generate-sh.patch
meta/packages/perl/perl-5.8.8/installperl.patch [new file with mode: 0644]
meta/packages/perl/perl-5.8.8/makedepend-dash.patch [moved from meta/packages/perl/perl-5.8.8/native-makedepend-dash.patch with 100% similarity]
meta/packages/perl/perl-5.8.8/native-ssp.patch [new file with mode: 0644]
meta/packages/perl/perl-native_5.8.8.bb
meta/packages/perl/perl_5.8.8.bb

index c674ce9ee5666808b83f048b33f2d43c646792c5..a30074be2b64aeed018407154024ee3a7a174aa7 100644 (file)
@@ -1,6 +1,37 @@
---- perl-5.8.8/Makefile.SH     2007/04/20 12:43:33     1.1
-+++ perl-5.8.8/Makefile.SH     2007/04/20 15:20:40
-@@ -129,18 +129,7 @@
+Index: perl-5.8.8/Makefile.SH
+===================================================================
+--- perl-5.8.8.orig/Makefile.SH        2006-01-24 23:49:44.000000000 +1100
++++ perl-5.8.8/Makefile.SH     2007-06-14 13:29:37.000000000 +1000
+@@ -43,12 +43,12 @@
+ true)
+       # Prefix all runs of 'miniperl' and 'perl' with
+       # $ldlibpth so that ./perl finds *this* shared libperl.
+-      case "$LD_LIBRARY_PATH" in
+-      '')
+-              ldlibpth="LD_LIBRARY_PATH=`pwd`";;
+-      *)
+-              ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
+-      esac
++#     case "$LD_LIBRARY_PATH" in
++#     '')
++#             ldlibpth="LD_LIBRARY_PATH=`pwd`";;
++#     *)
++#             ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
++#     esac
+       pldlflags="$cccdlflags"
+       static_target='static_pic'
+@@ -108,7 +108,8 @@
+               ldlibpth=''
+               ;;
+           *)
+-              eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
++# We compile in the library path in OE from cross-compile, so lets not do this
++#             eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
+               ;;
+           esac
+           # Strip off any trailing :'s
+@@ -129,18 +130,7 @@
            # INSTALL file, under "Building a shared perl library".
            # If there is no pre-existing $libperl, we don't need
            # to do anything further.
@@ -20,7 +51,7 @@
            ;;
        os390)  test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
                ;;
-@@ -401,9 +390,19 @@
+@@ -401,9 +391,19 @@
  .c.s:
        $(CCCMDSRC) -S $*.c
  
@@ -43,7 +74,7 @@
  
  .PHONY: all compile translators utilities
  
-@@ -413,10 +412,10 @@
+@@ -413,10 +413,10 @@
        cd x2p; $(MAKE) compile;
        cd pod; $(MAKE) compile;
  
@@ -56,7 +87,7 @@
        @echo " "; echo "       Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
  
  
-@@ -550,7 +549,7 @@
+@@ -550,7 +550,7 @@
        case "$useshrplib" in
        true)
                $spitshell >>Makefile <<'!NO!SUBS!'
@@ -65,7 +96,7 @@
  !NO!SUBS!
                case "$osname" in
                aix)
-@@ -591,7 +590,9 @@
+@@ -591,7 +591,9 @@
        $(CC) -o miniperl $(CLDFLAGS) \
            `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
            miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
  !NO!SUBS!
                ;;
        next4*)
-@@ -599,7 +600,9 @@
+@@ -599,7 +601,9 @@
  miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
        $(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
            miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
  !NO!SUBS!
                ;;
        darwin*)
-@@ -620,7 +623,9 @@
+@@ -620,7 +624,9 @@
        -@rm -f miniperl.xok
        $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl \
            miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
  !NO!SUBS!
                ;;
        *)
-@@ -629,7 +634,9 @@
+@@ -629,7 +635,9 @@
        -@rm -f miniperl.xok
        $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
            miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
  !NO!SUBS!
                ;;
        esac
-@@ -766,7 +773,7 @@
+@@ -766,7 +774,7 @@
  # We need to autosplit in two steps because VOS can't handle so many args
  #
  .PHONY: preplibrary
        @sh ./makedir lib/auto
        @echo " AutoSplitting perl library"
        $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
-@@ -775,35 +782,35 @@
+@@ -775,35 +783,35 @@
                autosplit_lib_modules(@ARGV)' lib/*/*.pm
        $(MAKE) lib/re.pm
  
        -@test -f extra.pods && rm -f `cat extra.pods`
        -@rm -f extra.pods
        -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
-@@ -850,18 +857,7 @@
+@@ -850,18 +858,7 @@
  INSTALL_DEPENDENCE = all
  
  install.perl: $(INSTALL_DEPENDENCE) installperl
  
  # XXX Experimental. Hardwired values, but useful for testing.
  # Eventually Configure could ask for some of these values.
-@@ -978,16 +974,16 @@
+@@ -978,16 +975,16 @@
  #
  # DynaLoader may be needed for extensions that use Makefile.PL.
  
        @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
  
  .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
-@@ -1125,7 +1121,7 @@
+@@ -1125,7 +1122,7 @@
  
  test_prep_pre: preplibrary utilities $(nonxs_ext)
  
        PERL=./perl $(MAKE) _test_prep
  
  _test_tty:
-@@ -1238,7 +1234,7 @@
+@@ -1238,7 +1235,7 @@
  
  # Can't depend on lib/Config.pm because that might be where miniperl
  # is crashing.
index c78a39b178a745a926f3a4006552f99da16c90f6..ed494b32875f73a68a41bb884d4df72ec3decfab 100644 (file)
@@ -1,6 +1,18 @@
---- perl-5.8.8/Cross/Makefile  2007/04/06 00:47:46     1.1
-+++ perl-5.8.8/Cross/Makefile  2007/04/06 00:48:04
-@@ -12,7 +12,7 @@
+Index: perl-5.8.8/Cross/Makefile
+===================================================================
+--- perl-5.8.8.orig/Cross/Makefile     2004-01-12 21:44:01.000000000 +0100
++++ perl-5.8.8/Cross/Makefile  2007-08-15 00:15:18.000000000 +0200
+@@ -2,7 +2,8 @@
+ #
+ ## $Id: Makefile,v 1.7 2004/01/12 15:41:02 red Exp red $
+-export TOPDIR=${shell pwd}
++override TOPDIR=${shell pwd}
++export TOPDIR
+ include $(TOPDIR)/config
+ export CFLAGS
+ export SYS=$(ARCH)-$(OS)
+@@ -12,7 +13,7 @@
  
  export CC = $(CROSS)gcc
  export CXX = $(CROSS)g++
@@ -9,7 +21,29 @@
  export STRIP = $(CROSS)strip
  export AR = $(CROSS)ar
  export RANLIB = $(CROSS)ranlib
-@@ -58,11 +58,11 @@
+@@ -34,21 +35,6 @@
+ all:
+       @echo Please read the README file before doing anything else.
+-gen_patch:
+-      diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch
+-      diff -Bbur ../installperl installperl > installperl.patch
+-
+-patch:
+-      cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \
+-              patch -p1 < Cross/Makefile.SH.patch; \
+-              patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched; \
+-              sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl; \
+-              touch CROSS_PATCHED ; fi
+-
+-dry_patch:
+-      cd .. ; patch --dry-run -p1 < Cross/Makefile.SH.patch; \
+-              patch --dry-run -p1 < Cross/installperl.patch; \
+-
+ perl:
+       @echo Perl cross-build directory is $(TOPDIR)
+       @echo Target arch is $(SYS)
+@@ -58,11 +44,11 @@
        $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh
        cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more
        cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm fake_config_library
diff --git a/meta/packages/perl/perl-5.8.8/asm-pageh-fix.patch b/meta/packages/perl/perl-5.8.8/asm-pageh-fix.patch
new file mode 100644 (file)
index 0000000..41f3b1d
--- /dev/null
@@ -0,0 +1,19 @@
+Perl inclues asm/page.h in order to get the definition for getpagesize which
+has been definied in unistd.h since glibc 2.1. Some recent version of linux
+libc headers removed the asm/page.h resulting in failures here for some
+people.
+
+Index: perl-5.8.8/ext/IPC/SysV/SysV.xs
+===================================================================
+--- perl-5.8.8.orig/ext/IPC/SysV/SysV.xs       2001-07-01 04:46:07.000000000 +1000
++++ perl-5.8.8/ext/IPC/SysV/SysV.xs    2007-07-06 11:40:21.000000000 +1000
+@@ -3,9 +3,6 @@
+ #include "XSUB.h"
+ #include <sys/types.h>
+-#ifdef __linux__
+-#   include <asm/page.h>
+-#endif
+ #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
+ #ifndef HAS_SEM
+ #   include <sys/ipc.h>
index 50ce00b42f98b0559da1f38410fc4d011948959e..ceb74196d687036a298d98a783e37ea54fd5c414 100644 (file)
@@ -35,7 +35,7 @@ Index: perl-5.8.8/Cross/generate_config_sh
 +              $value =~ s/^\'//;
 +              $value =~ s/\'$//;
 +              # Remove -I/usr/local/... from the value
-+              $value =~ s#\W-I/usr/local/\w+\W##g;
++              $value =~ s#\W-I/usr/local/\w+\W# #g;
 +              # Prepend env var (OE setting) to value
 +              print("$key=\'$ENV{$envvar} $value\'\n");
 +      }
diff --git a/meta/packages/perl/perl-5.8.8/installperl.patch b/meta/packages/perl/perl-5.8.8/installperl.patch
new file mode 100644 (file)
index 0000000..ff52bc3
--- /dev/null
@@ -0,0 +1,15 @@
+Index: perl-5.8.8/installperl
+===================================================================
+--- perl-5.8.8.orig/installperl        2007-06-14 12:36:23.000000000 +1000
++++ perl-5.8.8/installperl     2007-06-14 12:38:39.000000000 +1000
+@@ -3,8 +3,8 @@
+ BEGIN {
+     require 5.004;
+     chdir '..' if !-d 'lib' and -d '../lib';
+-    @INC = 'lib';
+-    $ENV{PERL5LIB} = 'lib';
++#    @INC = 'lib';
++#    $ENV{PERL5LIB} = 'lib';
+ }
+ use strict;
diff --git a/meta/packages/perl/perl-5.8.8/native-ssp.patch b/meta/packages/perl/perl-5.8.8/native-ssp.patch
new file mode 100644 (file)
index 0000000..f815aad
--- /dev/null
@@ -0,0 +1,14 @@
+Fix for compiling with ssp enabled gcc:
+See http://bugs.openembedded.org/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
++++ perl-5.8.7/cflags.SH       2005-10-02 04:08:39.000000000 +0000
+@@ -165,6 +165,8 @@
+ esac
+     : Can we perhaps use $ansi2knr here
++    [[ $file == regcomp ]] && export ccflags="${ccflags} -fno-stack-protector"
++    [[ $file == regexec ]] && export ccflags="${ccflags} -fno-stack-protector"
+     echo "$cc -c -DPERL_CORE $ccflags $optimize $warn"
+     eval "$also "'"$cc -DPERL_CORE -c $ccflags $optimize $warn"'
index d4896daa12ba488cc1387700a24a3aa1654250d4..0e89f11050118aa6c26079dcd10ecd13920d6596 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.perl.org/"
 SECTION = "libs"
 LICENSE = "Artistic|GPL"
 DEPENDS = "virtual/db-native gdbm-native"
-PR = "r10"
+PR = "r13"
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}"
 
@@ -14,7 +14,8 @@ SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
            file://native-nopacklist.patch;patch=1 \
            file://native-no-gdbminc.patch;patch=1 \
            file://native-perlinc.patch;patch=1 \
-           file://native-makedepend-dash.patch;patch=1"
+           file://makedepend-dash.patch;patch=1 \
+           file://asm-pageh-fix.patch;patch=1"
 
 S = "${WORKDIR}/perl-${PV}"
 
index d603c9d67dbead5b8c421c1310d7809016e85987..977852ac21a2c32fa3dd5d64d8e9c8c4d4359493 100644 (file)
@@ -5,18 +5,21 @@ LICENSE = "Artistic|GPL"
 PRIORITY = "optional"
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db perl-native grep-native"
-PR = "r19"
+PR = "r20"
 
 # Major part of version
 PVM = "5.8"
 
 SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
         file://Makefile.patch;patch=1 \
-        file://Makefile.SH.patch \
+        file://Makefile.SH.patch;patch=1 \
+        file://makedepend-dash.patch;patch=1 \
+        file://installperl.patch;patch=1 \
         file://perl-dynloader.patch;patch=1 \
         file://perl-moreconfig.patch;patch=1 \
         file://letgcc-find-errno.patch;patch=1 \
         file://generate-sh.patch;patch=1 \
+        file://perl-5.8.8-gcc-4.2.patch;patch=1 \
         file://09_fix_installperl.patch;patch=1 \
         file://52_debian_extutils_hacks.patch;patch=1 \
         file://53_debian_mod_paths.patch;patch=1 \
@@ -25,6 +28,7 @@ SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
         file://60_debian_libnet_config_path.patch;patch=1 \
         file://62_debian_cpan_definstalldirs.patch;patch=1 \
         file://64_debian_enc2xs_inc.patch;patch=1 \
+        file://asm-pageh-fix.patch;patch=1 \
         file://config.sh \
         file://config.sh-32 \
         file://config.sh-32-le \
@@ -37,15 +41,14 @@ SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
 HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl${PV}"
 
 # Where to find .so files - use the -native versions not those from the target build
-export PERLHOSTLIB = "${STAGING_DIR}/${BUILD_SYS}/lib/perl/${PV}/"
+export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl/${PV}/"
 
 do_configure() {
         # Make hostperl in build directory be the native perl
         cp -f ${HOSTPERL} hostperl
 
-        # This is silly - should just patch Makefile.SH directly
+        # Do our work in the cross subdir
         cd Cross
-        cp -f ${WORKDIR}/Makefile.SH.patch .
 
         # Generate configuration
         rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
@@ -87,8 +90,6 @@ do_configure() {
         rm -f config
         echo "ARCH = ${TARGET_ARCH}" > config
         echo "OS = ${TARGET_OS}" >> config
-
-        oe_runmake patch
 }
 do_compile() {
         if test "${MACHINE}" != "native"; then
@@ -121,18 +122,28 @@ do_install() {
             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" \
-                ${D}/${libdir}/perl/${PV}/Config_heavy.pl
+                   -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_DIR}/${HOST_SYS}/perl \
-                   ${STAGING_DIR}/${BUILD_SYS}/lib/perl/${PV} \
+                   ${STAGING_LIBDIR_NATIVE}/perl/${PV} \
                    ${STAGING_LIBDIR}/perl/${PV}/CORE
         # target config, used by cpan.bbclass to extract version information
         install config.sh ${STAGING_DIR}/${HOST_SYS}/perl/
         # target configuration, used by native perl when cross-compiling
-        install lib/Config_heavy.pl ${STAGING_DIR}/${BUILD_SYS}/lib/perl/${PV}/Config_heavy-target.pl
+        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 \