[SCM] Debian packaging of libmath-bigint-gmp-perl branch, master, updated. debian/1.36-2-6-ge5d7327

Alessandro Ghedini al3xbio at gmail.com
Mon Sep 5 10:10:22 UTC 2011


The following commit has been merged in the master branch:
commit b71308c7e03c8b13e188555a73371e8a9b55c266
Author: Alessandro Ghedini <al3xbio at gmail.com>
Date:   Mon Sep 5 11:42:19 2011 +0200

    Imported Upstream version 1.37

diff --git a/CHANGES b/CHANGES
index 580f516..cb9dd83 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,18 @@
 Revision history for Perl extension Math::BigInt::GMP.
 
+2011-09-04 v1.37 pjacklam
+  * Updated test files from the Math::BigInt distribution (Peter John Acklam).
+  * Updated bundled Devel::CheckLib from v0.92 to v0.93 (Peter John Acklam).
+  * Math::BigInt::GMP now requires Math::BigInt v1.997 (Peter John Acklam).
+  * Include "^MYMETA\.(yml|json)\z" in MANIFEST.SKIP. Whereas META.* are
+    generated by the distribution author at packaging time, MYMETA.* are
+    generated by the end user at configure time after any dynamic dependencies
+    are known. (Peter John Acklam)
+  * Changed Makefile.PL so that a "make dist" makes a META.yml and META.json.
+    (Peter John Acklam)
+  * Updated common test files from the Math::BigInt distribution. (Peter John
+    Acklam)
+
 2011-02-26 v1.36 pjacklam (6362 tests)
   * Change bigintpm.inc to reflect recent changes in the Math::BigInt
     distribution (Peter John Acklam).
diff --git a/MANIFEST b/MANIFEST
index c468b1b..0c17acb 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -12,7 +12,6 @@ LICENSE
 Makefile.PL
 MANIFEST			This list of files
 MANIFEST.SKIP
-META.yml
 README
 t/00sig.t
 t/01load.t
@@ -29,4 +28,6 @@ t/storable.t
 t/threads.t
 TODO
 typemap
+META.yml                                 Module YAML meta-data (added by MakeMaker)
+META.json                                Module JSON meta-data (added by MakeMaker)
 SIGNATURE                                Public-key signature (added by MakeMaker)
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
index f630e8f..1b7bc85 100644
--- a/MANIFEST.SKIP
+++ b/MANIFEST.SKIP
@@ -5,6 +5,6 @@
 ^Makefile\z
 ^Makefile.(old|bak)\z
 .*\.patch\z
-^MYMETA\.yml\z
+^MYMETA\.(yml|json)\z
 pm_to_blib
 \.git
