diff --git a/lib/CPAN.pm b/lib/CPAN.pm index 1e257b5c..e04b4c90 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -66,7 +66,6 @@ sub _uniq; no lib "."; -require Mac::BuildTools if $^O eq 'MacOS'; if ($ENV{PERL5_CPAN_IS_RUNNING} && $$ != $ENV{PERL5_CPAN_IS_RUNNING}) { $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION} ||= $ENV{PERL5_CPAN_IS_RUNNING}; my @rec = _uniq split(/,/, $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION}), $$; diff --git a/lib/CPAN/CacheMgr.pm b/lib/CPAN/CacheMgr.pm index 144efd62..fcd49a7e 100644 --- a/lib/CPAN/CacheMgr.pm +++ b/lib/CPAN/CacheMgr.pm @@ -113,25 +113,19 @@ sub disk_usage { sub { $File::Find::prune++ if $CPAN::Signal; return if -l $_; - if ($^O eq 'MacOS') { - require Mac::Files; - my $cat = Mac::Files::FSpGetCatInfo($_); - $Du += $cat->ioFlLgLen() + $cat->ioFlRLgLen() if $cat; - } else { - if (-d _) { - unless (-x _) { - unless (chmod 0755, $_) { - $CPAN::Frontend->mywarn("I have neither the -x permission nor ". - "the permission to change the permission; ". - "can only partially estimate disk usage ". - "of '$_'\n"); - $CPAN::Frontend->mysleep(5); - return; - } + if (-d _) { + unless (-x _) { + unless (chmod 0755, $_) { + $CPAN::Frontend->mywarn("I have neither the -x permission nor ". + "the permission to change the permission; ". + "can only partially estimate disk usage ". + "of '$_'\n"); + $CPAN::Frontend->mysleep(5); + return; } - } else { - $Du += (-s _); } + } else { + $Du += (-s _); } }, $dir diff --git a/lib/CPAN/Distribution.pm b/lib/CPAN/Distribution.pm index 6ce0572e..b818ab3e 100644 --- a/lib/CPAN/Distribution.pm +++ b/lib/CPAN/Distribution.pm @@ -1293,11 +1293,6 @@ sub new { sub look { my($self) = @_; - if ($^O eq 'MacOS') { - $self->Mac::BuildTools::look; - return; - } - if ( $CPAN::Config->{'shell'} ) { $CPAN::Frontend->myprint(qq{ Trying to open a subshell in the build directory... @@ -1404,11 +1399,6 @@ sub readme { $local_wanted) or $CPAN::Frontend->mydie(qq{No $sans.readme found}); - if ($^O eq 'MacOS') { - Mac::BuildTools::launch_file($local_file); - return; - } - my $fh_pager = FileHandle->new; local($SIG{PIPE}) = "IGNORE"; my $pager = $CPAN::Config->{'pager'} || "cat"; @@ -2257,12 +2247,6 @@ is part of the perl-%s distribution. To install that, you need to run return; } - if ($^O eq 'MacOS') { - Mac::BuildTools::make($self); - $self->post_make(); - return; - } - my %env; while (my($k,$v) = each %ENV) { next if defined $v; @@ -3730,12 +3714,6 @@ sub test { $self->debug("Changed directory to $self->{build_dir}") if $CPAN::DEBUG; - if ($^O eq 'MacOS') { - Mac::BuildTools::make_test($self); - $self->post_test(); - return; - } - if ($self->{modulebuild}) { my $thm = CPAN::Shell->expand("Module","Test::Harness"); my $v = $thm->inst_version; @@ -3994,11 +3972,6 @@ sub clean { Carp::confess("Couldn't chdir to $self->{build_dir}: $!"); $self->debug("Changed directory to $self->{build_dir}") if $CPAN::DEBUG; - if ($^O eq 'MacOS') { - Mac::BuildTools::make_clean($self); - return; - } - my $system; if ($self->{modulebuild}) { unless (-f "Build") { @@ -4195,12 +4168,6 @@ sub install { my $make = $self->{modulebuild} ? "Build" : "make"; $CPAN::Frontend->myprint(sprintf "Running %s install for %s\n", $make, $self->pretty_id); - if ($^O eq 'MacOS') { - Mac::BuildTools::make_install($self); - $self->post_install(); - return; - } - my $system; if (my $commandline = $self->prefs->{install}{commandline}) { $system = $commandline; diff --git a/lib/CPAN/FTP.pm b/lib/CPAN/FTP.pm index 652f5be7..a7787d20 100644 --- a/lib/CPAN/FTP.pm +++ b/lib/CPAN/FTP.pm @@ -503,29 +503,6 @@ to get #-> sub CPAN::FTP::localize ; sub localize_1995ff { my($self,$file,$aslocal,$force,$with_defaults) = @_; - if ($^O eq 'MacOS') { - # Comment by AK on 2000-09-03: Uniq short filenames would be - # available in CHECKSUMS file - my($name, $path) = File::Basename::fileparse($aslocal, ''); - if (length($name) > 31) { - $name =~ s/( - \.( - readme(\.(gz|Z))? | - (tar\.)?(gz|Z) | - tgz | - zip | - pm\.(gz|Z) - ) - )$//x; - my $suf = $1; - my $size = 31 - length($suf); - while (length($name) > $size) { - chop $name; - } - $name .= $suf; - $aslocal = File::Spec->catfile($path, $name); - } - } return $aslocal if $self->have_promising_aslocal($aslocal, $force); my($maybe_restore) = 0; @@ -599,7 +576,6 @@ sub localize_1995ff { } else { @levels = @all_levels; } - @levels = qw/dleasy/ if $^O eq 'MacOS'; my($levelno); local $ENV{FTP_PASSIVE} = exists $CPAN::Config->{ftp_passive} ? diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm index 8934f4a2..ede55752 100644 --- a/lib/CPAN/FirstTime.pm +++ b/lib/CPAN/FirstTime.pm @@ -1037,7 +1037,7 @@ sub init { { my $path = $CPAN::Config->{'pager'} || $ENV{PAGER} || find_exe("less",\@path) || - find_exe("more",\@path) || ($^O eq 'MacOS' ? $ENV{EDITOR} : 0 ) + find_exe("more",\@path) || 0 || "more"; my_dflt_prompt(pager => $path, $matcher); } @@ -1051,12 +1051,8 @@ sub init { } $path ||= $ENV{SHELL}; $path ||= $ENV{COMSPEC} if $^O eq "MSWin32"; - if ($^O eq 'MacOS') { - $CPAN::Config->{'shell'} = 'not_here'; - } else { - $path ||= 'sh', $path =~ s,\\,/,g if $^O eq 'os2'; # Cosmetic only - my_dflt_prompt(shell => $path, $matcher); - } + $path ||= 'sh', $path =~ s,\\,/,g if $^O eq 'os2'; # Cosmetic only + my_dflt_prompt(shell => $path, $matcher); } { @@ -1568,15 +1564,10 @@ sub _init_external_progs { if (!$matcher or "@external_progs" =~ /$matcher/) { my $old_warn = $^W; - local $^W if $^O eq 'MacOS'; local $^W = $old_warn; my $progname; for $progname (@external_progs) { next if $matcher && $progname !~ /$matcher/; - if ($^O eq 'MacOS') { - $CPAN::Config->{$progname} = 'not_here'; - next; - } my $progcall = $progname; unless ($matcher) { diff --git a/lib/CPAN/Tarzip.pm b/lib/CPAN/Tarzip.pm index 6517cb8f..389e72a0 100644 --- a/lib/CPAN/Tarzip.pm +++ b/lib/CPAN/Tarzip.pm @@ -414,9 +414,6 @@ Can't continue cutting file '$file'. $CPAN::Frontend->mydie("Could not untar with Archive::Tar."); } - Mac::BuildTools::convert_files([$tar->list_files], 1) - if ($^O eq 'MacOS'); - return 1; } }