Hello community,

here is the log from the commit of package perl-Math-Clipper for 
openSUSE:Factory checked in at 2018-06-02 11:58:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Math-Clipper (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Math-Clipper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Math-Clipper"

Sat Jun  2 11:58:49 2018 rev:4 rq:610759 version:1.27

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Math-Clipper/perl-Math-Clipper.changes      
2018-05-03 12:33:47.833256379 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Math-Clipper.new/perl-Math-Clipper.changes 
2018-06-02 11:58:54.645119075 +0200
@@ -1,0 +2,26 @@
+Sat May 19 05:30:20 UTC 2018 - co...@suse.com
+
+- updated to 1.27
+   see /usr/share/doc/packages/perl-Math-Clipper/Changes
+
+  1.27  Sun May 13 17:46:00 2018
+  
+    - Fix integerize bug introduced in 1.26 for 32 bit Perl (ivsize < 8)
+
+-------------------------------------------------------------------
+Thu May  3 05:33:18 UTC 2018 - co...@suse.com
+
+- updated to 1.26
+   see /usr/share/doc/packages/perl-Math-Clipper/Changes
+
+  1.26  Tue May 1 02:47:00 2018
+  
+    - Harmonize differences in float multiplication results found on
+      FreeBSD + clang systems in integerize_coordinate_sets()
+  
+  1.25  Mon April 30 11:44:00 2018
+  
+    - Fix Integerize.t to support Perls with long doubles
+    - More explicit rounding and truncating in integerize_coordinate_sets()
+
+-------------------------------------------------------------------

Old:
----
  Math-Clipper-1.24.tar.gz

New:
----
  Math-Clipper-1.27.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Math-Clipper.spec ++++++
--- /var/tmp/diff_new_pack.5kECVl/_old  2018-06-02 11:58:55.249096926 +0200
+++ /var/tmp/diff_new_pack.5kECVl/_new  2018-06-02 11:58:55.253096780 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Math-Clipper
-Version:        1.24
+Version:        1.27
 Release:        0
 %define cpan_name Math-Clipper
 Summary:        Polygon clipping in 2D
@@ -29,7 +29,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(ExtUtils::CppGuess) >= 0.11
+BuildRequires:  perl(ExtUtils::CppGuess) >= 0.12
 BuildRequires:  perl(ExtUtils::Typemaps::Default) >= 0.05
 BuildRequires:  perl(ExtUtils::XSpp) >= 0.18
 BuildRequires:  perl(Module::Build) >= 0.380000

++++++ Math-Clipper-1.24.tar.gz -> Math-Clipper-1.27.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.24/Changes 
new/Math-Clipper-1.27/Changes
--- old/Math-Clipper-1.24/Changes       2018-04-26 08:45:35.000000000 +0200
+++ new/Math-Clipper-1.27/Changes       2018-05-14 02:52:12.000000000 +0200
@@ -1,5 +1,19 @@
 Revision history for Perl extension Math::Clipper.
 
+1.27  Sun May 13 17:46:00 2018
+
+  - Fix integerize bug introduced in 1.26 for 32 bit Perl (ivsize < 8)
+
+1.26  Tue May 1 02:47:00 2018
+
+  - Harmonize differences in float multiplication results found on
+    FreeBSD + clang systems in integerize_coordinate_sets()
+
+1.25  Mon April 30 11:44:00 2018
+
+  - Fix Integerize.t to support Perls with long doubles
+  - More explicit rounding and truncating in integerize_coordinate_sets()
+
 1.24  Fri April 20 15:19:00 2018
 
   - Fix Integerize.t to handle '-0' from sprintf("%.0f")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.24/META.json 
new/Math-Clipper-1.27/META.json
--- old/Math-Clipper-1.24/META.json     2018-04-26 08:45:35.000000000 +0200
+++ new/Math-Clipper-1.27/META.json     2018-05-14 02:52:12.000000000 +0200
@@ -4,7 +4,7 @@
       "Steffen Mueller (E<lt>smuel...@cpan.orge<gt>),"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4216",
+   "generated_by" : "Module::Build version 0.4224",
    "license" : [
       "perl_5"
    ],
@@ -23,7 +23,7 @@
       },
       "configure" : {
          "requires" : {
-            "ExtUtils::CppGuess" : "0.11",
+            "ExtUtils::CppGuess" : "0.12",
             "Module::Build" : "0.38",
             "Module::Build::WithXSpp" : "0.14"
          }
@@ -32,7 +32,7 @@
    "provides" : {
       "Math::Clipper" : {
          "file" : "lib/Math/Clipper.pm",
-         "version" : "1.24"
+         "version" : "1.27"
       }
    },
    "release_status" : "stable",
@@ -41,6 +41,6 @@
          "http://dev.perl.org/licenses/";
       ]
    },