diff --git a/META.json b/META.json
new file mode 100644
index 0000000..52038a1
--- /dev/null
+++ b/META.json
@@ -0,0 +1,42 @@
+{
+   "abstract" : "Use the GMP library for Math::BigInt routines",
+   "author" : [
+      "Tels"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "Math-BigInt-GMP",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : 0
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : 0
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Math::BigInt" : "1.997",
+            "XSLoader" : "0.02"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "version" : "1.37"
+}
diff --git a/META.yml b/META.yml
index 5447e0f..3cdab9f 100644
--- a/META.yml
+++ b/META.yml
@@ -1,12 +1,23 @@
 ---
-name: Math-BigInt-GMP
-author: Tels
-version: 1.36
-version_from: lib/Math/BigInt/GMP.pm
+abstract: 'Use the GMP library for Math::BigInt routines'
+author:
+  - Tels
+build_requires:
+  ExtUtils::MakeMaker: 0
+configure_requires:
+  ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150'
 license: perl
-distribution_type: module
-generated_by: Math-BigInt-GMP version 1.36
-installdirs: site
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: Math-BigInt-GMP
+no_index:
+  directory:
+    - t
+    - inc
 requires:
-  Math::BigInt: 1.993
+  Math::BigInt: 1.997
   XSLoader: 0.02
+version: 1.37
diff --git a/Makefile.PL b/Makefile.PL
index 885f1f9..0b9cc31 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -14,45 +14,20 @@ if (($Config::Config{'osname'} eq 'darwin') &! (join (' ', @ARGV) =~ /LDDLFLAGS/
   push @ARGV, sprintf "LDDLFLAGS=%s -read_only_relocs suppress", $Config::Config{'lddlflags'};
   }
 
-sub MY::metafile {
-  package MY;
-  my $self = shift;
-  if (!eval { require YAML; 1 })
-    {
-    warn ("YAML not installed, make dist will not override metafile");
-    return $self->SUPER::metafile_target(@_);
-    }
-
-  require YAML::Node;
-  my $node = new YAML::Node {};
-
-  $node->{name}                 = $self->{DISTNAME};
-  $node->{author}               = 'Tels';
-  $node->{version}              = $self->{VERSION};
-  $node->{version_from}         = $self->{VERSION_FROM};
-  $node->{license}              = 'perl';
-  $node->{distribution_type}    = 'module';
-  $node->{generated_by}         = "$self->{DISTNAME} version $self->{VERSION}";
-  $node->{installdirs}          = 'site';
-  $node->{requires}             = $self->{PREREQ_PM};
-
-  my $dump = YAML::Dump( $node );
-
-  $dump =~ s/^(.*)$/\t\$(NOECHO) \$(ECHO) "$1" >>META.yml/gm;
-  $dump =~ s/>>META\.yml/>META.yml/;
-
-  "metafile:\n$dump";
-  }
-
 check_lib_or_exit(lib => 'gmp', header => 'gmp.h', @ARGV);
 
-WriteMakefile(
-    'NAME'              => 'Math::BigInt::GMP',
-    'VERSION_FROM'      => 'lib/Math/BigInt/GMP.pm',
-    'PREREQ_PM'         => {
-                                Math::BigInt => 1.993,
-                                XSLoader => 0.02,
-                           },
-    'LIBS'              => ['-lgmp'],
-    'SIGN' => 1,
-);
+WriteMakefile
+  (
+   'NAME'              => 'Math::BigInt::GMP',
+   'AUTHOR'            => 'Tels',
+   'VERSION_FROM'      => 'lib/Math/BigInt/GMP.pm',
+   'LICENSE'           => 'perl',
+   'INSTALLDIRS'       => 'site',
+   'ABSTRACT_FROM'     => 'lib/Math/BigInt/GMP.pm',
+   'PREREQ_PM'         => {
+                           Math::BigInt => 1.997,
+                           XSLoader => 0.02,
+                          },
+   'LIBS'              => ['-lgmp'],
+   'SIGN' => 1,
+  );
diff --git a/SIGNATURE b/SIGNATURE
index b1ac20b..24c007c 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.66.
+signed via the Module::Signature module, version 0.68.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -15,31 +15,32 @@ not run its Makefile.PL or Build.PL.
 Hash: SHA1
 
 SHA1 70d6187d0152848c922dc4360fa6dd3a3dc35c62 BUGS
-SHA1 684bfb3d30ecd94ea1bb4831417d06499216a6f5 CHANGES
+SHA1 1c38b0790580a2e2239404dd7d5de0b8ce415f11 CHANGES
 SHA1 dda5ca4f413031e9efcaa1600461d5e2adaa3a40 CREDITS
 SHA1 d7497d6d105042817c1734585be04ad2ebec4db2 GMP.xs
 SHA1 d6b7be7fb558f2df93e6bc55148bba35cae22ce4 INSTALL
 SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
-SHA1 3cbe75289e5d220085471ce02bb24a63c3ca68d7 MANIFEST
-SHA1 48395ac28095cb8ccc5c0472b6c8832a736d2f04 MANIFEST.SKIP
-SHA1 4d65fd904b9b6f45319cfbd1d596b05033d77f18 META.yml
-SHA1 58d9174aa185f266a7b476a00044967dbf3402ca Makefile.PL
+SHA1 f1f5d7799d2a10004d9fde9e929edaca038b8c6b MANIFEST
+SHA1 411ab4f05c252f85f12f12e087bae0adc5ba0aad MANIFEST.SKIP
+SHA1 95a51ac44107896279b27d07eb571553f3c5a457 META.json
+SHA1 f8705c7b74812ddd94b4056fc5bad153d8d8273f META.yml
+SHA1 c1e61286ff1f620f3da7fc7d06fdc4f6ce105546 Makefile.PL
 SHA1 ddef2225fa80a87f3138f23cb7fdbc8468c1f58f README
 SHA1 6c7207c83d636868d3d1f1fc42f3f9e5897cbe85 TODO
 SHA1 fd48d0d8750eb949e485d8136b5b424fe73e9775 build/README
 SHA1 7bcc4113830721ad6e37a1ea79df94a6987c836d build/leak.pl
 SHA1 ac25bda8a6eb9058a9e42a8943c3e11b9fed88dc build/leaktest
-SHA1 f68060b4838ade6c344ba7ee021ae83384ae9b11 inc/Devel/CheckLib.pm
-SHA1 a45f8cdd371beaff0daae9c8bdd011f8213471eb lib/Math/BigInt/GMP.pm
+SHA1 5bad87980fc59ecb29c9afe0719c48ad32758d63 inc/Devel/CheckLib.pm
+SHA1 06320330b1c5212c4b733c24f12d5594ab35dbe1 lib/Math/BigInt/GMP.pm
 SHA1 6e9557e746e881ab1568cdcec17ff3c4f1508502 t/00sig.t
 SHA1 ab94a8c86b2b8fda2e02f9e3de43dff6186e65d3 t/01load.t
 SHA1 02ef05af53cb7378452590324bb21dfe61f44069 t/02pod.t
 SHA1 ada3fcae2f9313cc97e0b999b13b30dac9a3deda t/03podcov.t
-SHA1 03a9a3dde7d4fcc3eb2e8f245ab0b0253f1d5821 t/bigfltpm.inc
-SHA1 01fd88632c91ab5a2d2f3e1cb21d6e8c87a76d0a t/bigfltpm.t
+SHA1 d05514d6cae3afa4feb983d5467eaf9422aa546c t/bigfltpm.inc
+SHA1 a8f364fea5e2993f5ae7bd3f8463024175d33e24 t/bigfltpm.t
 SHA1 26c3ca060f6b7474ad8b2db3c1bae2b98e13adfd t/bigintg.t
-SHA1 108a20412616ea34d67b93891383d47e3a619120 t/bigintpm.inc
-SHA1 3f2e0370b563a77accd7af70f1b284859cec5dd4 t/bigintpm.t
+SHA1 845e7daa3c6b2463a6fdc9218044975801547bb8 t/bigintpm.inc
+SHA1 5c7e31a73f1827d08118f96cf31d5d4e792ab8c0 t/bigintpm.t
 SHA1 5bdf82ef7085b97caa496bfc71ab1fbfe48ef9e8 t/biglog.t
 SHA1 da260b6e02b220868fc7b4c0f87569299402fbf7 t/bigroot.t
 SHA1 f1bcab94173a57861fcc40ac90eb72f64aafea7f t/storable.t
@@ -48,7 +49,7 @@ SHA1 20cf43acc1a728d0ee8245b106937a2a97900266 typemap
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (Cygwin)
 
-iEYEARECAAYFAk1pJMMACgkQVQvyyU1bchq/BwCePCqCU1e99JPUQ6527aE+1NyS
-AFsAn0U594jmOn3isVTrzlAAmVlnlPuu
-=WQWF
+iEYEARECAAYFAk5jykUACgkQVQvyyU1bchpbUQCglrXtBTDqJHOcg4jNhANCddpi
+SRMAoNAV0CKT1a3JdH7AdSkh4vixU8Jw
+=HATQ
 -----END PGP SIGNATURE-----
diff --git a/inc/Devel/CheckLib.pm b/inc/Devel/CheckLib.pm
index 28138c8..54bae72 100644
--- a/inc/Devel/CheckLib.pm
+++ b/inc/Devel/CheckLib.pm
@@ -5,7 +5,7 @@ package Devel::CheckLib;
 use 5.00405; #postfix foreach
 use strict;
 use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '0.92';
+$VERSION = '0.93';
 use Config qw(%Config);
 use Text::ParseWords 'quotewords';
 
@@ -255,7 +255,7 @@ sub assert_lib {
         }
         warn "# @sys_cmd\n" if $args{debug};
         my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
-        push @missing, $header if $rv != 0 || ! -x $exefile; 
+        push @missing, $header if $rv != 0 || ! -x $exefile;
         _cleanup_exe($exefile);
         unlink $cfile;
     } 
@@ -308,7 +308,9 @@ sub assert_lib {
         warn "# @sys_cmd\n" if $args{debug};
         my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
         push @missing, $lib if $rv != 0 || ! -x $exefile;
-        push @wrongresult, $lib if $rv == 0 && -x $exefile && system(File::Spec->rel2abs($exefile)) != 0; 
+        my $absexefile = File::Spec->rel2abs($exefile);
+        $absexefile = '"'.$absexefile.'"' if $absexefile =~ m/\s/;
+        push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0;
         _cleanup_exe($exefile);
     } 
     unlink $cfile;
diff --git a/lib/Math/BigInt/GMP.pm b/lib/Math/BigInt/GMP.pm
index 5a64e61..0687ead 100644
--- a/lib/Math/BigInt/GMP.pm
+++ b/lib/Math/BigInt/GMP.pm
@@ -9,7 +9,7 @@ use 5.006002;
 
 use vars qw/$VERSION/;
 
-$VERSION = '1.36';
+$VERSION = '1.37';
 
 use XSLoader;
 XSLoader::load "Math::BigInt::GMP", $VERSION;
diff --git a/t/bigfltpm.inc b/t/bigfltpm.inc
index 743752e..d6885ac 100644
--- a/t/bigfltpm.inc
+++ b/t/bigfltpm.inc
@@ -258,6 +258,14 @@ $x->bdiv(3,$y);
 is ($x,'0.0027');
 
 ###############################################################################
+# Verify that numify() returns a normalized value, and underflows and
+# overflows when given "extreme" values.
+
+like($class->new("12345e67")->numify(), qr/^1\.2345e\+?0*71$/);
+like($class->new("1e-9999")->numify(), qr/^\+?0$/);              # underflow
+unlike($class->new("1e9999")->numify(), qr/^1(\.0*)?e\+?9+$/);   # overflow
+
+###############################################################################
 # fsqrt() with set global A/P or A/P enabled on $x, also a test whether fsqrt()
 # correctly modifies $x
 
@@ -637,15 +645,12 @@ hexNaN:NaN
 -5:-0b101
 &numify
 # uses bsstr() so 5 => 5e+0 to be compatible w/ Perls output
-0:0e+1
-+1:1e+0
-1234:1234e+0
-NaN:NaN
-+inf:inf
--inf:-inf
--5:-5e+0
-100:1e+2
--100:-1e+2
+0:0
++1:1
+1234:1234
+-5:-5
+100:100
+-100:-100
 &fnan
 abc:NaN
 2:NaN
diff --git a/t/bigfltpm.t b/t/bigfltpm.t
old mode 100755
new mode 100644
index 045c081..e0b939e
--- a/t/bigfltpm.t
+++ b/t/bigfltpm.t
@@ -2,15 +2,15 @@
 
 use strict;
 use Test::More tests => 2322
-    + 4;		# own tests
+    + 5;		# own tests
 
 
-use Math::BigInt lib => 'GMP';
+use Math::BigInt lib => 'Calc';
 use Math::BigFloat;
 
 use vars qw ($class $try $x $y $f @args $ans $ans1 $ans1_str $setup $CL);
 $class = "Math::BigFloat";
-$CL = "Math::BigInt::GMP";
+$CL = "Math::BigInt::Calc";
 
 is ($class->config()->{class},$class);
 is ($class->config()->{with}, $CL);
@@ -24,8 +24,6 @@ $c = Math::BigFloat->new('0.008'); my $d = Math::BigFloat->new(3);
 my $e = $c->bdiv(Math::BigFloat->new(3),$d);
 
 is ($e,'0.00267'); # '0.008 / 3 => 0.0027');
-
-# The following test assumes that the Math::BigInt::Calc library is used.
-#is (ref($e->{_e}->[0]), ''); # 'Not a BigInt');
+is (ref($e->{_e}->[0]), ''); # 'Not a BigInt');
 
 require 't/bigfltpm.inc';	# all tests here for sharing
diff --git a/t/bigintg.t b/t/bigintg.t
old mode 100755
new mode 100644
diff --git a/t/bigintpm.inc b/t/bigintpm.inc
index f5f0fd2..478584b 100644
--- a/t/bigintpm.inc
+++ b/t/bigintpm.inc
@@ -73,7 +73,7 @@ while (<DATA>)
    } elsif ($f eq "bone") {
     $try .= "\$x->bone('$args[1]');";
   # some unary ops
-   } elsif ($f =~ /^b(nan|floor|ceil|sstr|neg|abs|inc|dec|not|sqrt|fac)$/) {
+   } elsif ($f =~ /^b(nan|floor|ceil|sstr|neg|abs|sgn|inc|dec|not|sqrt|fac)$/) {
     $try .= "\$x->$f();";
    } elsif ($f =~ /^(numify|length|stringify|as_hex|as_bin)$/) {
     $try .= "\$x->$f();";
@@ -524,6 +524,27 @@ is (ref($x),'Math::Foo');
 $x = $class->new('+inf'); is ($x,'inf');
 
 ###############################################################################
+# numify() and 64 bit integer support
+
+require Config;
+SKIP: {
+    skip("no 64 bit integer support", 4)
+      unless $Config::Config{use64bitint} || $Config::Config{use64bitall};
+
+    # The following should not give "1.84467440737096e+19".
+
+    $x = $class -> new(2) -> bpow(64) -> bdec();
+    is($x -> bstr(),   "18446744073709551615", "bigint 2**64-1 as string");
+    is($x -> numify(), "18446744073709551615", "bigint 2**64-1 as number");
+
+    # The following should not give "-9.22337203685478e+18".
+
+    $x = $class -> new(2) -> bpow(63) -> bneg();
+    is($x -> bstr(),   "-9223372036854775808", "bigint -2**63 as string");
+    is($x -> numify(), "-9223372036854775808", "bigint -2**63 as number");
+};
+
+###############################################################################
 ###############################################################################
 # the following tests only make sense with Math::BigInt::Calc or BareCalc or
 # FastCalc
@@ -1201,6 +1222,13 @@ babsNaN:NaN
 -1:1
 +123456789:123456789
 -123456789:123456789
+&bsgn
+NaN:NaN
++inf:1
+-inf:-1
+0:0
++123456789:1
+-123456789:-1
 &bcmp
 bcmpNaN:bcmpNaN:
 bcmpNaN:0:
diff --git a/t/bigintpm.t b/t/bigintpm.t
old mode 100755
new mode 100644
index 11170ee..6ee3eff
--- a/t/bigintpm.t
+++ b/t/bigintpm.t
@@ -1,13 +1,13 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 3569 + 6;
+use Test::More tests => 3635 + 6;
 
-use Math::BigInt lib => 'GMP';
+use Math::BigInt lib => 'Calc';
 
 use vars qw ($scale $class $try $x $y $f @args $ans $ans1 $ans1_str $setup $CL);
 $class = "Math::BigInt";
-$CL = "Math::BigInt::GMP";
+$CL = "Math::BigInt::Calc";
 
 #############################################################################
 # from_hex(), from_bin() and from_oct() tests
diff --git a/t/biglog.t b/t/biglog.t
old mode 100755
new mode 100644
diff --git a/t/bigroot.t b/t/bigroot.t
old mode 100755
new mode 100644

-- 
Debian packaging of libmath-bigint-gmp-perl



More information about the Pkg-perl-cvs-commits mailing list