packages: perl-Cairo/perl-Cairo.spec, perl-Cairo/perl-Cairo-tests.patch (NE...
qboosh
qboosh at pld-linux.org
Tue Jun 5 15:55:48 CEST 2012
Author: qboosh Date: Tue Jun 5 13:55:48 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- updated to 1.082
- added tests patch (from git, adjusted for 1.082 release)
---- Files affected:
packages/perl-Cairo:
perl-Cairo.spec (1.21 -> 1.22) , perl-Cairo-tests.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/perl-Cairo/perl-Cairo.spec
diff -u packages/perl-Cairo/perl-Cairo.spec:1.21 packages/perl-Cairo/perl-Cairo.spec:1.22
--- packages/perl-Cairo/perl-Cairo.spec:1.21 Mon May 2 20:13:03 2011
+++ packages/perl-Cairo/perl-Cairo.spec Tue Jun 5 15:55:42 2012
@@ -8,12 +8,13 @@
Summary: Perl Cairo bindings
Summary(pl.UTF-8): Wiązania Cairo dla Perla
Name: perl-Cairo
-Version: 1.062
+Version: 1.082
Release: 1
License: LGPL v2.1+
Group: Development/Languages/Perl
Source0: http://downloads.sourceforge.net/gtk2-perl/%{pnam}-%{version}.tar.gz
-# Source0-md5: 655eff93a509c9c1a0a98a82db71c11a
+# Source0-md5: cfd61e519ff20023979c255d4040fe06
+Patch0: %{name}-tests.patch
URL: http://gtk2-perl.sourceforge.net/
BuildRequires: cairo-devel >= 1.6.0
BuildRequires: perl-ExtUtils-Depends >= 0.201
@@ -34,6 +35,7 @@
%prep
%setup -q -n %{pnam}-%{version}
+%patch0 -p1
%build
%{__perl} Makefile.PL \
@@ -73,6 +75,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.22 2012/06/05 13:55:42 qboosh
+- updated to 1.082
+- added tests patch (from git, adjusted for 1.082 release)
+
Revision 1.21 2011/05/02 18:13:03 qboosh
- updated to 1.062; tests have been fixed
================================================================
Index: packages/perl-Cairo/perl-Cairo-tests.patch
diff -u /dev/null packages/perl-Cairo/perl-Cairo-tests.patch:1.1
--- /dev/null Tue Jun 5 15:55:48 2012
+++ packages/perl-Cairo/perl-Cairo-tests.patch Tue Jun 5 15:55:42 2012
@@ -0,0 +1,92 @@
+From a1cd2e45b4ee49a724ae5d7e854ad9829eebf00d Mon Sep 17 00:00:00 2001
+From: Torsten Schönfeld <kaffeetisch at gmx.de>
+Date: Sat, 07 Apr 2012 18:01:31 +0000
+Subject: Make t/CairoPath.t more robust
+
+The end of a path that took a round trip into cairo and back might differ
+for different versions of cairo. Hence, compare only the beginning with
+the expected path.
+---
+diff --git a/t/CairoPath.t b/t/CairoPath.t
+index 770e464..27a3aad 100644
+--- a/t/CairoPath.t
++++ b/t/CairoPath.t
+@@ -11,7 +11,7 @@ use strict;
+ use warnings;
+ use Cairo;
+
+-use Test::More tests => 6;
++use Test::More tests => 18;
+
+ use constant IMG_WIDTH => 256;
+ use constant IMG_HEIGHT => 256;
+@@ -40,14 +34,7 @@ my $expected_path = [
+ ];
+
+ my $path = $cr->copy_path;
+-is_deeply ($path, $expected_path);
+-
+-sub paths_agree {
+- my ($cr, $path, $expected_path) = @_;
+- $cr->new_path;
+- $cr->append_path ($path);
+- is_deeply ($cr->copy_path, $expected_path);
+-}
++paths_agree ($path, $expected_path);
+
+ # Modifying single point values.
+ foreach ($path, $expected_path) {
+@@ -57,21 +44,21 @@ foreach ($path, $expected_path) {
+ $_->[2]{points}[2][0] = 99;
+ $_->[2]{points}[2][1] = 1010;
+ }
+-paths_agree ($cr, $path, $expected_path);
++path_round_trip_ok ($cr, $path, $expected_path);
+
+ # Modifying single points.
+ foreach ($path, $expected_path) {
+ $_->[1]{points}[0] = [333, 444];
+ $_->[2]{points}[2] = [77, 88];
+ }
+-paths_agree ($cr, $path, $expected_path);
++path_round_trip_ok ($cr, $path, $expected_path);
+
+ # Replacing all points.
+ foreach ($path, $expected_path) {
+ $_->[1]{points} = [[3333, 4444]];
+ $_->[2]{points} = [[55, 66], [77, 88], [99, 1010]];
+ }
+-paths_agree ($cr, $path, $expected_path);
++path_round_trip_ok ($cr, $path, $expected_path);
+
+ # Replacing and adding path segments.
+ my @cloned_path = @{$path};
+@@ -86,9 +73,24 @@ foreach (\@cloned_path, $expected_path) {
+ type => 'line-to',
+ points => [[23, 42]] };
+ }
+-paths_agree ($cr, \@cloned_path, $expected_path);
++path_round_trip_ok ($cr, \@cloned_path, $expected_path);
+
+ # Passing bare arrays into Cairo.
+ $cr->new_path;
+ $cr->append_path ($expected_path);
+-is_deeply ($cr->copy_path, $expected_path);
++paths_agree ($cr->copy_path, $expected_path);
++
++sub path_round_trip_ok {
++ my ($cr, $path, $expected_path) = @_;
++ $cr->new_path;
++ $cr->append_path ($path);
++ paths_agree ($cr->copy_path, $expected_path);
++}
++
++sub paths_agree {
++ my ($path, $expected_path) = @_;
++ # Only the first three entries seem to be reliable across cairo versions.
++ for (0..2) {
++ is_deeply ($path->[$_], $expected_path->[$_]);
++ }
++}
+--
+cgit v0.9.0.2
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/perl-Cairo/perl-Cairo.spec?r1=1.21&r2=1.22
More information about the pld-cvs-commit
mailing list