-   "version" : "1.24",
-   "x_serialization_backend" : "JSON::PP version 2.27300"
+   "version" : "1.27",
+   "x_serialization_backend" : "JSON::PP version 2.27300_01"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.24/META.yml 
new/Math-Clipper-1.27/META.yml
--- old/Math-Clipper-1.24/META.yml      2018-04-26 08:45:35.000000000 +0200
+++ new/Math-Clipper-1.27/META.yml      2018-05-14 02:52:12.000000000 +0200
@@ -7,11 +7,11 @@
   ExtUtils::XSpp: '0.18'
   Test::Deep: '0'
 configure_requires:
-  ExtUtils::CppGuess: '0.11'
+  ExtUtils::CppGuess: '0.12'
   Module::Build: '0.38'
   Module::Build::WithXSpp: '0.14'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4216, CPAN::Meta::Converter version 
2.150005'
+generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 
2.150005'
 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.24'
+    version: '1.27'
 resources:
   license: http://dev.perl.org/licenses/
-version: '1.24'
+version: '1.27'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.24/lib/Math/Clipper.pm 
new/Math-Clipper-1.27/lib/Math/Clipper.pm
--- old/Math-Clipper-1.24/lib/Math/Clipper.pm   2018-04-26 08:45:35.000000000 
+0200
+++ new/Math-Clipper-1.27/lib/Math/Clipper.pm   2018-05-14 02:52:12.000000000 
+0200
@@ -12,7 +12,7 @@
 
 BEGIN {
     use XSLoader;
-    $VERSION = '1.24';
+    $VERSION = '1.27';
     XSLoader::load('Math::Clipper', $VERSION);
 }
 
@@ -44,7 +44,7 @@
             maxint    => 1073741822,   # Clipper-imposed max to avoid 
calculations with large integer types
             maxdigits => 10
             },
-    );
+);
 
 my $is64safe = ((defined($Config{use64bitint})   && $Config{use64bitint}   eq 
'define') || $Config{longsize}   >= 8 ) &&
                ((defined($Config{uselongdouble}) && $Config{uselongdouble} eq 
'define') || $Config{doublesize} >= 10);
@@ -52,15 +52,15 @@
 sub offset {
     my ($polygons, $delta, $scale, $jointype, $miterlimit) = @_;
     $scale      ||= 100;
-       $jointype   = JT_MITER if !defined $jointype;
-       $miterlimit ||= 2;
-       
-       my $scalevec=[$scale,$scale];
-       my $polyscopy=[(map {[(map {[(map {$_*$scalevec->[0]} @{$_})]} @{$_})]} 
@{$polygons})];
-       my $ret = _offset($polyscopy,$delta*$scale, $jointype, $miterlimit);
-       unscale_coordinate_sets($scalevec , $ret) if @$ret;
-       return $ret;
-       }
+    $jointype   = JT_MITER if !defined $jointype;
+    $miterlimit ||= 2;
+
+    my $scalevec=[$scale,$scale];
+    my $polyscopy=[(map {[(map {[(map {$_*$scalevec->[0]} @{$_})]} @{$_})]} 
@{$polygons})];
+    my $ret = _offset($polyscopy,$delta*$scale, $jointype, $miterlimit);
+    unscale_coordinate_sets($scalevec , $ret) if @$ret;
+    return $ret;
+}
 
 *is_counter_clockwise = *orientation;
 
@@ -73,17 +73,17 @@
         foreach my $vector (@{$set}) {
             for (my $ci=0;$ci<$coord_count;$ci++) {
                 $vector->[$ci] /= $scale_vector->[$ci] if 
$scale_vector->[$ci]; # avoid divide by zero
-                }
             }
         }
     }
+}
 
 sub integerize_coordinate_sets {
     my %opts=();
     if (ref($_[0]) =~ /HASH/) {%opts=%{(shift)};}
     $opts{constrain} =  1 if !defined($opts{constrain});
     $opts{bits}      = ($is64safe ? 64 : 53) if !defined($opts{bits});
-       if ($opts{bits} == 64 && !$is64safe) {$opts{bits} = 53; carp 
"Integerize to 64 bits requires both long long and long double underlying 
Perl's default integer and double types. Using 53 bits instead.";}
+    if ($opts{bits} == 64 && !$is64safe) {$opts{bits} = 53; carp "Integerize 
to 64 bits requires both long long and long double underlying Perl's default 
integer and double types. Using 53 bits instead.";}
     $opts{margin} =  0 if !defined($opts{margin});
 
     # assume all coordinate vectors (points) have same number of coordinates; 
get that count from first one
@@ -91,7 +91,7 @@
 
     # return this with scaled data, so user can "unscale" Clipper results
     my @scale_vector;
-    
+
     # 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];
@@ -107,10 +107,10 @@
                 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} 
-                    }
-                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.
@@ -129,11 +129,15 @@
 
             $scale_vector[$ci]=10**(-$max_exp + 
($intspecs{$opts{bits}}->{maxdigits} - 2));
 
-            }
         }
