perl 5.8.8: Directly patch the files that need patching instead of having a
authorJamie Lenehan <lenehan@twibble.org>
Thu, 14 Jun 2007 03:15:33 +0000 (03:15 +0000)
committerJamie Lenehan <lenehan@twibble.org>
Thu, 14 Jun 2007 03:15:33 +0000 (03:15 +0000)
makefile within the perl build apply the patches. This was a left over from
the previous perl version and makes modifying these patches a lot more
difficult than it really needs to be.

packages/perl/perl-5.8.8/Makefile.patch
packages/perl/perl-5.8.8/installperl.patch [new file with mode: 0644]
packages/perl/perl_5.8.8.bb

index c78a39b..cf5cca1 100644 (file)
@@ -1,5 +1,7 @@
---- 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
+Index: perl-5.8.8/Cross/Makefile
+===================================================================
+--- perl-5.8.8.orig/Cross/Makefile     2004-01-13 07:44:01.000000000 +1100
++++ perl-5.8.8/Cross/Makefile  2007-06-14 12:40:44.000000000 +1000
 @@ -12,7 +12,7 @@
  
  export CC = $(CROSS)gcc
@@ -9,7 +11,29 @@
  export STRIP = $(CROSS)strip
  export AR = $(CROSS)ar
  export RANLIB = $(CROSS)ranlib
-@@ -58,11 +58,11 @@
+@@ -34,21 +34,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 +43,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/packages/perl/perl-5.8.8/installperl.patch b/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;
index 603280b..93b7c8d 100644 (file)
@@ -5,14 +5,15 @@ LICENSE = "Artistic|GPL"
 PRIORITY = "optional"
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db perl-native grep-native"
-PR = "r21"
+PR = "r22"
 
 # 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://installperl.patch;patch=1 \
         file://perl-dynloader.patch;patch=1 \
         file://perl-moreconfig.patch;patch=1 \
         file://letgcc-find-errno.patch;patch=1 \
@@ -44,9 +45,8 @@ 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 out work in the cross subdir
         cd Cross
-        cp -f ${WORKDIR}/Makefile.SH.patch .
 
         # Generate configuration
         rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
@@ -88,8 +88,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