X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=blobdiff_plain;f=Makefile.PL;h=8c4802b5fb6f68c0695316e2e201e889d1f33c54;hp=acb2ffb34bc2bd59905b013d8b75b3ad6f2a0ae5;hb=1c9cde8ea186150ec281586cc0685641d205ea27;hpb=4b25534dff295b1317d0156824a25a55038a1684 diff --git a/Makefile.PL b/Makefile.PL index acb2ffb..8c4802b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,6 +5,37 @@ use Cwd; use vars qw($bootstrapping $bootstrapping_args $no_manpages); use Config; +# Solaris (and possibly other Unices) have a tar in /usr/bin that, among +# other things, does not understand @LongLink. This can cause +# extraction to look like it succeeded, but it actually failed (because +# the error message for the @LongLink failure scrolled offscreen). +# Therefore, given the fact that GNU tar is the most widespread tar available, +# and it actually supports the feature we want (I'd bet it originated in GNU +# tar, but I digress), we'll look for GNU tar. If we don't find it, and the +# user hasn't pointed us to a suitable tar, we'll bomb and tell them what to +# do. + +my $have_gtar = 0; +if($^O eq 'solaris') { + $have_gtar = 0; + for my $env_path (split /:/, $ENV{PATH}) { + $have_gtar = 1 if -x File::Spec->catfile($env_path, 'gtar'); + } +} else { + $have_gtar = 1; +} +if(exists $ENV{PERL_LL_TAR}) { + $have_gtar ||= -x $ENV{PERL_LL_TAR}; +} + +die <<'DEATH' unless $has_gtar; +You are using Solaris (or another traditional Unix) that does not provide a sane +tar, capable of dealing with the output of GNU tar. Please either set the +PERL_LL_TAR environment variable to the location of a version of tar that +understands the @LongLink convention or put a binary named gtar somewhere on +your PATH. +DEATH + my $cwd; BEGIN { $cwd = Cwd::cwd(); @@ -47,6 +78,10 @@ DEATH push(@ARGV,$ENV{PERL_MM_OPT}); push(@ARGV, @libs); + # GODDAMN makepl_arg INSTALLDIRS=site + # we must set PERL_AUTOINSTALL_PREFER_CPAN too + $ENV{PERL_AUTOINSTALL_PREFER_CPAN} = 1; + system($^X, '-MExtUtils::MakeMaker 6.31', '-e1'); my $eumm = $? >> 8; @@ -67,6 +102,18 @@ DEATH } return $orig->(@_); }; + $CPAN::Config->{urllist} = ["http://cpan.shadowcatprojects.net"]; + # all bootstrapped fine on one DH account + # on another, it tries to install man stuff into /usr/local + # cannot for the life of me figure out why + # (same fucking server as well) + # GOT THE BASTARD + # ExtUtils::ParseXS uses Module::Build + # but Module::Build depends on it + # so you need to set prefer_installer MM + # so cpan uses EU::ParseXS' Makefile.PL + # since we already got EUMM, *that* works + $CPAN::Config->{prefer_installer} = "EUMM"; CPAN::Config->load; unless ($done || -w $CPAN::Config->{keep_source_where}) { my $save = $CPAN::Config->{urllist};