Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MacOS classic support #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/CPAN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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}), $$;
Expand Down
28 changes: 11 additions & 17 deletions lib/CPAN/CacheMgr.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 0 additions & 33 deletions lib/CPAN/Distribution.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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;
Expand Down
24 changes: 0 additions & 24 deletions lib/CPAN/FTP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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} ?
Expand Down
15 changes: 3 additions & 12 deletions lib/CPAN/FirstTime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}

{
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 0 additions & 3 deletions lib/CPAN/Tarzip.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down