summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2014-11-17 20:56:47 +0000
committerafresh1 <afresh1@openbsd.org>2014-11-17 20:56:47 +0000
commite5157e49389faebcb42b7237d55fbf096d9c2523 (patch)
tree268e07adf82302172a9a375d4378d98581823a65 /gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils
parentImport perl-5.20.1 (diff)
downloadwireguard-openbsd-e5157e49389faebcb42b7237d55fbf096d9c2523.tar.xz
wireguard-openbsd-e5157e49389faebcb42b7237d55fbf096d9c2523.zip
Fix merge conflicts, remove extra files, match upstream perl-5.20.1
ok deraadt@ sthen@ espie@ miod@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils')
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm295
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm345
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm362
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod17
4 files changed, 713 insertions, 306 deletions
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index b37ee43bd80..20663111ef1 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -1,7 +1,7 @@
package ExtUtils::MM_Any;
use strict;
-our $VERSION = '6.66';
+our $VERSION = '6.98';
use Carp;
use File::Spec;
@@ -66,7 +66,7 @@ These are methods which help writing cross-platform code.
my @os_flavor = $mm->os_flavor;
@os_flavor is the style of operating system this is, usually
-corresponding to the MM_*.pm file we're using.
+corresponding to the MM_*.pm file we're using.
The first element of @os_flavor is the major family (ie. Unix,
Windows, VMS, OS/2, etc...) and the rest are sub families.
@@ -80,7 +80,7 @@ Some examples:
MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
OS/2 ('OS/2')
-This is used to write code for styles of operating system.
+This is used to write code for styles of operating system.
See os_flavor_is() for use.
@@ -236,7 +236,7 @@ sub echo {
$opts->{allow_variables} = 0 unless defined $opts->{allow_variables};
my $ql_opts = { allow_variables => $opts->{allow_variables} };
- my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_, $ql_opts) }
+ my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_, $ql_opts) }
split /\n/, $text;
if( $file ) {
my $redirect = $opts->{append} ? '>>' : '>';
@@ -519,7 +519,7 @@ sub clean {
clean :: clean_subdirs
');
- my @files = values %{$self->{XS}}; # .c files from *.xs files
+ my @files = sort values %{$self->{XS}}; # .c files from *.xs files
my @dirs = qw(blib);
# Normally these are all under blib but they might have been
@@ -531,10 +531,10 @@ clean :: clean_subdirs
# push @dirs, qw($(INST_ARCHLIB) $(INST_LIB)
# $(INST_BIN) $(INST_SCRIPT)
# $(INST_MAN1DIR) $(INST_MAN3DIR)
-# $(INST_LIBDIR) $(INST_ARCHLIBDIR) $(INST_AUTODIR)
-# $(INST_STATIC) $(INST_DYNAMIC) $(INST_BOOT)
+# $(INST_LIBDIR) $(INST_ARCHLIBDIR) $(INST_AUTODIR)
+# $(INST_STATIC) $(INST_DYNAMIC)
# );
-
+
if( $attribs{FILES} ) {
# Use @dirs because we don't know what's in here.
@@ -543,7 +543,7 @@ clean :: clean_subdirs
split /\s+/, $attribs{FILES} ;
}
- push(@files, qw[$(MAKE_APERL_FILE)
+ push(@files, qw[$(MAKE_APERL_FILE)
MYMETA.json MYMETA.yml perlmain.c tmon.out mon.out so_locations
blibdirs.ts pm_to_blib pm_to_blib.ts
*$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT)
@@ -556,7 +556,13 @@ clean :: clean_subdirs
push(@files, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.ld'));
# core files
- push(@files, qw[core core.*perl.*.? *perl.core]);
+ if ($^O eq 'vos') {
+ push(@files, qw[perl*.kp]);
+ }
+ else {
+ push(@files, qw[core core.*perl.*.? *perl.core]);
+ }
+
push(@files, map { "core." . "[0-9]"x$_ } (1..5));
# OS specific things to clean up. Use @dirs since we don't know
@@ -564,14 +570,15 @@ clean :: clean_subdirs
push @dirs, $self->extra_clean_files;
# Occasionally files are repeated several times from different sources
- { my(%f) = map { ($_ => 1) } @files; @files = keys %f; }
- { my(%d) = map { ($_ => 1) } @dirs; @dirs = keys %d; }
+ { my(%f) = map { ($_ => 1) } @files; @files = sort keys %f; }
+ { my(%d) = map { ($_ => 1) } @dirs; @dirs = sort keys %d; }
push @m, map "\t$_\n", $self->split_command('- $(RM_F)', @files);
push @m, map "\t$_\n", $self->split_command('- $(RM_RF)', @dirs);
# Leave Makefile.old around for realclean
push @m, <<'MAKE';
+ $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
MAKE
@@ -604,7 +611,7 @@ NOOP_FRAG
for my $dir (@{$self->{DIR}}) {
my $subclean = $self->oneliner(sprintf <<'CODE', $dir);
-chdir '%s'; system '$(MAKE) clean' if -f '$(FIRST_MAKEFILE)';
+exit 0 unless chdir '%s'; system '$(MAKE) clean' if -f '$(FIRST_MAKEFILE)';
CODE
$clean .= "\t$subclean\n";
@@ -625,7 +632,7 @@ Because depending on a directory to just ensure it exists doesn't work
too well (the modified time changes too often) dir_target() creates a
.exists file in the created directory. It is this you should depend on.
For portability purposes you should use the $(DIRFILESEP) macro rather
-than a '/' to seperate the directory from the file.
+than a '/' to separate the directory from the file.
yourdirectory$(DIRFILESEP).exists
@@ -636,7 +643,7 @@ sub dir_target {
my $make = '';
foreach my $dir (@dirs) {
- $make .= sprintf <<'MAKE', ($dir) x 7;
+ $make .= sprintf <<'MAKE', ($dir) x 4;
%s$(DFSEP).exists :: Makefile.PL
$(NOECHO) $(MKPATH) %s
$(NOECHO) $(CHMOD) $(PERM_DIR) %s
@@ -683,7 +690,7 @@ MAKE_FRAG
=head3 dist_test
Defines a target that produces the distribution in the
-scratchdirectory, and runs 'perl Makefile.PL; make ;make test' in that
+scratch directory, and runs 'perl Makefile.PL; make ;make test' in that
subdirectory.
=cut
@@ -720,7 +727,7 @@ sub dynamic {
my($self) = shift;
'
-dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
+dynamic :: $(FIRST_MAKEFILE) $(BOOTSTRAP) $(INST_DYNAMIC)
$(NOECHO) $(NOOP)
';
}
@@ -763,7 +770,7 @@ sub manifypods_target {
my $dependencies = '';
# populate manXpods & dependencies:
- foreach my $name (keys %{$self->{MAN1PODS}}, keys %{$self->{MAN3PODS}}) {
+ foreach my $name (sort keys %{$self->{MAN1PODS}}, sort keys %{$self->{MAN3PODS}}) {
$dependencies .= " \\\n\t$name";
}
@@ -774,7 +781,7 @@ END
my @man_cmds;
foreach my $section (qw(1 3)) {
my $pods = $self->{"MAN${section}PODS"};
- push @man_cmds, $self->split_command(<<CMD, %$pods);
+ push @man_cmds, $self->split_command(<<CMD, map {($_,$pods->{$_})} sort keys %$pods);
\$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)
CMD
}
@@ -799,9 +806,9 @@ sub _has_cpan_meta {
Generate the metafile target.
-Writes the file META.yml YAML encoded meta-data about the module in
-the distdir. The format follows Module::Build's as closely as
-possible.
+Writes the file META.yml (YAML encoded meta-data) and META.json
+(JSON encoded meta-data) about the module in the distdir.
+The format follows Module::Build's as closely as possible.
=cut
@@ -816,13 +823,13 @@ MAKE_FRAG
$self->{META_ADD} || {},
$self->{META_MERGE} || {},
);
-
+
_fix_metadata_before_conversion( \%metadata );
# paper over validation issues, but still complain, necessary because
# there's no guarantee that the above will fix ALL errors
my $meta = eval { CPAN::Meta->create( \%metadata, { lazy_validation => 1 } ) };
- warn $@ if $@ and
+ warn $@ if $@ and
$@ !~ /encountered CODE.*, but JSON can only represent references to arrays or hashes/;
# use the original metadata straight if the conversion failed
@@ -919,7 +926,7 @@ sub _fix_metadata_before_conversion {
my @pairs = _sort_pairs($sort_sub, \%hash);
-Sorts the pairs of a hash based on keys ordered according
+Sorts the pairs of a hash based on keys ordered according
to C<$sort_sub>.
=end private
@@ -952,7 +959,8 @@ sub _hash_merge {
my @metadata_pairs = $mm->metafile_data(\%meta_add, \%meta_merge);
-Returns the data which MakeMaker turns into the META.yml file.
+Returns the data which MakeMaker turns into the META.yml file
+and the META.json file.
Values of %meta_add will overwrite any existing metadata in those
keys. %meta_merge will be merged with them.
@@ -980,7 +988,7 @@ sub metafile_data {
generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
+ url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
version => 1.4
},
);
@@ -988,19 +996,14 @@ sub metafile_data {
# The author key is required and it takes a list.
$meta{author} = defined $self->{AUTHOR} ? $self->{AUTHOR} : [];
- # Check the original args so we can tell between the user setting it
- # to an empty hash and it just being initialized.
- if( $self->{ARGS}{CONFIGURE_REQUIRES} ) {
- $meta{configure_requires}
- = _normalize_prereqs($self->{CONFIGURE_REQUIRES});
- } else {
- $meta{configure_requires} = {
- 'ExtUtils::MakeMaker' => 0,
- };
+ {
+ my $vers = _metaspec_version( $meta_add, $meta_merge );
+ my $method = $vers =~ m!^2!
+ ? '_add_requirements_to_meta_v2'
+ : '_add_requirements_to_meta_v1_4';
+ %meta = $self->$method( %meta );
}
- %meta = $self->_add_requirements_to_meta_v1_4( %meta );
-
while( my($key, $val) = each %$meta_add ) {
$meta{$key} = $val;
}
@@ -1017,11 +1020,31 @@ sub metafile_data {
=cut
+sub _metaspec_version {
+ my ( $meta_add, $meta_merge ) = @_;
+ return $meta_add->{'meta-spec'}->{version}
+ if defined $meta_add->{'meta-spec'}
+ and defined $meta_add->{'meta-spec'}->{version};
+ return $meta_merge->{'meta-spec'}->{version}
+ if defined $meta_merge->{'meta-spec'}
+ and defined $meta_merge->{'meta-spec'}->{version};
+ return '1.4';
+}
+
sub _add_requirements_to_meta_v1_4 {
my ( $self, %meta ) = @_;
# Check the original args so we can tell between the user setting it
# to an empty hash and it just being initialized.
+ if( $self->{ARGS}{CONFIGURE_REQUIRES} ) {
+ $meta{configure_requires}
+ = _normalize_prereqs($self->{CONFIGURE_REQUIRES});
+ } else {
+ $meta{configure_requires} = {
+ 'ExtUtils::MakeMaker' => 0,
+ };
+ }
+
if( $self->{ARGS}{BUILD_REQUIRES} ) {
$meta{build_requires} = _normalize_prereqs($self->{BUILD_REQUIRES});
} else {
@@ -1050,6 +1073,15 @@ sub _add_requirements_to_meta_v2 {
# Check the original args so we can tell between the user setting it
# to an empty hash and it just being initialized.
+ if( $self->{ARGS}{CONFIGURE_REQUIRES} ) {
+ $meta{prereqs}{configure}{requires}
+ = _normalize_prereqs($self->{CONFIGURE_REQUIRES});
+ } else {
+ $meta{prereqs}{configure}{requires} = {
+ 'ExtUtils::MakeMaker' => 0,
+ };
+ }
+
if( $self->{ARGS}{BUILD_REQUIRES} ) {
$meta{prereqs}{build}{requires} = _normalize_prereqs($self->{BUILD_REQUIRES});
} else {
@@ -1063,7 +1095,7 @@ sub _add_requirements_to_meta_v2 {
}
$meta{prereqs}{runtime}{requires} = _normalize_prereqs($self->{PREREQ_PM})
- if defined $self->{PREREQ_PM};
+ if $self->{ARGS}{PREREQ_PM};
$meta{prereqs}{runtime}{requires}{perl} = _normalize_version($self->{MIN_PERL_VERSION})
if $self->{MIN_PERL_VERSION};
@@ -1103,24 +1135,24 @@ sub _normalize_version {
Implements a fake YAML dumper for a hash given
as a list of pairs. No quoting/escaping is done. Keys
-are supposed to be strings. Values are undef, strings,
+are supposed to be strings. Values are undef, strings,
hash refs or array refs of strings.
Supported options are:
delta => STR - indentation delta
use_header => BOOL - whether to include a YAML header
- indent => STR - a string of spaces
+ indent => STR - a string of spaces
default: ''
max_key_length => INT - maximum key length used to align
keys and values of the same hash
default: 20
- key_sort => CODE - a sort sub
+ key_sort => CODE - a sort sub
It may be undef, which means no sorting by keys
default: sub { lc $a cmp lc $b }
- customs => HASH - special options for certain keys
+ customs => HASH - special options for certain keys
(whose values are hashes themselves)
may contain: max_key_length, key_sort, customs
@@ -1136,8 +1168,8 @@ sub _dump_hash {
# Use a list to preserve order.
my @pairs;
- my $k_sort
- = exists $options->{key_sort} ? $options->{key_sort}
+ my $k_sort
+ = exists $options->{key_sort} ? $options->{key_sort}
: sub { lc $a cmp lc $b };
if ($k_sort) {
croak "'key_sort' should be a coderef" unless ref $k_sort eq 'CODE';
@@ -1173,7 +1205,7 @@ sub _dump_hash {
$k_options{$k} = $k_custom{$k} if exists $k_custom{$k};
}
}
- $yaml .= $indent . "$key:\n"
+ $yaml .= $indent . "$key:\n"
. _dump_hash(\%k_options, %$val);
}
else {
@@ -1233,8 +1265,8 @@ sub metafile_file {
my $self = shift;
my %dump_options = (
- use_header => 1,
- delta => ' ' x 4,
+ use_header => 1,
+ delta => ' ' x 4,
key_sort => undef,
);
return _dump_hash(\%dump_options, @_);
@@ -1246,8 +1278,8 @@ sub metafile_file {
my $make_frag = $mm->distmeta_target;
-Generates the distmeta target to add META.yml to the MANIFEST in the
-distdir.
+Generates the distmeta target to add META.yml and META.json to the MANIFEST
+in the distdir.
=cut
@@ -1283,8 +1315,8 @@ MAKE
my $mymeta = $mm->mymeta;
-Generate MYMETA information as a hash either from an existing META.yml
-or from internal data.
+Generate MYMETA information as a hash either from an existing CPAN Meta file
+(META.json or META.yml) or from internal data.
=cut
@@ -1352,9 +1384,7 @@ sub _mymeta_from_meta {
$self->write_mymeta( $mymeta );
-Write MYMETA information to MYMETA.yml.
-
-This will probably be refactored into a more generic YAML dumping method.
+Write MYMETA information to MYMETA.json and MYMETA.yml.
=cut
@@ -1365,7 +1395,7 @@ sub write_mymeta {
return unless _has_cpan_meta();
_fix_metadata_before_conversion( $mymeta );
-
+
# this can still blow up
# not sure if i should just eval this and skip file creation if it
# blows up
@@ -1411,9 +1441,9 @@ sub realclean {
{ my(%f) = map { ($_ => 1) } @files; @files = keys %f; }
{ my(%d) = map { ($_ => 1) } @dirs; @dirs = keys %d; }
- my $rm_cmd = join "\n\t", map { "$_" }
+ my $rm_cmd = join "\n\t", map { "$_" }
$self->split_command('- $(RM_F)', @files);
- my $rmf_cmd = join "\n\t", map { "$_" }
+ my $rmf_cmd = join "\n\t", map { "$_" }
$self->split_command('- $(RM_RF)', @dirs);
my $m = sprintf <<'MAKE', $rm_cmd, $rmf_cmd;
@@ -1499,7 +1529,7 @@ sub distsignature_target {
my $self = shift;
my $add_sign = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
-eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }
+eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }
or print "Could not add SIGNATURE to MANIFEST: $${'@'}\n"
CODE
@@ -1574,6 +1604,13 @@ sub init_ABSTRACT {
carp "WARNING: Setting ABSTRACT via file ".
"'$self->{ABSTRACT_FROM}' failed\n";
}
+
+ if ($self->{ABSTRACT} && $self->{ABSTRACT} =~ m![[:cntrl:]]+!) {
+ warn "WARNING: ABSTRACT contains control character(s),".
+ " they will be removed\n";
+ $self->{ABSTRACT} =~ s![[:cntrl:]]+!!g;
+ return;
+ }
}
=head3 init_INST
@@ -1596,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");
}
@@ -1612,7 +1642,7 @@ sub init_INST {
my @parentdir = split(/::/, $self->{PARENT_NAME});
$self->{INST_LIBDIR} = $self->catdir('$(INST_LIB)', @parentdir);
$self->{INST_ARCHLIBDIR} = $self->catdir('$(INST_ARCHLIB)', @parentdir);
- $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
+ $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
'$(FULLEXT)');
$self->{INST_ARCHAUTODIR} = $self->catdir('$(INST_ARCHLIB)', 'auto',
'$(FULLEXT)');
@@ -1662,7 +1692,7 @@ sub init_INSTALL_from_PREFIX {
$self->init_lib2arch;
- # There are often no Config.pm defaults for these new man variables so
+ # There are often no Config.pm defaults for these new man variables so
# we fall back to the old behavior which is to use installman*dir
foreach my $num (1, 3) {
my $k = 'installsiteman'.$num.'dir';
@@ -1687,7 +1717,7 @@ sub init_INSTALL_from_PREFIX {
unless $Config{installsitescript};
unless( $Config{installvendorbin} ) {
- $self->{INSTALLVENDORBIN} ||= $Config{usevendorprefix}
+ $self->{INSTALLVENDORBIN} ||= $Config{usevendorprefix}
? $Config{installbin}
: '';
}
@@ -1698,7 +1728,7 @@ sub init_INSTALL_from_PREFIX {
}
- my $iprefix = $Config{installprefixexp} || $Config{installprefix} ||
+ my $iprefix = $Config{installprefixexp} || $Config{installprefix} ||
$Config{prefixexp} || $Config{prefix} || '';
my $vprefix = $Config{usevendorprefix} ? $Config{vendorprefixexp} : '';
my $sprefix = $Config{siteprefixexp} || '';
@@ -1742,7 +1772,7 @@ sub init_INSTALL_from_PREFIX {
unless $Config{'installman'.$num.'dir'};
}
- my %bin_layouts =
+ my %bin_layouts =
(
bin => { s => $iprefix,
t => 'perl',
@@ -1763,7 +1793,7 @@ sub init_INSTALL_from_PREFIX {
t => 'site',
d => 'bin' },
);
-
+
my %man_layouts =
(
man1dir => { s => $iprefix,
@@ -1807,7 +1837,7 @@ sub init_INSTALL_from_PREFIX {
t => 'site',
d => 'site_perl',
style => $libstyle, },
-
+
archlib => { s => $iprefix,
t => 'perl',
d => "$version/$arch",
@@ -1829,7 +1859,7 @@ sub init_INSTALL_from_PREFIX {
my $Installvar = uc "install$var";
if( $var =~ /arch/ ) {
- $self->{$Installvar} ||=
+ $self->{$Installvar} ||=
$self->catdir($self->{LIB}, $Config{archname});
}
else {
@@ -1857,7 +1887,7 @@ sub init_INSTALL_from_PREFIX {
$d = "$style/$d" if $style;
$self->prefixify($installvar, $s, $r, $d);
- warn " $Installvar == $self->{$Installvar}\n"
+ warn " $Installvar == $self->{$Installvar}\n"
if $Verbose >= 2;
}
@@ -1887,7 +1917,7 @@ $map{script} = $map{bin};
sub init_INSTALL_from_INSTALL_BASE {
my $self = shift;
- @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} =
+ @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} =
'$(INSTALL_BASE)';
my %install;
@@ -1896,7 +1926,7 @@ sub init_INSTALL_from_INSTALL_BASE {
my $uc_thing = uc $thing;
my $key = "INSTALL".$dir.$uc_thing;
- $install{$key} ||=
+ $install{$key} ||=
$self->catdir('$(INSTALL_BASE)', @{$map{$thing}});
}
}
@@ -1923,7 +1953,7 @@ MAKEMAKER: path to the MakeMaker module.
MM_VERSION: ExtUtils::MakeMaker Version
-MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
+MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
compat)
VERSION: version of your module
@@ -1960,8 +1990,12 @@ sub init_VERSION {
}
}
- # strip blanks
if (defined $self->{VERSION}) {
+ if ( $self->{VERSION} !~ /^\s*v?[\d_\.]+\s*$/ ) {
+ require version;
+ my $normal = eval { version->parse( $self->{VERSION} ) };
+ $self->{VERSION} = $normal if defined $normal;
+ }
$self->{VERSION} =~ s/^\s+//;
$self->{VERSION} =~ s/\s+$//;
}
@@ -1977,7 +2011,7 @@ sub init_VERSION {
# Graham Barr and Paul Marquess had some ideas how to ensure
# version compatibility between the *.pm file and the
- # corresponding *.xs file. The bottomline was, that we need an
+ # corresponding *.xs file. The bottom line was, that we need an
# XS_VERSION macro that defaults to VERSION:
$self->{XS_VERSION} ||= $self->{VERSION};
@@ -2006,12 +2040,14 @@ Defines at least these macros.
SHELL Program used to run shell commands
ECHO Print text adding a newline on the end
- RM_F Remove a file
- RM_RF Remove a directory
- TOUCH Update a file's timestamp
- TEST_F Test for a file's existence
- CP Copy a file
- MV Move a file
+ RM_F Remove a file
+ RM_RF Remove a directory
+ TOUCH Update a file's timestamp
+ TEST_F Test for a file's existence
+ TEST_S Test the size of a file
+ CP Copy a file
+ CP_NONEMPTY Copy a file if it is not empty
+ MV Move a file
CHMOD Change permissions on a file
FALSE Exit with non-zero
TRUE Exit with zero
@@ -2032,6 +2068,8 @@ sub init_tools {
$self->{RM_F} ||= $self->oneliner('rm_f', ["-MExtUtils::Command"]);
$self->{RM_RF} ||= $self->oneliner('rm_rf', ["-MExtUtils::Command"]);
$self->{TEST_F} ||= $self->oneliner('test_f', ["-MExtUtils::Command"]);
+ $self->{TEST_S} ||= $self->oneliner('test_s', ["-MExtUtils::Command::MM"]);
+ $self->{CP_NONEMPTY} ||= $self->oneliner('cp_nonempty', ["-MExtUtils::Command::MM"]);
$self->{FALSE} ||= $self->oneliner('exit 1');
$self->{TRUE} ||= $self->oneliner('exit 0');
@@ -2040,13 +2078,13 @@ sub init_tools {
$self->{CP} ||= $self->oneliner('cp', ["-MExtUtils::Command"]);
$self->{MV} ||= $self->oneliner('mv', ["-MExtUtils::Command"]);
- $self->{MOD_INSTALL} ||=
+ $self->{MOD_INSTALL} ||=
$self->oneliner(<<'CODE', ['-MExtUtils::Install']);
install([ from_to => {@ARGV}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
CODE
$self->{DOC_INSTALL} ||= $self->oneliner('perllocal_install', ["-MExtUtils::Command::MM"]);
$self->{UNINSTALL} ||= $self->oneliner('uninstall', ["-MExtUtils::Command::MM"]);
- $self->{WARN_IF_OLD_PACKLIST} ||=
+ $self->{WARN_IF_OLD_PACKLIST} ||=
$self->oneliner('warn_if_old_packlist', ["-MExtUtils::Command::MM"]);
$self->{FIXIN} ||= $self->oneliner('MY->fixin(shift)', ["-MExtUtils::MY"]);
$self->{EQUALIZE_TIMESTAMP} ||= $self->oneliner('eqtime', ["-MExtUtils::Command"]);
@@ -2074,7 +2112,7 @@ CODE
# Not everybody uses -f to indicate "use this Makefile instead"
$self->{USEMAKEFILE} ||= '-f';
- # Some makes require a wrapper around macros passed in on the command
+ # Some makes require a wrapper around macros passed in on the command
# line.
$self->{MACROSTART} ||= '';
$self->{MACROEND} ||= '';
@@ -2108,13 +2146,17 @@ sub init_others {
my(@libs) = $self->extliblist($libs);
if ($libs[0] or $libs[1] or $libs[2]){
# LD_RUN_PATH now computed by ExtUtils::Liblist
- ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
+ ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
$self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
last;
}
}
if ( $self->{OBJECT} ) {
+ $self->{OBJECT} = join(" ", @{$self->{OBJECT}}) if ref $self->{OBJECT};
+ $self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
+ } elsif ( $self->{MAGICXS} && @{$self->{O_FILES}||[]} ) {
+ $self->{OBJECT} = join(" ", @{$self->{O_FILES}});
$self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
} else {
# init_dirscan should have found out, if we have C files
@@ -2146,7 +2188,7 @@ sub init_others {
sub _fix_libs {
my($self, $libs) = @_;
- return !defined $libs ? [''] :
+ return !defined $libs ? [''] :
!ref $libs ? [$libs] :
!defined $libs->[0] ? [''] :
$libs ;
@@ -2157,7 +2199,7 @@ sub _fix_libs {
my $make_frag = $MM->tools_other;
-Returns a make fragment containing definitions for the macros init_others()
+Returns a make fragment containing definitions for the macros init_others()
initializes.
=cut
@@ -2168,7 +2210,7 @@ sub tools_other {
# We set PM_FILTER as late as possible so it can see all the earlier
# on macro-order sensitive makes such as nmake.
- for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
+ for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
UMASK_NULL DEV_NULL MKPATH EQUALIZE_TIMESTAMP
FALSE TRUE
ECHO ECHO_N
@@ -2179,7 +2221,8 @@ sub tools_other {
USEMAKEFILE
PM_FILTER
FIXIN
- } )
+ CP_NONEMPTY
+ } )
{
next unless defined $self->{$tool};
push @m, "$tool = $self->{$tool}\n";
@@ -2194,7 +2237,7 @@ sub tools_other {
$MM->init_DIRFILESEP;
my $dirfilesep = $MM->{DIRFILESEP};
-Initializes the DIRFILESEP macro which is the seperator between the
+Initializes the DIRFILESEP macro which is the separator between the
directory and filename in a filepath. ie. / on Unix, \ on Win32 and
nothing on VMS.
@@ -2206,8 +2249,8 @@ For example:
Something of a hack but it prevents a lot of code duplication between
MM_* variants.
-Do not use this as a seperator between directories. Some operating
-systems use different seperators between subdirectories as between
+Do not use this as a separator between directories. Some operating
+systems use different separators between subdirectories as between
directories and filenames (for example: VOLUME:[dir1.dir2]file on VMS).
=head3 init_linker I<Abstract>
@@ -2236,7 +2279,7 @@ Some OSes do not need these in which case leave it blank.
Initialize any macros which are for platform specific use only.
-A typical one is the version number of your OS specific mocule.
+A typical one is the version number of your OS specific module.
(ie. MM_Unix_VERSION or MM_VMS_VERSION).
=cut
@@ -2309,7 +2352,7 @@ sub POD2MAN_macro {
my $self = shift;
# Need the trailing '--' so perl stops gobbling arguments and - happens
-# to be an alternative end of line seperator on VMS so we quote it
+# to be an alternative end of line separator on VMS so we quote it
return <<'END_OF_DEF';
POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
POD2MAN = $(POD2MAN_EXE)
@@ -2331,8 +2374,8 @@ Used on the t/*.t files.
sub test_via_harness {
my($self, $perl, $tests) = @_;
- return qq{\t$perl "-MExtUtils::Command::MM" }.
- qq{"-e" "test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
+ return qq{\t$perl "-MExtUtils::Command::MM" "-MTest::Harness" }.
+ qq{"-e" "undef *Test::Harness::Switches; test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
}
=head3 test_via_script
@@ -2364,7 +2407,7 @@ pm_to_blib soon.
sub tool_autosplit {
my($self, %attribs) = @_;
- my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
+ my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
: '';
my $asplit = $self->oneliner(sprintf <<'PERL_CODE', $maxlen);
@@ -2421,11 +2464,11 @@ sub arch_check {
my $arch = (grep length, $self->splitdir($pthinks))[-1];
print <<END unless $self->{UNINSTALLED_PERL};
-Your perl and your Config.pm seem to have different ideas about the
+Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [$arch]
Config says: [$Config{archname}]
-This may or may not cause problems. Please check your installation of perl
+This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
END
}
@@ -2475,6 +2518,44 @@ sub find_tests {
return -d 't' ? 't/*.t' : '';
}
+=head3 find_tests_recursive
+
+ my $tests = $mm->find_tests_recursive;
+
+Returns a string suitable for feeding to the shell to return all
+tests in t/ but recursively.
+
+=cut
+
+sub find_tests_recursive {
+ my($self) = shift;
+ return '' unless -d 't';
+
+ require File::Find;
+
+ my %testfiles;
+
+ my $wanted = sub {
+ return unless m!\.t$!;
+ my ($volume,$directories,$file) =
+ File::Spec->splitpath( $File::Find::name );
+ my @dirs = File::Spec->splitdir( $directories );
+ for ( @dirs ) {
+ next if $_ eq 't';
+ unless ( $_ ) {
+ $_ = '*.t';
+ next;
+ }
+ $_ = '*';
+ }
+ my $testfile = join '/', @dirs;
+ $testfiles{ $testfile } = 1;
+ };
+
+ File::Find::find( $wanted, 't' );
+
+ return join ' ', sort keys %testfiles;
+}
=head3 extra_clean_files
@@ -2486,7 +2567,7 @@ addition to the usual set.
=cut
# An empty method here tickled a perl 5.8.1 bug and would return its object.
-sub extra_clean_files {
+sub extra_clean_files {
return;
}
@@ -2527,7 +2608,7 @@ installation.
sub libscan {
my($self,$path) = @_;
my($dirs,$file) = ($self->splitpath($path))[1,2];
- return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
+ return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
$self->splitdir($dirs), $file;
return $path;
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 1629b273699..4140432bc8a 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -15,14 +15,14 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue);
# If we make $VERSION an our variable parse_version() breaks
use vars qw($VERSION);
-$VERSION = '6.66';
+$VERSION = '6.98';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
require ExtUtils::MM_Any;
our @ISA = qw(ExtUtils::MM_Any);
my %Is;
-BEGIN {
+BEGIN {
$Is{OS2} = $^O eq 'os2';
$Is{Win32} = $^O eq 'MSWin32' || $Config{osname} eq 'NetWare';
$Is{Dos} = $^O eq 'dos';
@@ -37,6 +37,7 @@ BEGIN {
$Is{BSD} = ($^O =~ /^(?:free|net|open)bsd$/ or
grep( $^O eq $_, qw(bsdos interix dragonfly) )
);
+ $Is{Android} = $^O =~ /android/;
}
BEGIN {
@@ -129,10 +130,10 @@ sub c_o {
my($self) = shift;
return '' unless $self->needs_linking();
my(@m);
-
+
my $command = '$(CCCMD)';
my $flags = '$(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE)';
-
+
if (my $cpp = $Config{cpprun}) {
my $cpp_cmd = $self->const_cccmd;
$cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
@@ -372,7 +373,7 @@ sub constants {
for my $macro (qw(
AR_STATIC_ARGS DIRFILESEP DFSEP
- NAME NAME_SYM
+ NAME NAME_SYM
VERSION VERSION_MACRO VERSION_SYM DEFINE_VERSION
XS_VERSION XS_VERSION_MACRO XS_DEFINE_VERSION
INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB
@@ -385,18 +386,18 @@ sub constants {
"DESTINSTALL".$_)
} $self->installvars),
qw(
- PERL_LIB
+ PERL_LIB
PERL_ARCHLIB
LIBPERL_A MYEXTLIB
- FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
- PERLMAINCC PERL_SRC PERL_INC
+ FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
+ PERLMAINCC PERL_SRC PERL_INC
PERL FULLPERL ABSPERL
PERLRUN FULLPERLRUN ABSPERLRUN
PERLRUNINST FULLPERLRUNINST ABSPERLRUNINST
PERL_CORE
PERM_DIR PERM_RW PERM_RWX
- ) )
+ ) )
{
next unless defined $self->{$macro};
@@ -423,7 +424,7 @@ MM_REVISION = $self->{MM_REVISION}
MAKE
FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
LDFROM LINKTYPE BOOTDEP
- / )
+ / )
{
next unless defined $self->{$macro};
push @m, "$macro = $self->{$macro}\n";
@@ -443,7 +444,7 @@ MAN3PODS = ".$self->wraplist(sort keys %{$self->{MAN3PODS}})."
push @m, q{
# Where is the Config information that we are using/depend on
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
-};
+} if -e File::Spec->catfile( $self->{PERL_INC}, 'config.h' );
push @m, qq{
@@ -471,7 +472,7 @@ PERL_ARCHIVE_AFTER = $self->{PERL_ARCHIVE_AFTER}
TO_INST_PM = ".$self->wraplist(sort keys %{$self->{PM}})."
-PM_TO_BLIB = ".$self->wraplist(%{$self->{PM}})."
+PM_TO_BLIB = ".$self->wraplist(map { ($_ => $self->{PM}->{$_}) } sort keys %{$self->{PM}})."
";
join('',@m);
@@ -533,18 +534,18 @@ Defines a lot of macros for distribution support.
COMPRESS compression command to gzip --best
use for tarfiles
- SUFFIX suffix to put on .gz
+ SUFFIX suffix to put on .gz
compressed files
SHAR shar command to use shar
PREOP extra commands to run before
- making the archive
+ making the archive
POSTOP extra commands to run after
making the archive
TO_UNIX a command to convert linefeeds
- to Unix style in your archive
+ to Unix style in your archive
CI command to checkin your ci -u
sources to version control
@@ -583,7 +584,6 @@ sub init_dist {
($self->{DISTNAME} = $self->{NAME}) =~ s{::}{-}g unless $self->{DISTNAME};
$self->{DISTVNAME} ||= $self->{DISTNAME}.'-'.$self->{VERSION};
-
}
=item dist (o)
@@ -601,7 +601,10 @@ sub dist {
my($self, %attribs) = @_;
my $make = '';
- foreach my $key (qw(
+ if ( $attribs{SUFFIX} && $attribs{SUFFIX} !~ m!^\.! ) {
+ $attribs{SUFFIX} = '.' . $attribs{SUFFIX};
+ }
+ foreach my $key (qw(
TAR TARFLAGS ZIP ZIPFLAGS COMPRESS SUFFIX SHAR
PREOP POSTOP TO_UNIX
CI RCS_LABEL DIST_CP DIST_DEFAULT
@@ -638,7 +641,7 @@ manifest :
$(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
veryclean : realclean
- $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
+ $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
MAKE_FRAG
@@ -674,7 +677,7 @@ sub dist_core {
my($self) = shift;
my $make_frag = '';
- foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile
+ foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile
shdist))
{
my $method = $target.'_target';
@@ -768,6 +771,7 @@ $(DISTVNAME).tar$(SUFFIX) : distdir
$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
$(RM_RF) $(DISTVNAME)
$(COMPRESS) $(DISTVNAME).tar
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)'
$(POSTOP)
MAKE_FRAG
}
@@ -790,6 +794,7 @@ $(DISTVNAME).zip : distdir
$(PREOP)
$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
$(RM_RF) $(DISTVNAME)
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).zip'
$(POSTOP)
MAKE_FRAG
}
@@ -808,6 +813,7 @@ sub uutardist_target {
return <<'MAKE_FRAG';
uutardist : $(DISTVNAME).tar$(SUFFIX)
uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu'
MAKE_FRAG
}
@@ -828,6 +834,7 @@ shdist : distdir
$(PREOP)
$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
$(RM_RF) $(DISTVNAME)
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar'
$(POSTOP)
MAKE_FRAG
}
@@ -860,7 +867,7 @@ BOOTSTRAP =
my $target = $Is{VMS} ? '$(MMS$TARGET)' : '$@';
- return sprintf <<'MAKE_FRAG', ($target) x 5;
+ return sprintf <<'MAKE_FRAG', ($target) x 2;
BOOTSTRAP = $(BASEEXT).bs
# As Mkbootstrap might not write a file (if none is required)
@@ -873,11 +880,6 @@ $(BOOTSTRAP) : $(FIRST_MAKEFILE) $(BOOTDEP) $(INST_ARCHAUTODIR)$(DFSEP).exists
-e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');"
$(NOECHO) $(TOUCH) %s
$(CHMOD) $(PERM_RW) %s
-
-$(INST_BOOT) : $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(NOECHO) $(RM_RF) %s
- - $(CP) $(BOOTSTRAP) %s
- $(CHMOD) $(PERM_RW) %s
MAKE_FRAG
}
@@ -909,7 +911,7 @@ OTHERLDFLAGS = '.$ld_opt.$otherldflags.'
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
INST_DYNAMIC_FIX = '.$ld_fix.'
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
');
if ($armaybe ne ':'){
$ldfrom = 'tmp$(LIB_EXT)';
@@ -919,7 +921,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
$ldfrom = "-all $ldfrom -none" if $Is{OSF};
# The IRIX linker doesn't use LD_RUN_PATH
- my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
+ my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
qq{-rpath "$self->{LD_RUN_PATH}"} : '';
# For example in AIX the shared objects/libraries from previous builds
@@ -932,7 +934,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
my $libs = '$(LDLOADLIBS)';
- if (($Is{NetBSD} || $Is{Interix}) && $Config{'useshrplib'} eq 'true') {
+ if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
# Use nothing on static perl platforms, and to the flags needed
# to link against the shared libperl library on shared perl
# platforms. We peek at lddlflags to see if we need -Wl,-R
@@ -941,6 +943,10 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
$libs .= ' -L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -Wl,-R$(PERL_ARCHLIB)/CORE -lperl';
} elsif ($Config{'lddlflags'} =~ /-R/) {
$libs .= ' -L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -R$(PERL_ARCHLIB)/CORE -lperl';
+ } elsif ( $Is{Android} ) {
+ # The Android linker will not recognize symbols from
+ # libperl unless the module explicitly depends on it.
+ $libs .= ' -L$(PERL_INC) -lperl';
}
}
@@ -957,6 +963,8 @@ MAKE
push @m, <<'MAKE';
$(CHMOD) $(PERM_RWX) $@
+ $(NOECHO) $(RM_RF) $(BOOTSTRAP)
+ - $(CP_NONEMPTY) $(BOOTSTRAP) $(INST_BOOT) $(PERM_RW)
MAKE
return join('',@m);
@@ -1025,7 +1033,7 @@ WARNING
my ($abs, $val);
if ($self->file_name_is_absolute($name)) { # /foo/bar
$abs = $name;
- } elsif ($self->canonpath($name) eq
+ } elsif ($self->canonpath($name) eq
$self->canonpath(basename($name))) { # foo
$abs = $self->catfile($dir, $name);
} else { # foo/bar
@@ -1036,8 +1044,6 @@ WARNING
print "Executing $abs\n" if ($trace >= 2);
my $version_check = qq{$abs -le "require $ver; print qq{VER_OK}"};
- $version_check = "$Config{run} $version_check"
- if defined $Config{run} and length $Config{run};
# To avoid using the unportable 2>&1 to suppress STDERR,
# we close it before running the command.
@@ -1087,7 +1093,7 @@ sub fixin { # stolen from the pink Camel book, more or less
open( my $fixin, '<', $file ) or croak "Can't process '$file': $!";
local $/ = "\n";
chomp( my $line = <$fixin> );
- next unless $line =~ s/^\s*\#!\s*//; # Not a shbang file.
+ next unless $line =~ s/^\s*\#!\s*//; # Not a shebang file.
my $shb = $self->_fixin_replace_shebang( $file, $line );
next unless defined $shb;
@@ -1162,7 +1168,7 @@ sub _fixin_replace_shebang {
my (@absdirs)
= reverse grep { $self->file_name_is_absolute($_) } $self->path;
$interpreter = '';
-
+
foreach my $dir (@absdirs) {
if ( $self->maybe_command($cmd) ) {
warn "Ignoring $interpreter in $file\n"
@@ -1173,7 +1179,7 @@ sub _fixin_replace_shebang {
}
# Figure out how to invoke interpreter on this machine.
-
+
my ($does_shbang) = $Config{'sharpbang'} =~ /^\s*\#\!/;
my ($shb) = "";
if ($interpreter) {
@@ -1263,7 +1269,7 @@ Called by init_main.
sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
my($self) = @_;
- my(%dir, %xs, %c, %h, %pl_files, %pm);
+ my(%dir, %xs, %c, %o, %h, %pl_files, %pm);
my %ignore = map {( $_ => 1 )} qw(Makefile.PL Build.PL test.pl t);
@@ -1271,10 +1277,21 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
$Is{VMS} ? $ignore{"$self->{DISTVNAME}.dir"} = 1
: $ignore{$self->{DISTVNAME}} = 1;
+ my $distprefix = $Is{VMS} ? qr/^\Q$self->{DISTNAME}\E-v?[\d\.]+\.dir$/i
+ : qr/^\Q$self->{DISTNAME}\E-v?[\d\.]+$/;
+
@ignore{map lc, keys %ignore} = values %ignore if $Is{VMS};
+ if ( defined $self->{XS} and !defined $self->{C} ) {
+ my @c_files = grep { m/\.c(pp|xx)?\z/i } values %{$self->{XS}};
+ my @o_files = grep { m/(?:.(?:o(?:bj)?)|\$\(OBJ_EXT\))\z/i } values %{$self->{XS}};
+ %c = map { $_ => 1 } @c_files;
+ %o = map { $_ => 1 } @o_files;
+ }
+
foreach my $name ($self->lsdir($Curdir)){
next if $name =~ /\#/;
+ next if $name =~ $distprefix && -d $name;
$name = lc($name) if $Is{VMS};
next if $name eq $Curdir or $name eq $Updir or $ignore{$name};
next unless $self->libscan($name);
@@ -1301,7 +1318,7 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
}
else {
- $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
+ $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
}
} elsif ($name =~ /\.(p[ml]|pod)\z/){
$pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
@@ -1316,7 +1333,8 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
$self->{PM} ||= \%pm;
my @o_files = @{$self->{C}};
- $self->{O_FILES} = [grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files];
+ %o = (%o, map { $_ => 1 } grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files);
+ $self->{O_FILES} = [sort keys %o];
}
@@ -1380,7 +1398,7 @@ sub init_MAN1PODS {
next unless $self->_has_pod($name);
$self->{MAN1PODS}->{$name} =
- $self->catfile("\$(INST_MAN1DIR)",
+ $self->catfile("\$(INST_MAN1DIR)",
basename($name).".\$(MAN1EXT)");
}
}
@@ -1412,7 +1430,7 @@ sub init_MAN3PODS {
my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
# Remove "Configure.pm" and similar, if it's not the only pod listed
- # To force inclusion, just name it "Configure.pod", or override
+ # To force inclusion, just name it "Configure.pod", or override
# MAN3PODS
foreach my $name (keys %manifypods) {
if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) {
@@ -1517,7 +1535,7 @@ sub init_PM {
my $striplibpath;
my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
- $prefix = $self->{INST_LIB}
+ $prefix = $self->{INST_LIB}
if ($striplibpath = $path) =~ s{^(\W*)($parentlibs_re)\W}
{$1}i;
@@ -1543,7 +1561,7 @@ sub init_DIRFILESEP {
$self->{DIRFILESEP} = '/';
}
-
+
=item init_main
@@ -1579,6 +1597,8 @@ sub init_main {
# Some systems have restrictions on files names for DLL's etc.
# mod2fname returns appropriate file base name (typically truncated)
# It may also edit @modparts if required.
+ # We require DynaLoader to make sure that mod2fname is loaded
+ eval { require DynaLoader };
if (defined &DynaLoader::mod2fname) {
$modfname = &DynaLoader::mod2fname(\@modparts);
}
@@ -1620,18 +1640,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 (
@@ -1688,7 +1699,18 @@ from the perl source tree.
EOP
}
}
- }
+ }
+ }
+
+ if ($Is{Android}) {
+ # Android fun times!
+ # ../../perl -I../../lib -MFile::Glob -e1 works
+ # ../../../perl -I../../../lib -MFile::Glob -e1 fails to find
+ # the .so for File::Glob.
+ # This always affects core perl, but may also affect an installed
+ # perl built with -Duserelocatableinc.
+ $self->{PERL_LIB} = File::Spec->rel2abs($self->{PERL_LIB});
+ $self->{PERL_ARCHLIB} = File::Spec->rel2abs($self->{PERL_ARCHLIB});
}
# We get SITELIBEXP and SITEARCHEXP directly via
@@ -1755,6 +1777,7 @@ sub init_tools {
$self->{RM_RF} ||= "rm -rf";
$self->{TOUCH} ||= "touch";
$self->{TEST_F} ||= "test -f";
+ $self->{TEST_S} ||= "test -s";
$self->{CP} ||= "cp";
$self->{MV} ||= "mv";
$self->{CHMOD} ||= "chmod";
@@ -1806,7 +1829,7 @@ sub init_lib2arch {
# architecture. If not we take it as a sign that it should be the
# same as the requested installation directory. Otherwise we take
# the found one.
- for my $libpair ({l=>"privlib", a=>"archlib"},
+ for my $libpair ({l=>"privlib", a=>"archlib"},
{l=>"sitelib", a=>"sitearch"},
{l=>"vendorlib", a=>"vendorarch"},
)
@@ -1820,7 +1843,7 @@ sub init_lib2arch {
$self->prefixify($Arch,$ilib,$self->{$Lib});
unless (-d $self->{$Arch}) {
- print "Directory $self->{$Arch} not found\n"
+ print "Directory $self->{$Arch} not found\n"
if $Verbose;
$self->{$Arch} = $self->{$Lib};
}
@@ -1854,15 +1877,15 @@ sub init_PERL {
my($self) = shift;
my @defpath = ();
- foreach my $component ($self->{PERL_SRC}, $self->path(),
- $Config{binexp})
+ foreach my $component ($self->{PERL_SRC}, $self->path(),
+ $Config{binexp})
{
push @defpath, $component if defined $component;
}
# Build up a set of file names (not command names).
my $thisperl = $self->canonpath($^X);
- $thisperl .= $Config{exe_ext} unless
+ $thisperl .= $Config{exe_ext} unless
# VMS might have a file version # at the end
$Is{VMS} ? $thisperl =~ m/$Config{exe_ext}(;\d+)?$/i
: $thisperl =~ m/$Config{exe_ext}$/i;
@@ -1872,9 +1895,9 @@ sub init_PERL {
my @perls = ($thisperl);
push @perls, map { "$_$Config{exe_ext}" }
- ('perl', 'perl5', "perl$Config{version}");
+ ("perl$Config{version}", 'perl5', 'perl');
- # miniperl has priority over all but the cannonical perl when in the
+ # miniperl has priority over all but the canonical perl when in the
# core. Otherwise its a last resort.
my $miniperl = "miniperl$Config{exe_ext}";
if( $self->{PERL_CORE} ) {
@@ -1891,13 +1914,13 @@ sub init_PERL {
# When built for debugging, VMS doesn't create perl.exe but ndbgperl.exe.
my $perl_name = 'perl';
- $perl_name = 'ndbgperl' if $Is{VMS} &&
+ $perl_name = 'ndbgperl' if $Is{VMS} &&
defined $Config{usevmsdebug} && $Config{usevmsdebug} eq 'define';
# XXX This logic is flawed. If "miniperl" is anywhere in the path
# it will get confused. It should be fixed to work only on the filename.
# Define 'FULLPERL' to be a non-miniperl (used in test: target)
- ($self->{FULLPERL} = $self->{PERL}) =~ s/miniperl/$perl_name/i
+ ($self->{FULLPERL} = $self->{PERL}) =~ s/\Q$miniperl\E$/$perl_name$Config{exe_ext}/i
unless $self->{FULLPERL};
# Little hack to get around VMS's find_perl putting "MCR" in front
@@ -1928,10 +1951,10 @@ sub init_PERL {
$self->{$run} = "\$($perl)";
# Make sure perl can find itself before it's installed.
- $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"}
+ $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"}
if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE};
- $self->{$perl.'RUNINST'} =
+ $self->{$perl.'RUNINST'} =
sprintf q{$(%sRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"}, $perl;
}
@@ -2003,18 +2026,18 @@ sub init_xs {
my $self = shift;
if ($self->has_link_code()) {
- $self->{INST_STATIC} =
+ $self->{INST_STATIC} =
$self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT)$(LIB_EXT)');
- $self->{INST_DYNAMIC} =
+ $self->{INST_DYNAMIC} =
$self->catfile('$(INST_ARCHAUTODIR)', '$(DLBASE).$(DLEXT)');
- $self->{INST_BOOT} =
+ $self->{INST_BOOT} =
$self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT).bs');
} else {
$self->{INST_STATIC} = '';
$self->{INST_DYNAMIC} = '';
$self->{INST_BOOT} = '';
}
-}
+}
=item install (o)
@@ -2053,9 +2076,15 @@ doc__install : doc_site_install
pure_perl_install :: all
$(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
+};
+
+ push @m,
+q{ read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
- $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+} unless $self->{NO_PACKLIST};
+
+ push @m,
+q{ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
$(INST_BIN) $(DESTINSTALLBIN) \
$(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
@@ -2067,9 +2096,14 @@ pure_perl_install :: all
pure_site_install :: all
$(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+};
+ push @m,
+q{ read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
- $(INST_LIB) $(DESTINSTALLSITELIB) \
+} unless $self->{NO_PACKLIST};
+
+ push @m,
+q{ $(INST_LIB) $(DESTINSTALLSITELIB) \
$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
$(INST_BIN) $(DESTINSTALLSITEBIN) \
$(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
@@ -2080,15 +2114,35 @@ pure_site_install :: all
pure_vendor_install :: all
$(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+};
+ push @m,
+q{ read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
- $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+} unless $self->{NO_PACKLIST};
+
+ push @m,
+q{ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
$(INST_BIN) $(DESTINSTALLVENDORBIN) \
$(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+};
+
+ push @m, q{
+doc_perl_install :: all
+ $(NOECHO) $(NOOP)
+
+doc_site_install :: all
+ $(NOECHO) $(NOOP)
+
+doc_vendor_install :: all
+ $(NOECHO) $(NOOP)
+
+} if $self->{NO_PERLLOCAL};
+
+ push @m, q{
doc_perl_install :: all
$(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
-$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
@@ -2122,7 +2176,7 @@ doc_vendor_install :: all
EXE_FILES "$(EXE_FILES)" \
>> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-};
+} unless $self->{NO_PERLLOCAL};
push @m, q{
uninstall :: uninstall_from_$(INSTALLDIRS)dirs
@@ -2332,7 +2386,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
# Skip perl's libraries.
return if m/^libperl/ or m/^perl\Q$self->{LIB_EXT}\E$/;
- # Skip purified versions of libraries
+ # Skip purified versions of libraries
# (e.g., DynaLoader_pure_p1_c0_032.a)
return if m/_pure_\w+_\w+_\w+\.\w+$/ and -f "$File::Find::dir/.pure";
@@ -2367,7 +2421,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
# don't include the installed version of this extension. I
# leave this line here, although it is not necessary anymore:
# I patched minimod.PL instead, so that Miniperl.pm won't
- # enclude duplicates
+ # include duplicates
# Once the patch to minimod.PL is in the distribution, I can
# drop it
@@ -2518,8 +2572,12 @@ $(OBJECT) : $(FIRST_MAKEFILE)
my $newer_than_target = $Is{VMS} ? '$(MMS$SOURCE_LIST)' : '$?';
my $mpl_args = join " ", map qq["$_"], @ARGV;
-
- $m .= sprintf <<'MAKE_FRAG', $newer_than_target, $mpl_args;
+ my $cross = '';
+ if (defined $::Cross::platform) {
+ # Inherited from win32/buildext.pl
+ $cross = "-MCross=$::Cross::platform ";
+ }
+ $m .= sprintf <<'MAKE_FRAG', $newer_than_target, $cross, $mpl_args;
# We take a very conservative approach here, but it's worth it.
# We move Makefile to Makefile.old here to avoid gnu make looping.
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
@@ -2528,7 +2586,7 @@ $(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
- $(PERLRUN) Makefile.PL %s
+ $(PERLRUN) %sMakefile.PL %s
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
$(FALSE)
@@ -2563,7 +2621,7 @@ sub needs_linking {
my($self) = shift;
my $caller = (caller(0))[3];
- confess("needs_linking called too early") if
+ confess("needs_linking called too early") if
$caller =~ /^ExtUtils::MakeMaker::/;
return $self->{NEEDS_LINKING} if defined $self->{NEEDS_LINKING};
if ($self->has_link_code or $self->{MAKEAPERL}){
@@ -2599,9 +2657,15 @@ sub parse_abstract {
$inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
next if !$inpod;
chop;
- next unless /^($package(?:\.pm)? \s+ -+ \s+)(.*)/x;
- $result = $2;
- last;
+ if ( /^($package(?:\.pm)? \s+ -+ \s+)(.*)/x ) {
+ $result = $2;
+ next;
+ }
+ next unless $result;
+ if ( $result && ( /^\s*$/ || /^\=/ ) ) {
+ last;
+ }
+ $result = join ' ', $result, $_;
}
close $fh;
@@ -2645,29 +2709,8 @@ sub parse_version {
local $^W = 0;
$result = $1;
}
- elsif ( m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* =}x ) {
- my $eval = qq{
- package ExtUtils::MakeMaker::_version;
- no strict;
- BEGIN { eval {
- # Ensure any version() routine which might have leaked
- # into this package has been deleted. Interferes with
- # version->import()
- undef *version;
- require version;
- "version"->import;
- } }
-
- local $1$2;
- \$$2=undef;
- do {
- $_
- };
- \$$2;
- };
- local $^W = 0;
- $result = eval($eval); ## no critic
- warn "Could not eval '$eval' in $parsefile: $@" if $@;
+ elsif ( m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* (?<![<>=!])\=[^=]}x ) {
+ $result = $self->get_version($parsefile, $1, $2);
}
else {
next;
@@ -2676,10 +2719,44 @@ sub parse_version {
}
close $fh;
+ if ( defined $result && $result !~ /^v?[\d_\.]+$/ ) {
+ require version;
+ my $normal = eval { version->parse( $result ) };
+ $result = $normal if defined $normal;
+ }
$result = "undef" unless defined $result;
return $result;
}
+sub get_version
+{
+ my ($self, $parsefile, $sigil, $name) = @_;
+ my $eval = qq{
+ package ExtUtils::MakeMaker::_version;
+ no strict;
+ BEGIN { eval {
+ # Ensure any version() routine which might have leaked
+ # into this package has been deleted. Interferes with
+ # version->import()
+ undef *version;
+ require version;
+ "version"->import;
+ } }
+
+ local $sigil$name;
+ \$$name=undef;
+ do {
+ $_
+ };
+ \$$name;
+ };
+ $eval = $1 if $eval =~ m{^(.+)}s;
+ local $^W = 0;
+ my $result = eval($eval); ## no critic
+ warn "Could not eval '$eval' in $parsefile: $@" if $@;
+ $result;
+}
+
=item pasthru (o)
@@ -2698,7 +2775,7 @@ sub pasthru {
foreach my $key (qw(LIB LIBPERL_A LINKTYPE OPTIMIZE
PREFIX INSTALL_BASE)
- )
+ )
{
next unless defined $self->{$key};
push @pasthru, "$key=\"\$($key)\"";
@@ -2785,7 +2862,8 @@ pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
pm_to_blib({\@ARGV}, '$autodir', q[\$(PM_FILTER)], '\$(PERM_DIR)')
CODE
- my @cmds = $self->split_command($pm_to_blib, %{$self->{PM}});
+ my @cmds = $self->split_command($pm_to_blib,
+ map { ($_, $self->{PM}->{$_}) } sort keys %{$self->{PM}});
$r .= join '', map { "\t\$(NOECHO) $_\n" } @cmds;
$r .= qq{\t\$(NOECHO) \$(TOUCH) pm_to_blib\n};
@@ -2907,11 +2985,22 @@ PPD_OUT
$self->{PPM_INSTALL_EXEC}, $self->{PPM_INSTALL_SCRIPT};
}
else {
- $ppd_xml .= sprintf qq{ <INSTALL>%s</INSTALL>\n},
+ $ppd_xml .= sprintf qq{ <INSTALL>%s</INSTALL>\n},
$self->{PPM_INSTALL_SCRIPT};
}
}
+ if ($self->{PPM_UNINSTALL_SCRIPT}) {
+ if ($self->{PPM_UNINSTALL_EXEC}) {
+ $ppd_xml .= sprintf qq{ <UNINSTALL EXEC="%s">%s</UNINSTALL>\n},
+ $self->{PPM_UNINSTALL_EXEC}, $self->{PPM_UNINSTALL_SCRIPT};
+ }
+ else {
+ $ppd_xml .= sprintf qq{ <UNINSTALL>%s</UNINSTALL>\n},
+ $self->{PPM_UNINSTALL_SCRIPT};
+ }
+ }
+
my ($bin_location) = $self->{BINARY_LOCATION} || '';
$bin_location =~ s/\\/\\\\/g;
@@ -2936,7 +3025,7 @@ PPD_OUT
$MM->prefixify($var, $prefix, $new_prefix, $default);
Using either $MM->{uc $var} || $Config{lc $var}, it will attempt to
-replace it's $prefix with a $new_prefix.
+replace it's $prefix with a $new_prefix.
Should the $prefix fail to match I<AND> a PREFIX was given as an
argument to WriteMakefile() it will set it to the $new_prefix +
@@ -2960,7 +3049,7 @@ simply use '/home/foo/man/man1'.
sub prefixify {
my($self,$var,$sprefix,$rprefix,$default) = @_;
- my $path = $self->{uc $var} ||
+ my $path = $self->{uc $var} ||
$Config_Override{lc $var} || $Config{lc $var} || '';
$rprefix .= '/' if $sprefix =~ m|/$|;
@@ -2969,7 +3058,7 @@ sub prefixify {
warn " from $sprefix to $rprefix\n" if $Verbose >= 2;
if( $self->{ARGS}{PREFIX} &&
- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
+ $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
{
warn " cannot prefix, using default.\n" if $Verbose >= 2;
@@ -3103,7 +3192,7 @@ sub oneliner {
$switches = join ' ', @$switches;
- return qq{\$(ABSPERLRUN) $switches -e $cmd --};
+ return qq{\$(ABSPERLRUN) $switches -e $cmd --};
}
@@ -3201,10 +3290,10 @@ END
$(CP) $(MYEXTLIB) $@
MAKE_FRAG
- my $ar;
+ my $ar;
if (exists $self->{FULL_AR} && -x $self->{FULL_AR}) {
# Prefer the absolute pathed ar if available so that PATH
- # doesn't confuse us. Perl itself is built with the full_ar.
+ # doesn't confuse us. Perl itself is built with the full_ar.
$ar = 'FULL_AR';
} else {
$ar = 'AR';
@@ -3274,7 +3363,7 @@ Helper subroutine for subdirs
sub subdir_x {
my($self, $subdir) = @_;
- my $subdir_cmd = $self->cd($subdir,
+ my $subdir_cmd = $self->cd($subdir,
'$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)'
);
return sprintf <<'EOT', $subdir_cmd;
@@ -3325,7 +3414,10 @@ sub test {
my($self, %attribs) = @_;
my $tests = $attribs{TESTS} || '';
- if (!$tests && -d 't') {
+ if (!$tests && -d 't' && defined $attribs{RECURSIVE_TEST_FILES}) {
+ $tests = $self->find_tests_recursive;
+ }
+ elsif (!$tests && -d 't') {
$tests = $self->find_tests;
}
# note: 'test.pl' name is also hardcoded in init_dirscan()
@@ -3361,14 +3453,14 @@ END
push(@m, "\n");
push(@m, "test_dynamic :: pure_all\n");
- push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)'))
+ push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)'))
if $tests;
- push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)'))
+ push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)'))
if -f "test.pl";
push(@m, "\n");
push(@m, "testdb_dynamic :: pure_all\n");
- push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)',
+ push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)',
'$(TEST_FILE)'));
push(@m, "\n");
@@ -3430,12 +3522,15 @@ sub tool_xsubpp {
# Make sure we pick up the new xsubpp if we're building perl.
unshift @xsubpp_dirs, $self->{PERL_LIB} if $self->{PERL_CORE};
+ my $foundxsubpp = 0;
foreach my $dir (@xsubpp_dirs) {
$xsdir = $self->catdir($dir, 'ExtUtils');
if( -r $self->catfile($xsdir, "xsubpp") ) {
+ $foundxsubpp = 1;
last;
}
}
+ die "ExtUtils::MM_Unix::tool_xsubpp : Can't find xsubpp" if !$foundxsubpp;
my $tmdir = File::Spec->catdir($self->{PERL_LIB},"ExtUtils");
my(@tmdeps) = $self->catfile($tmdir,'typemap');
@@ -3456,10 +3551,10 @@ sub tool_xsubpp {
}
if ($Is{VMS} &&
- $Config{'ldflags'} &&
+ $Config{'ldflags'} &&
$Config{'ldflags'} =~ m!/Debug!i &&
(!exists($self->{XSOPT}) || $self->{XSOPT} !~ /linenumbers/)
- )
+ )
{
unshift(@tmargs,'-nolinenumbers');
}
@@ -3474,7 +3569,7 @@ XSUBPPRUN = \$(PERLRUN) \$(XSUBPP)
XSPROTOARG = $self->{XSPROTOARG}
XSUBPPDEPS = @tmdeps \$(XSUBPP)
XSUBPPARGS = @tmargs
-XSUBPP_EXTRA_ARGS =
+XSUBPP_EXTRA_ARGS =
};
};
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
index f271ef79282..d2fabf6b282 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
@@ -18,7 +18,7 @@ our @Overridable;
my @Prepend_parent;
my %Recognized_Att_Keys;
-our $VERSION = '6.66';
+our $VERSION = '6.98';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
# Emulate something resembling CVS $Revision$
@@ -32,7 +32,7 @@ our @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists
&WriteEmptyMakefile);
-# These will go away once the last of the Win32 & VMS specific code is
+# These will go away once the last of the Win32 & VMS specific code is
# purged.
my $Is_VMS = $^O eq 'VMS';
my $Is_Win32 = $^O eq 'MSWin32';
@@ -54,7 +54,7 @@ sub WriteMakefile {
my %att = @_;
_convert_compat_attrs(\%att);
-
+
_verify_att(\%att);
my $mm = MM->new(\%att);
@@ -87,6 +87,7 @@ my %Special_Sigs = (
MAN3PODS => 'HASH',
META_ADD => 'HASH',
META_MERGE => 'HASH',
+ OBJECT => ['ARRAY', ''],
PL_FILES => 'HASH',
PM => 'HASH',
PMLIBDIRS => 'ARRAY',
@@ -168,7 +169,7 @@ sub _is_of_type {
sub _format_att {
my $given = shift;
-
+
return $given eq '' ? "string/number"
: uc $given eq $given ? "$given reference"
: "$given object"
@@ -178,7 +179,7 @@ sub _format_att {
sub prompt ($;$) { ## no critic
my($mess, $def) = @_;
- confess("prompt function called without an argument")
+ confess("prompt function called without an argument")
unless defined $mess;
my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;
@@ -197,7 +198,7 @@ sub prompt ($;$) { ## no critic
else {
$ans = <STDIN>;
if( defined $ans ) {
- chomp $ans;
+ $ans =~ s{\015?\012$}{};
}
else { # user hit ctrl-D
print "\n";
@@ -269,19 +270,19 @@ sub full_setup {
INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR
INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
- PERL_LIB PERL_ARCHLIB
- SITELIBEXP SITEARCHEXP
+ PERL_LIB PERL_ARCHLIB
+ SITELIBEXP SITEARCHEXP
INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE
LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES
- MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA
+ MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA NO_PACKLIST NO_PERLLOCAL
NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN
PERLRUNINST PERL_CORE
- PERL_SRC PERM_DIR PERM_RW PERM_RWX
- PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC
- PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
- SIGN SKIP TEST_REQUIRES TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
+ PERL_SRC PERM_DIR PERM_RW PERM_RWX MAGICXS
+ PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC PPM_UNINSTALL_EXEC
+ PPM_INSTALL_SCRIPT PPM_UNINSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
+ SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
@@ -300,11 +301,11 @@ sub full_setup {
# in Overridable we have subroutines that are used indirectly
- @MM_Sections =
+ @MM_Sections =
qw(
- post_initialize const_config constants platform_constants
- tool_autosplit tool_xsubpp tools_other
+ post_initialize const_config constants platform_constants
+ tool_autosplit tool_xsubpp tools_other
makemakerdflt
@@ -315,10 +316,10 @@ sub full_setup {
special_targets
c_o xs_c xs_o
- top_targets blibdirs linkext dlsyms dynamic dynamic_bs
+ top_targets blibdirs linkext dlsyms dynamic_bs dynamic
dynamic_lib static static_lib manifypods processPL
installbin subdirs
- clean_subdirs clean realclean_subdirs realclean
+ clean_subdirs clean realclean_subdirs realclean
metafile signature
dist_basics dist_core distdir dist_test dist_ci distmeta distsignature
install force perldepend makefile staticmake test ppd
@@ -329,7 +330,7 @@ sub full_setup {
push @Overridable, qw[
libscan makeaperl needs_linking
- subdir_x test_via_harness test_via_script
+ subdir_x test_via_harness test_via_script
init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan
init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker
@@ -349,10 +350,10 @@ sub full_setup {
@Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
# we will use all these variables in the Makefile
- @Get_from_Config =
+ @Get_from_Config =
qw(
- ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld
- lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib
+ ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld
+ lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib
sitelibexp sitearchexp so
);
@@ -440,14 +441,27 @@ sub new {
check_hints($self);
+ if ( defined $self->{MIN_PERL_VERSION}
+ && $self->{MIN_PERL_VERSION} !~ /^v?[\d_\.]+$/ ) {
+ require version;
+ my $normal = eval {
+ local $SIG{__WARN__} = sub {
+ # simulate "use warnings FATAL => 'all'" for vintage perls
+ die @_;
+ };
+ version->parse( $self->{MIN_PERL_VERSION} )
+ };
+ $self->{MIN_PERL_VERSION} = $normal if defined $normal && !$@;
+ }
+
# Translate X.Y.Z to X.00Y00Z
if( defined $self->{MIN_PERL_VERSION} ) {
- $self->{MIN_PERL_VERSION} =~ s{ ^ (\d+) \. (\d+) \. (\d+) $ }
+ $self->{MIN_PERL_VERSION} =~ s{ ^v? (\d+) \. (\d+) \. (\d+) $ }
{sprintf "%d.%03d%03d", $1, $2, $3}ex;
}
my $perl_version_ok = eval {
- local $SIG{__WARN__} = sub {
+ local $SIG{__WARN__} = sub {
# simulate "use warnings FATAL => 'all'" for vintage perls
die @_;
};
@@ -481,16 +495,30 @@ END
foreach my $prereq (sort keys %$prereqs) {
my $required_version = $prereqs->{$prereq};
- my $installed_file = MM->_installed_file_for_module($prereq);
my $pr_version = 0;
- $pr_version = MM->parse_version($installed_file) if $installed_file;
- $pr_version = 0 if $pr_version eq 'undef';
+ my $installed_file;
+
+ if ( $prereq eq 'perl' ) {
+ if ( defined $required_version && $required_version =~ /^v?[\d_\.]+$/
+ || $required_version !~ /^v?[\d_\.]+$/ ) {
+ require version;
+ my $normal = eval { version->parse( $required_version ) };
+ $required_version = $normal if defined $normal;
+ }
+ $installed_file = $prereq;
+ $pr_version = $];
+ }
+ else {
+ $installed_file = MM->_installed_file_for_module($prereq);
+ $pr_version = MM->parse_version($installed_file) if $installed_file;
+ $pr_version = 0 if $pr_version eq 'undef';
+ }
# convert X.Y_Z alpha version #s to X.YZ for easier comparisons
$pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
if (!$installed_file) {
- warn sprintf "Warning: prerequisite %s %s not found.\n",
+ warn sprintf "Warning: prerequisite %s %s not found.\n",
$prereq, $required_version
unless $self->{PREREQ_FATAL}
or $ENV{PERL_CORE};
@@ -499,7 +527,7 @@ END
}
elsif ($pr_version < $required_version ){
warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
- $prereq, $required_version, ($pr_version || 'unknown version')
+ $prereq, $required_version, ($pr_version || 'unknown version')
unless $self->{PREREQ_FATAL}
or $ENV{PERL_CORE};
@@ -508,7 +536,7 @@ END
}
if (%unsatisfied && $self->{PREREQ_FATAL}){
- my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
+ my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
sort { $a cmp $b } keys %unsatisfied;
die <<"END";
MakeMaker FATAL: prerequisites not found.
@@ -517,7 +545,7 @@ $failedprereqs
Please install these modules first and rerun 'perl Makefile.PL'.
END
}
-
+
if (defined $self->{CONFIGURE}) {
if (ref $self->{CONFIGURE} eq 'CODE') {
%configure_att = %{&{$self->{CONFIGURE}}};
@@ -574,7 +602,7 @@ END
}
if ($self->{PARENT}) {
$self->{PARENT}->{CHILDREN}->{$newclass} = $self;
- foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE)) {
+ foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE LD OPTIMIZE)) {
if (exists $self->{PARENT}->{$opt}
and not exists $self->{$opt})
{
@@ -585,13 +613,28 @@ END
}
my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
parse_args($self,@fm) if @fm;
- } else {
- parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
+ }
+ else {
+ parse_args($self, _shellwords($ENV{PERL_MM_OPT} || ''),@ARGV);
}
+ # RT#91540 PREREQ_FATAL not recognized on command line
+ if (%unsatisfied && $self->{PREREQ_FATAL}){
+ my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
+ sort { $a cmp $b } keys %unsatisfied;
+ die <<"END";
+MakeMaker FATAL: prerequisites not found.
+$failedprereqs
+
+Please install these modules first and rerun 'perl Makefile.PL'.
+END
+ }
$self->{NAME} ||= $self->guess_name;
+ warn "Warning: NAME must be a package name\n"
+ unless $self->{NAME} =~ m!^[A-Z_a-z][0-9A-Z_a-z]*(?:::[0-9A-Z_a-z]+)*$!;
+
($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
$self->init_MAKE;
@@ -799,6 +842,83 @@ END
return @result;
}
+# _shellwords and _parseline borrowed from Text::ParseWords
+sub _shellwords {
+ my (@lines) = @_;
+ my @allwords;
+
+ foreach my $line (@lines) {
+ $line =~ s/^\s+//;
+ my @words = _parse_line('\s+', 0, $line);
+ pop @words if (@words and !defined $words[-1]);
+ return() unless (@words || !length($line));
+ push(@allwords, @words);
+ }
+ return(@allwords);
+}
+
+sub _parse_line {
+ my($delimiter, $keep, $line) = @_;
+ my($word, @pieces);
+
+ no warnings 'uninitialized'; # we will be testing undef strings
+
+ while (length($line)) {
+ # This pattern is optimised to be stack conservative on older perls.
+ # Do not refactor without being careful and testing it on very long strings.
+ # See Perl bug #42980 for an example of a stack busting input.
+ $line =~ s/^
+ (?:
+ # double quoted string
+ (") # $quote
+ ((?>[^\\"]*(?:\\.[^\\"]*)*))" # $quoted
+ | # --OR--
+ # singe quoted string
+ (') # $quote
+ ((?>[^\\']*(?:\\.[^\\']*)*))' # $quoted
+ | # --OR--
+ # unquoted string
+ ( # $unquoted
+ (?:\\.|[^\\"'])*?
+ )
+ # followed by
+ ( # $delim
+ \Z(?!\n) # EOL
+ | # --OR--
+ (?-x:$delimiter) # delimiter
+ | # --OR--
+ (?!^)(?=["']) # a quote
+ )
+ )//xs or return; # extended layout
+ my ($quote, $quoted, $unquoted, $delim) = (($1 ? ($1,$2) : ($3,$4)), $5, $6);
+
+
+ return() unless( defined($quote) || length($unquoted) || length($delim));
+
+ if ($keep) {
+ $quoted = "$quote$quoted$quote";
+ }
+ else {
+ $unquoted =~ s/\\(.)/$1/sg;
+ if (defined $quote) {
+ $quoted =~ s/\\(.)/$1/sg if ($quote eq '"');
+ #$quoted =~ s/\\([\\'])/$1/g if ( $PERL_SINGLE_QUOTE && $quote eq "'");
+ }
+ }
+ $word .= substr($line, 0, 0); # leave results tainted
+ $word .= defined $quote ? $quoted : $unquoted;
+
+ if (length($delim)) {
+ push(@pieces, $word);
+ push(@pieces, $delim) if ($keep eq 'delimiters');
+ undef $word;
+ }
+ if (!length($line)) {
+ push(@pieces, $word);
+ }
+ }
+ return(@pieces);
+}
sub check_manifest {
print "Checking if your kit is complete...\n";
@@ -941,9 +1061,9 @@ sub mv_all_methods {
# still trying to reduce the list to some reasonable minimum --
# because I want to make it easier for the user. A.K.
- local $SIG{__WARN__} = sub {
+ local $SIG{__WARN__} = sub {
# can't use 'no warnings redefined', 5.6 only
- warn @_ unless $_[0] =~ /^Subroutine .* redefined/
+ warn @_ unless $_[0] =~ /^Subroutine .* redefined/
};
foreach my $method (@Overridable) {
@@ -978,7 +1098,7 @@ sub mv_all_methods {
# We have to clean out %INC also, because the current directory is
# changed frequently and Graham Barr prefers to get his version
- # out of a History.pl file which is "required" so woudn't get
+ # out of a History.pl file which is "required" so wouldn't get
# loaded again in another extension requiring a History.pl
# With perl5.002_01 the deletion of entries in %INC caused Tk-b11
@@ -1023,7 +1143,20 @@ sub skipcheck {
sub flush {
my $self = shift;
+ # This needs a bit more work for more wacky OSen
+ my $type = 'Unix-style';
+ if ( $self->os_flavor_is('Win32') ) {
+ my $make = $self->make;
+ $make = +( File::Spec->splitpath( $make ) )[-1];
+ $make =~ s!\.exe$!!i;
+ $type = $make . '-style';
+ }
+ elsif ( $Is_VMS ) {
+ $type = $Config{make} . '-style';
+ }
+
my $finalname = $self->{MAKEFILE};
+ print "Generating a $type $finalname\n";
print "Writing $finalname for $self->{NAME}\n";
unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ());
@@ -1127,7 +1260,7 @@ sub clean_versions {
for my $module (keys %$reqs) {
my $version = $reqs->{$module};
- if( !defined $version or $version !~ /^[\d_\.]+$/ ) {
+ if( !defined $version or $version !~ /^v?[\d_\.]+$/ ) {
carp "Unparsable version '$version' for prerequisite $module";
$reqs->{$module} = 0;
}
@@ -1237,6 +1370,11 @@ C<TEST_VERBOSE> variable to true.
make test TEST_VERBOSE=1
+If you want to run particular test files, set the C<TEST_FILES> variable.
+It is possible to use globbing with this mechanism.
+
+ make test TEST_FILES='t/foobar.t t/dagobah*.t'
+
=head2 make testdb
A useful variation of the above is the target C<testdb>. It runs the
@@ -1291,7 +1429,7 @@ searched by perl, run
perl -le 'print join $/, @INC'
Sometimes older versions of the module you're installing live in other
-directories in @INC. Because Perl loads the first version of a module it
+directories in @INC. Because Perl loads the first version of a module it
finds, not the newest, you might accidentally get one of these older
versions even after installing a brand new version. To delete I<all other
versions of the module you're installing> (not simply older ones) set the
@@ -1379,8 +1517,8 @@ relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB,
INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
the best:
- perl Makefile.PL;
- make;
+ perl Makefile.PL;
+ make;
make test
make install
@@ -1520,7 +1658,11 @@ recommends it (or you know what you're doing).
=head2 Using Attributes and Parameters
The following attributes may be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line.
+or as NAME=VALUE pairs on the command line. Attributes that became
+available with later versions of MakeMaker are indicated.
+
+In order to maintain portability of attributes with older versions of
+MakeMaker you may want to use L<App::EUMM::Upgrade> with your C<Makefile.PL>.
=over 2
@@ -1553,10 +1695,13 @@ located in the C<x86> directory relative to the PPD itself.
=item BUILD_REQUIRES
+Available in version 6.5503 and above.
+
A hash of modules that are needed to build your module but not run it.
-This will go into the C<build_requires> field of your CPAN Meta file.
-(F<META.yml> or F<META.json>).
+This will go into the C<build_requires> field of your F<META.yml> and the C<build> of the C<prereqs> field of your F<META.json>.
+
+Defaults to C<<< { "ExtUtils::MakeMaker" => 0 } >>> if this attribute is not specified.
The format is the same as PREREQ_PM.
@@ -1600,13 +1745,14 @@ be determined by some evaluation method.
=item CONFIGURE_REQUIRES
+Available in version 6.52 and above.
+
A hash of modules that are required to run Makefile.PL itself, but not
to run your distribution.
-This will go into the C<configure_requires> field of your CPAN Meta file
-(F<META.yml> or F<META.json>)
+This will go into the C<configure_requires> field of your F<META.yml> and the C<configure> of the C<prereqs> field of your F<META.json>.
-Defaults to C<<< { "ExtUtils::MakeMaker" => 0 } >>>
+Defaults to C<<< { "ExtUtils::MakeMaker" => 0 } >>> if this attribute is not specified.
The format is the same as PREREQ_PM.
@@ -1633,7 +1779,7 @@ in ext/SDBM_File
=item DISTNAME
-A safe filename for the package.
+A safe filename for the package.
Defaults to NAME below but with :: replaced with -.
@@ -1652,6 +1798,18 @@ For example, version 1.04 of Foo::Bar becomes Foo-Bar-1.04.
On some OS's where . has special meaning VERSION_SYM may be used in
place of VERSION.
+=item DLEXT
+
+Specifies the extension of the module's loadable object. For example:
+
+ DLEXT => 'unusual_ext', # Default value is $Config{so}
+
+NOTE: When using this option to alter the extension of a module's
+loadable object, it is also necessary that the module's pm file
+specifies the same change:
+
+ local $DynaLoader::dl_dlext = 'unusual_ext';
+
=item DL_FUNCS
Hashref of symbol names for routines to be made available as universal
@@ -1812,7 +1970,7 @@ directory if INSTALLDIRS is set to site (default).
=item INSTALLSITEMAN3DIR
These directories get the man pages at 'make install' time if
-INSTALLDIRS=site (default). Defaults to
+INSTALLDIRS=site (default). Defaults to
$(SITEPREFIX)/man/man$(MAN*EXT).
If set to 'none', no man pages will be installed.
@@ -1936,10 +2094,12 @@ MakeMaker will turn it into an array with one element.
=item LICENSE
-The licensing terms of your distribution. Generally it's "perl" for the
+Available in version 6.31 and above.
+
+The licensing terms of your distribution. Generally it's "perl_5" for the
same license as Perl itself.
-See L<Module::Build::API> for the list of options.
+See L<CPAN::Meta::Spec> for the list of options.
Defaults to "unknown".
@@ -1949,6 +2109,10 @@ Defaults to "unknown".
config.sh). Should only be used to force static linking (also see
linkext below).
+=item MAGICXS
+
+When this is set to C<1>, C<OBJECT> will be automagically derived from C<XS>.
+
=item MAKE
Variant of make you intend to run the generated Makefile with. This
@@ -2019,6 +2183,8 @@ may hold a name for that binary. Defaults to perl
=item META_MERGE
+Available in version 6.46 and above.
+
A hashref of items to add to the CPAN Meta file (F<META.yml> or
F<META.json>).
@@ -2029,8 +2195,30 @@ own. META_MERGE will merge its value with the default.
Unless you want to override the defaults, prefer META_MERGE so as to
get the advantage of any future defaults.
+By default CPAN Meta specification C<1.4> is used. In order to use
+CPAN Meta specification C<2.0>, indicate with C<meta-spec> the version
+you want to use.
+
+ META_MERGE => {
+
+ "meta-spec" => { version => 2 },
+
+ resources => {
+
+ repository => {
+ type => 'git',
+ url => 'git://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker.git',
+ web => 'https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker',
+ },
+
+ },
+
+ },
+
=item MIN_PERL_VERSION
+Available in version 6.48 and above.
+
The minimum required version of Perl for this distribution.
Either the 5.006001 or the 5.6.1 format is acceptable.
@@ -2089,6 +2277,18 @@ meta-data files during 'perl Makefile.PL'.
Defaults to false.
+=item NO_PACKLIST
+
+When true, suppresses the writing of C<packlist> files for installs.
+
+Defaults to false.
+
+=item NO_PERLLOCAL
+
+When true, suppresses the appending of installations to C<perllocal>.
+
+Defaults to false.
+
=item NO_VC
In general, any generated Makefile checks for the current version of
@@ -2099,8 +2299,8 @@ Makefile.PL, use it interactively instead.
=item OBJECT
List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
-string containing all object files, e.g. "tkpBind.o
-tkpButton.o tkpCanvas.o"
+string or an array containing all object files, e.g. "tkpBind.o
+tkpButton.o tkpCanvas.o" or ["tkpBind.o", "tkpButton.o", "tkpCanvas.o"]
(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.)
@@ -2245,7 +2445,7 @@ is there for backwards compatibility (and it's somewhat DWIM).
Hashref of .pm files and *.pl files to be installed. e.g.
- {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
+ {'name_of_file.pm' => '$(INST_LIB)/install_as.pm'}
By default this will include *.pm and *.pl and the files found in
the PMLIBDIRS directories. Defining PM in the
@@ -2305,6 +2505,15 @@ Name of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl)
Name of the script that gets executed by the Perl Package Manager after
the installation of a package.
+=item PPM_UNINSTALL_EXEC
+
+Name of the executable used to run C<PPM_UNINSTALL_SCRIPT> below. (e.g. perl)
+
+=item PPM_UNINSTALL_SCRIPT
+
+Name of the script that gets executed by the Perl Package Manager before
+the removal of a package.
+
=item PREFIX
This overrides all the default install locations. Man pages,
@@ -2325,6 +2534,9 @@ will C<die> instead of simply informing the user of the missing dependencies.
It is I<extremely> rare to have to use C<PREREQ_FATAL>. Its use by module
authors is I<strongly discouraged> and should never be used lightly.
+For dependencies that are required in order to run C<Makefile.PL>,
+see C<CONFIGURE_REQUIRES>.
+
Module installation tools have ways of resolving unmet dependencies but
to do that they need a F<Makefile>. Using C<PREREQ_FATAL> breaks this.
That's bad.
@@ -2342,8 +2554,7 @@ A hash of modules that are needed to run your module. The keys are
the module names ie. Test::More, and the minimum version is the
value. If the required version number is 0 any version will do.
-This will go into the C<requires> field of your CPAN Meta file
-(F<META.yml> or F<META.json>).
+This will go into the C<requires> field of your F<META.yml> and the C<runtime> of the C<prereqs> field of your F<META.json>.
PREREQ_PM => {
# Require Test::More at least 0.47
@@ -2412,11 +2623,12 @@ if you really need it.
=item TEST_REQUIRES
+Available in version 6.64 and above.
+
A hash of modules that are needed to test your module but not run or
build it.
-This will go into the C<test_requires> field of your CPAN Meta file.
-(F<META.yml> or F<META.json>).
+This will go into the C<build_requires> field of your F<META.yml> and the C<test> of the C<prereqs> field of your F<META.json>.
The format is the same as PREREQ_PM.
@@ -2470,6 +2682,8 @@ but these will fail:
local $VERSION = '1.02';
local $FOO::VERSION = '1.30';
+(Putting C<my> or C<local> on the preceding line will work o.k.)
+
"Version strings" are incompatible and should not be used.
# Bad
@@ -2478,14 +2692,12 @@ but these will fail:
L<version> objects are fine. As of MakeMaker 6.35 version.pm will be
automatically loaded, but you must declare the dependency on version.pm.
-For compatibility with older MakeMaker you should load on the same line
+For compatibility with older MakeMaker you should load on the same line
as $VERSION is declared.
# All on one line
use version; our $VERSION = qv(1.2.3);
-(Putting C<my> or C<local> on the preceding line will work o.k.)
-
The file named in VERSION_FROM is not added as a dependency to
Makefile. This is not really correct, but it would be a major pain
during development to have to rewrite the Makefile for any smallish
@@ -2519,8 +2731,9 @@ that purpose.
=item XSPROTOARG
-May be set to an empty string, which is identical to C<-prototypes>, or
-C<-noprototypes>. See the xsubpp documentation for details. MakeMaker
+May be set to C<-protoypes>, C<-noprototypes> or the empty string. The
+empty string is equivalent to the xsubpp default, or C<-noprototypes>.
+See the xsubpp documentation for details. MakeMaker
defaults to the empty string.
=item XS_VERSION
@@ -2591,8 +2804,16 @@ Anything put here will be passed to MY::postamble() if you have one.
=item test
+Specify the targets for testing.
+
{TESTS => 't/*.t'}
+C<RECURSIVE_TEST_FILES> can be used to include all directories
+recursively under C<t> that contain C<.t> files. It will be ignored if
+you provide your own C<TESTS> attribute, defaults to false.
+
+ {RECURSIVE_TEST_FILES=>1}
+
=item tool_autosplit
{MAXLEN => 8}
@@ -2707,6 +2928,11 @@ does a realclean first and then the distcheck. Note that this is not
needed to build a new distribution as long as you are sure that the
MANIFEST file is ok.
+=item make veryclean
+
+does a realclean first and then removes backup files such as C<*~>,
+C<*.bak>, C<*.old> and C<*.orig>
+
=item make manifest
rewrites the MANIFEST file, adding all remaining files found (See
@@ -2860,7 +3086,7 @@ function returns the $value selected by the user.
If C<prompt()> detects that it is not running interactively and there
is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable
is set to true, the $default will be used without prompting. This
-prevents automated processes from blocking on user input.
+prevents automated processes from blocking on user input.
If no $default is provided an empty string will be used instead.
@@ -2874,9 +3100,11 @@ If no $default is provided an empty string will be used instead.
=item PERL_MM_OPT
Command line options used by C<MakeMaker-E<gt>new()>, and thus by
-C<WriteMakefile()>. The string is split on whitespace, and the result
+C<WriteMakefile()>. The string is split as the shell would, and the result
is processed before any actual command line arguments are processed.
+ PERL_MM_OPT='CCFLAGS="-Wl,-rpath -Wl,/foo/bar/lib" LIBS="-lwibble -lwobble"'
+
=item PERL_MM_USE_DEFAULT
If set to a true value then MakeMaker's prompt function will
@@ -2916,13 +3144,13 @@ Send patches and ideas to C<makemaker@perl.org>.
Send bug reports via http://rt.cpan.org/. Please send your
generated Makefile along with your report.
-For more up-to-date information, see L<http://www.makemaker.org>.
+For more up-to-date information, see L<https://metacpan.org/release/ExtUtils-MakeMaker>.
Repository available at L<https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker>.
=head1 LICENSE
-This program is free software; you can redistribute it and/or
+This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See L<http://www.perl.com/perl/misc/Artistic.html>
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
index 871eeded2ad..e5acb6a0706 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod
@@ -1,6 +1,6 @@
package ExtUtils::MakeMaker::FAQ;
-our $VERSION = '6.66';
+our $VERSION = '6.98';
1;
__END__
@@ -184,9 +184,12 @@ Its primary advantages are:
=back
-Module::Build is the official heir apparent to MakeMaker and we
-encourage people to work on M::B rather than spending time adding features
-to MakeMaker.
+Module::Build was long the official heir apparent to MakeMaker. The rate of
+both its development and adoption has slowed in recent years, though, and it is
+unclear what the future holds for it. That said, Module::Build set the stage
+for I<something> to become the heir to MakeMaker. MakeMaker's maintainers have
+long said that it is a dead end and should be kept functioning, but not
+extended with new features. It's complicated enough as it is!
=back
@@ -261,9 +264,9 @@ to delete the files. But you have to be careful. Here's a script to
do that. Use at your own risk. Have fun blowing holes in your foot.
#!/usr/bin/perl -w
-
+
use strict;
-
+
use File::Spec;
use File::Find;
use ExtUtils::Manifest qw(maniread);
@@ -295,7 +298,7 @@ do that. Use at your own risk. Have fun blowing holes in your foot.
=item Which tar should I use on Windows?
-We recommend ptar from Archive::Tar not older than 1.66 with '-C' option.
+We recommend ptar from Archive::Tar not older than 1.66 with '-C' option.
=item Which zip should I use on Windows for '[nd]make zipdist'?