-    
+
+        # 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,
-       # scaling is independent for each
+    # scaling is independent for each
     # coordinate column - all the Xs get one scale
     # all the Ys something else - to take the greatest
     # advantage of the available integer domain.
@@ -144,20 +148,22 @@
     if ($opts{constrain}) {
         my $min_scale=(sort {$a<=>$b} @scale_vector)[0];
         @scale_vector = map {$min_scale} @scale_vector;
-        }
+    }
 
     # Scale the original data
     foreach my $set (@_) {
         foreach my $vector (@{$set}) {
             for (my $ci=0;$ci<$coord_count;$ci++) {
                 $vector->[$ci] *= $scale_vector[$ci];
-                if (abs($vector->[$ci] < 1)) {$vector->[$ci] = 
sprintf("%.1f",$vector->[$ci]/10)*10;}
-                }
+                if    (abs($vector->[$ci]) < 0.5) { $vector->[$ci] = 0; }
+                elsif (abs($vector->[$ci]) < 1) { $vector->[$ci] = 
$vector->[$ci] < 0 ? -1:1; }
+                $vector->[$ci] = _floor($vector->[$ci]);
             }
         }
+    }
 
     return \@scale_vector;
-    }
+}
 
 # keep this method as a no-op, as it was removed in Clipper 4.5.5
 sub use_full_coordinate_range {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.24/t/008integerize.t 
new/Math-Clipper-1.27/t/008integerize.t
--- old/Math-Clipper-1.24/t/008integerize.t     2018-04-26 08:45:35.000000000 
+0200
+++ new/Math-Clipper-1.27/t/008integerize.t     2018-05-14 02:52:12.000000000 
+0200
@@ -81,14 +81,14 @@
     [ 1234,  56.77777777777777 * 10**(14+$extraexp)]
 ];
 my $Aexpect_string = [ # in 64 bit environment, we get real integers back from 
Clipper, expect always in integer form, no exponents
-    [ '-2'.('0' x $extraexp),        '-567'.('9' x 12).('0' x $extraexp)],
-    [ 0,                            '-5678'.('8' x 11).('0' x $extraexp)],
-    [ 0,                             '5677'.('7' x 11).('0' x $extraexp)]
+    [ '-2'.('0' x ($extraexp - 1)),  '-567'.('9' x 12).('0' x ($extraexp - 
1))],
+    [ 0,                            '-5678'.('8' x 12).('0' x ($extraexp - 
1))],
+    [ 0,                             '5677'.('7' x 12).('0' x ($extraexp - 1))]
 ];
 my $A2expect_string = [
-    [ '-2'.('0' x (15+$extraexp)),   '-567'.('9' x 12).('0' x $extraexp)],
-    [ 1234,                         '-5678'.('8' x 11).('0' x $extraexp)],
-    [ 1234,                          '5677'.('7' x 11).('0' x $extraexp)]
+    [ '-2'.('0' x (15+$extraexp)),   '-567'.('9' x 12).('0' x ($extraexp - 
1))],
+    [ '1234'.('0' x $extraexp),     '-5678'.('8' x 12).('0' x ($extraexp - 
1))],
+    [ '1234'.('0' x $extraexp),      '5677'.('7' x 12).('0' x ($extraexp - 1))]
 ];
 my $AexpectUnscaled = [
     [ -0.00000000000002,  -5.67999999999999],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.24/xsp/Clipper.xsp 
new/Math-Clipper-1.27/xsp/Clipper.xsp
--- old/Math-Clipper-1.24/xsp/Clipper.xsp       2018-04-26 08:45:35.000000000 
+0200
+++ new/Math-Clipper-1.27/xsp/Clipper.xsp       2018-05-14 02:52:12.000000000 
+0200
@@ -279,6 +279,15 @@
     delete polygons;
   OUTPUT:
     RETVAL
+
+SV*
+_floor(x)
+    SV * x
+  CODE:
+    RETVAL = SvNOK(x) ? newSVnv(Perl_floor(SvNV(x))) : newSViv(SvIV(x));
+  OUTPUT:
+    RETVAL
+
 %}
 
   %name{clear}


Reply via email to