1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
#!perl
use strict;
use warnings;
use ExtUtils::MakeMaker;
# This is a list of known backend libraries and the version number when these
# libraries became subclasses of Math::BigInt::Lib. New library methods are
# added to Math::BigInt::Lib first. Later, optimized versions are implemented
# for the specific libraries. In the meantime, these new methods won't be
# available to libraries that aren't a subclass of Math::BigInt::Lib.
my $recommend_versions =
{
'Math::BigInt::Calc' => '1.999800',
'Math::BigInt::FastCalc' => '0.5000',
'Math::BigInt::GMP' => '1.6000',
'Math::BigInt::Pari' => '1.3000',
'Math::BigInt::BitVect' => '1.13',
#'Math::BigInt::GMPz' => '0.001',
};
my $recommend_update = [];
while (my ($module, $recommend_version) = each %$recommend_versions) {
next unless eval "require $module";
my $version = $module -> VERSION();
next if $version >= $recommend_version;
push @$recommend_update, [ $module, $recommend_version, $version ];
}
if (@$recommend_update) {
print <<"EOF";
##########################################################################
#
# Some of the new methods will not work unless the following installed
# modules are updated. It is therefore recommended that the modules listed
# below are upgraded after installing this distribution.
#
# Module Recommended Installed
# ------ ----------- ---------
EOF
for my $entry (@$recommend_update) {
printf "# %-30s %-14s %s\n", @$entry;
}
print <<"EOF";
#
##########################################################################
Sleeping for a few seconds ...
EOF
sleep 5;
}
my %WriteMakefileArgs =
(
'NAME' => 'Math::BigInt',
'VERSION_FROM' => 'lib/Math/BigInt.pm',
'AUTHOR' => 'Peter John Acklam <pjacklam@gmail.com>',
'MIN_PERL_VERSION' => 5.006001,
# A hash of modules that are required to run Makefile.PL itself, but not to
# run the distribution.
'CONFIGURE_REQUIRES' => {
'ExtUtils::MakeMaker' => 6.58,
},
# A hash of modules that are needed to build the module but not run it.
'BUILD_REQUIRES' => {},
# A hash of modules that are needed to run the module.
'PREREQ_PM' => {
'Math::Complex' => 1.39,
},
# A hash of modules that are needed to test the module but not run or build
# it.
'TEST_REQUIRES' => {
'Test::More' => 0.94,
},
'LICENSE' => 'perl_5',
'LIBS' => [''], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
'INC' => '', # e.g., '-I/usr/include/other'
'SIGN' => 1,
'META_MERGE' => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'https://github.com/pjacklam/p5-Math-BigInt.git',
web => 'https://github.com/pjacklam/p5-Math-BigInt',
},
},
},
);
# Install over the core version? (Cf. CPAN RT #119199 and #119225.)
$WriteMakefileArgs{INSTALLDIRS} = 'perl'
if $] < 5.012;
WriteMakefile(%WriteMakefileArgs);
|