diff -Nru libmath-clipper-perl-1.27/Changes libmath-clipper-perl-1.29/Changes --- libmath-clipper-perl-1.27/Changes 2018-05-14 00:52:12.000000000 +0000 +++ libmath-clipper-perl-1.29/Changes 2019-05-17 06:59:15.000000000 +0000 @@ -1,5 +1,16 @@ Revision history for Perl extension Math::Clipper. +1.29 Thursday May 16 23:51:00 2019 + + - Fix build error under clang and pre-5.18 Perls. + +1.28 Sat May 11 03:42:00 2019 + + - Avoid use of ** in calculating scaling factors in + integerize_coordinate_sets() to avoid inconsistent + behavior of underlying pow() function between BSD + clang + and other systems. + 1.27 Sun May 13 17:46:00 2018 - Fix integerize bug introduced in 1.26 for 32 bit Perl (ivsize < 8) diff -Nru libmath-clipper-perl-1.27/debian/changelog libmath-clipper-perl-1.29/debian/changelog --- libmath-clipper-perl-1.27/debian/changelog 2018-11-03 00:11:51.000000000 +0000 +++ libmath-clipper-perl-1.29/debian/changelog 2019-07-27 06:18:05.000000000 +0000 @@ -1,8 +1,13 @@ -libmath-clipper-perl (1.27-1build1) disco; urgency=medium +libmath-clipper-perl (1.29-1) unstable; urgency=medium - * No-change rebuild for the perl 5.28 transition. + * Team upload + * New upstream version 1.29 + * Update d/copright years + * Bump compat to 12 + * Bump Standards-Version to 4.4.0 + * Add d/upstream/metadata - -- Adam Conrad Fri, 02 Nov 2018 18:11:51 -0600 + -- Utkarsh Gupta Sat, 27 Jul 2019 11:48:05 +0530 libmath-clipper-perl (1.27-1) unstable; urgency=medium diff -Nru libmath-clipper-perl-1.27/debian/compat libmath-clipper-perl-1.29/debian/compat --- libmath-clipper-perl-1.27/debian/compat 2018-05-17 20:36:30.000000000 +0000 +++ libmath-clipper-perl-1.29/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru libmath-clipper-perl-1.27/debian/control libmath-clipper-perl-1.29/debian/control --- libmath-clipper-perl-1.27/debian/control 2018-05-17 20:36:30.000000000 +0000 +++ libmath-clipper-perl-1.29/debian/control 2019-07-27 06:18:05.000000000 +0000 @@ -4,14 +4,14 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 10), +Build-Depends: debhelper-compat (= 12), libextutils-cppguess-perl (>= 0.12), libextutils-typemaps-default-perl, - libextutils-xspp-perl (>= 0.1800), + libextutils-xspp-perl, libmodule-build-withxspp-perl, libtest-deep-perl, perl -Standards-Version: 4.1.4 +Standards-Version: 4.4.0 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libmath-clipper-perl Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libmath-clipper-perl.git Homepage: https://metacpan.org/release/Math-Clipper diff -Nru libmath-clipper-perl-1.27/debian/copyright libmath-clipper-perl-1.29/debian/copyright --- libmath-clipper-perl-1.27/debian/copyright 2018-05-17 20:36:30.000000000 +0000 +++ libmath-clipper-perl-1.29/debian/copyright 2019-07-27 06:18:05.000000000 +0000 @@ -5,9 +5,9 @@ Mike Sheldrake and Alessandro Ranellucci . Files: * -Copyright: 2010-2014, Steffen Mueller - 2011-2018, Mike Sheldrake - 2012-2013, Alessandro Ranellucci +Copyright: 2010, 2011, 2014, Steffen Mueller + 2011, 2018, 2019, Mike Sheldrake + 2012, 2013, Alessandro Ranellucci License: BSL-1.0 Files: src/clipper.* diff -Nru libmath-clipper-perl-1.27/debian/upstream/metadata libmath-clipper-perl-1.29/debian/upstream/metadata --- libmath-clipper-perl-1.27/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ libmath-clipper-perl-1.29/debian/upstream/metadata 2019-07-27 06:18:05.000000000 +0000 @@ -0,0 +1,6 @@ +--- +Archive: CPAN +Bug-Database: https://rt.cpan.org/Public/Dist/Display.html?Name=Math-Clipper +Bug-Submit: bug-Math-Clipper@rt.cpan.org +Contact: Steffen Mueller (smueller@cpan.org) +Name: Math-Clipper diff -Nru libmath-clipper-perl-1.27/lib/Math/Clipper.pm libmath-clipper-perl-1.29/lib/Math/Clipper.pm --- libmath-clipper-perl-1.27/lib/Math/Clipper.pm 2018-05-14 00:52:12.000000000 +0000 +++ libmath-clipper-perl-1.29/lib/Math/Clipper.pm 2019-05-17 06:59:15.000000000 +0000 @@ -12,7 +12,7 @@ BEGIN { use XSLoader; - $VERSION = '1.27'; + $VERSION = '1.29'; XSLoader::load('Math::Clipper', $VERSION); } @@ -89,10 +89,10 @@ # assume all coordinate vectors (points) have same number of coordinates; get that count from first one my $coord_count=scalar(@{$_[0]->[0]}); - # return this with scaled data, so user can "unscale" Clipper results + # return this array of each column's calculated scale factor, so users can "unscale" Clipper results my @scale_vector; - # deal with each coordinate "column" (eg. x column, y column, ... possibly more) + # deal with each coordinate column (eg. x column, y column, ... possibly more) for (my $ci=0;$ci<$coord_count;$ci++) { my $maxc=$_[0]->[0]->[$ci]; my $max_exp; @@ -101,23 +101,34 @@ foreach my $set (@_) { # for each "point" foreach my $vector (@{$set}) { - # looking for the maximum magnitude + # possibly update the the maximum magnitude seen in the column if ($maxc[$ci]) + $opts{margin}) {$maxc=abs($vector->[$ci]) + $opts{margin};} - # looking for the maximum exponent, when coords are in scientific notation + # look for the maximum exponent, when coords are in scientific notation if (sprintf("%.20e",$vector->[$ci] + ($vector->[$ci]<0?-1:1)*$opts{margin}) =~ /[eE]([+-])0*(\d+)$/) { my $exp1 = eval($1.$2); - if (defined $vector->[$ci] && (!defined($max_exp) || $max_exp<$exp1)) {$max_exp=$exp1} + if (defined $vector->[$ci] && (!defined($max_exp) || $max_exp<$exp1)) {$max_exp=$exp1;} } - else {croak "some coordinate didn't look like a number: ",$vector->[$ci]} + else {croak "some coordinate didn't look like a number: ",$vector->[$ci];} } } # Set scale for this coordinate column to the largest value that will convert the - # larges coordinate in the set to near the top of the available integer range. + # largest coordinate in the set to near the top of the available integer range. # There's never any question of how much precision the user wants - # we just always give as much as possible, within the integer limit in effect (53 bit or 64 bit) - $scale_vector[$ci]=10**(-$max_exp + ($intspecs{$opts{bits}}->{maxdigits} - 1)); + $scale_vector[$ci] = 1; + my $power = -$max_exp + ($intspecs{$opts{bits}}->{maxdigits} - 1); + + # We explicitly calculate the equivalent to 1**$power because + # the results of the system's pow() function underlying + # Perl's ** operator are sometimes inconsistent between + # BSD/clang and other systems. + + for (my $pi = 0; $pi < abs($power); $pi++) { + if ($power > 0) { $scale_vector[$ci] *= 10; } + elsif ($power < 0) { $scale_vector[$ci] /= 10; } + } if ($maxc * $scale_vector[$ci] > $intspecs{$opts{bits}}->{maxint}) { # Both 53 bit and 64 bit integers @@ -127,13 +138,8 @@ # zone just beyond the integer max, we'll only # scale up to 15 or 18 digit integers instead. - $scale_vector[$ci]=10**(-$max_exp + ($intspecs{$opts{bits}}->{maxdigits} - 2)); - + $scale_vector[$ci] /= 10; } - - # brings behavior of FreeBSD + clang systems into harmony with others - $scale_vector[$ci] = 0.0 + sprintf("%.0f",$scale_vector[$ci]); - } # If the "constrain" option is set false, @@ -628,7 +634,7 @@ Copyright (C) 2010, 2011, 2014 by Steffen Mueller -Copyright (C) 2011, 2018 by Mike Sheldrake +Copyright (C) 2011, 2018, 2019 by Mike Sheldrake Copyright (C) 2012, 2013 by Alessandro Ranellucci and Mike Sheldrake diff -Nru libmath-clipper-perl-1.27/META.json libmath-clipper-perl-1.29/META.json --- libmath-clipper-perl-1.27/META.json 2018-05-14 00:52:12.000000000 +0000 +++ libmath-clipper-perl-1.29/META.json 2019-05-17 06:59:15.000000000 +0000 @@ -32,7 +32,7 @@ "provides" : { "Math::Clipper" : { "file" : "lib/Math/Clipper.pm", - "version" : "1.27" + "version" : "1.29" } }, "release_status" : "stable", @@ -41,6 +41,6 @@ "http://dev.perl.org/licenses/" ] }, - "version" : "1.27", - "x_serialization_backend" : "JSON::PP version 2.27300_01" + "version" : "1.29", + "x_serialization_backend" : "JSON::PP version 2.27400_02" } diff -Nru libmath-clipper-perl-1.27/META.yml libmath-clipper-perl-1.29/META.yml --- libmath-clipper-perl-1.27/META.yml 2018-05-14 00:52:12.000000000 +0000 +++ libmath-clipper-perl-1.29/META.yml 2019-05-17 06:59:15.000000000 +0000 @@ -11,7 +11,7 @@ Module::Build: '0.38' Module::Build::WithXSpp: '0.14' dynamic_config: 1 -generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150005' +generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -20,8 +20,8 @@ provides: Math::Clipper: file: lib/Math/Clipper.pm - version: '1.27' + version: '1.29' resources: license: http://dev.perl.org/licenses/ -version: '1.27' +version: '1.29' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libmath-clipper-perl-1.27/src/myinit.h libmath-clipper-perl-1.29/src/myinit.h --- libmath-clipper-perl-1.27/src/myinit.h 2018-05-14 00:52:12.000000000 +0000 +++ libmath-clipper-perl-1.29/src/myinit.h 2019-05-17 06:59:15.000000000 +0000 @@ -1,6 +1,10 @@ #ifndef __clipper_myinit_h_ #define __clipper_myinit_h_ +// fix build error under clang for pre-5.18 Perls +#undef dNOOP +#define dNOOP struct Perl___notused_struct + #include "clipper.hpp" using namespace ClipperLib;