Remove old cross-compilation model
authorBrian Fraser <fraserbn@gmail.com>
Tue, 12 Nov 2013 04:54:48 +0000 (01:54 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Wed, 22 Jan 2014 16:08:22 +0000 (13:08 -0300)
configpm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm

index 048da37..5484b18 100755 (executable)
--- a/configpm
+++ b/configpm
@@ -128,19 +128,10 @@ if ($Opts{chdir}) {
 my ($Config_SH, $Config_PM, $Config_heavy, $Config_POD);
 my $Glossary = 'Porting/Glossary';
 
-if ($Opts{cross}) {
-  # creating cross-platform config file
-  mkdir "xlib";
-  mkdir "xlib/$Opts{cross}";
-  $Config_PM = "xlib/$Opts{cross}/Config.pm";
-  $Config_POD = "xlib/$Opts{cross}/Config.pod";
-  $Config_SH = "Cross/config-$Opts{cross}.sh";
-}
-else {
-  $Config_PM = "lib/Config.pm";
-  $Config_POD = "lib/Config.pod";
-  $Config_SH = "config.sh";
-}
+$Config_PM = "lib/Config.pm";
+$Config_POD = "lib/Config.pod";
+$Config_SH = "config.sh";
+
 ($Config_heavy = $Config_PM) =~ s/\.pm$/_heavy.pl/;
 die "Can't automatically determine name for Config_heavy.pl from '$Config_PM'"
   if $Config_heavy eq $Config_PM;
@@ -1103,43 +1094,6 @@ if ($orig_config_txt ne $config_txt or $orig_heavy_txt ne $heavy_txt) {
     print "updated $Config_heavy\n";
 }
 
-
-# Now create Cross.pm if needed
-if ($Opts{cross}) {
-  open CROSS, ">lib/Cross.pm" or die "Can not open >lib/Cross.pm: $!";
-  my $cross = <<'EOS';
-# typical invocation:
-#   perl -MCross Makefile.PL
-#   perl -MCross=wince -V:cc
-package Cross;
-
-sub import {
-  my ($package,$platform) = @_;
-  unless (defined $platform) {
-    # if $platform is not specified, then use last one when
-    # 'configpm; was invoked with --cross option
-    $platform = '***replace-marker***';
-  }
-  #a Perl debugger can load a bunch of modules before -MCross with PERL5DB env
-  #var, stopping a cross compile Config.pm from being loaded because the native
-  #Config.pm was already use'd
-  if(exists $INC{'Config.pm'}) {
-    warn "Cross.pm found Config.pm is already loaded, reload required, will delete from %INC";
-    delete $INC{'Config.pm'};
-  }
-  @INC = map {/\blib\b/?(do{local $_=$_;s/\blib\b/xlib\/$platform/;$_},$_):($_)} @INC;
-  $::Cross::platform = $platform;
-}
-
-1;
-EOS
-  $cross =~ s/\*\*\*replace-marker\*\*\*/$Opts{cross}/g;
-  print CROSS $cross;
-  close CROSS;
-  print "written lib/Cross.pm\n";
-  unshift(@INC,"xlib/$Opts{cross}");
-}
-
 # Now do some simple tests on the Config.pm file we have created
 unshift(@INC,'lib');
 unshift(@INC,'xlib/symbian') if $Opts{cross};
index a185b42..be18560 100644 (file)
@@ -1633,14 +1633,7 @@ sub init_INST {
     # you to build directly into, say $Config{privlibexp}.
     unless ($self->{INST_LIB}){
         if ($self->{PERL_CORE}) {
-            if (defined $Cross::platform) {
-                $self->{INST_LIB} = $self->{INST_ARCHLIB} =
-                  $self->catdir($self->{PERL_LIB},"..","xlib",
-                                     $Cross::platform);
-            }
-            else {
-                $self->{INST_LIB} = $self->{INST_ARCHLIB} = $self->{PERL_LIB};
-            }
+            $self->{INST_LIB} = $self->{INST_ARCHLIB} = $self->{PERL_LIB};
         } else {
             $self->{INST_LIB} = $self->catdir($Curdir,"blib","lib");
         }
index 560f789..ec8d48e 100644 (file)
@@ -1635,18 +1635,9 @@ sub init_main {
     if ($self->{PERL_SRC}){
        $self->{PERL_LIB}     ||= $self->catdir("$self->{PERL_SRC}","lib");
 
-        if (defined $Cross::platform) {
-            $self->{PERL_ARCHLIB} =
-              $self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform);
-            $self->{PERL_INC}     =
-              $self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform,
-                                 $Is{Win32}?("CORE"):());
-        }
-        else {
-            $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
-            $self->{PERL_INC}     = ($Is{Win32}) ?
-              $self->catdir($self->{PERL_LIB},"CORE") : $self->{PERL_SRC};
-        }
+        $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
+        $self->{PERL_INC}     = ($Is{Win32}) ?
+            $self->catdir($self->{PERL_LIB},"CORE") : $self->{PERL_SRC};
 
        # catch a situation that has occurred a few times in the past:
        unless (