From 94f50579cc8f8ab4fb1a551c6233a348f5eb5612 Mon Sep 17 00:00:00 2001
From: Tom Callaway <[email protected]>
Date: Thu, 1 Jun 2017 11:25:03 -0400
Subject: fix FTBFS, bz1457935

---
 perl-Image-Size-3.300-endian-fix.patch | 12 ++++++++++++
 perl-Image-Size.spec                   |  9 ++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 perl-Image-Size-3.300-endian-fix.patch

diff --git a/perl-Image-Size-3.300-endian-fix.patch 
b/perl-Image-Size-3.300-endian-fix.patch
new file mode 100644
index 0000000..e3a979f
--- /dev/null
+++ b/perl-Image-Size-3.300-endian-fix.patch
@@ -0,0 +1,12 @@
+diff -up Image-Size-3.300/lib/Image/Size.pm.endianfix 
Image-Size-3.300/lib/Image/Size.pm
+--- Image-Size-3.300/lib/Image/Size.pm.endianfix       2017-06-01 
11:22:58.895383664 -0400
++++ Image-Size-3.300/lib/Image/Size.pm 2017-06-01 11:23:10.462104933 -0400
+@@ -933,7 +933,7 @@ sub webpsize {
+     #    - frame meta, 8 bytes
+     #    - marker, 3 bytes
+     my $buf = $READ_IN->($img, 4, 26);
+-    my ($raw_w, $raw_h) = unpack 'SS', $buf;
++    my ($raw_w, $raw_h) = unpack '(SS)<', $buf;
+     my $b14 = 2**14 - 1;
+ 
+     # The width and height values contain a 2-bit scaling factor,
diff --git a/perl-Image-Size.spec b/perl-Image-Size.spec
index a61af20..be4e8ce 100644
--- a/perl-Image-Size.spec
+++ b/perl-Image-Size.spec
@@ -1,10 +1,13 @@
 Name:           perl-Image-Size
 Version:        3.300
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Determine the size of images in several common formats in Perl
 License:        LGPLv2 or Artistic 2.0
 URL:            http://search.cpan.org/dist/Image-Size/
 Source0:        
http://www.cpan.org/authors/id/R/RJ/RJRAY/Image-Size-%{version}.tar.gz
+# WEBP: use proper endian-agnostic extractor 
+# 
https://github.com/rjray/image-size/commit/37609b9079cc2449589fa436baa2e08a3e2b427d
+Patch0:         perl-Image-Size-3.300-endian-fix.patch
 BuildArch:      noarch
 BuildRequires:  perl
 BuildRequires:  perl-generators
@@ -40,6 +43,7 @@ the formats supported by it.
 
 %prep
 %setup -q -n Image-Size-%{version}
+%patch0 -p1 -b .endianfix
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor
@@ -62,6 +66,9 @@ make test
 
 
 %changelog
+* Thu Jun  1 2017 Tom Callaway <[email protected]> - 3.300-7
+- use proper endian-agnostic extractor (bz1457935)
+
 * Sat Feb 11 2017 Fedora Release Engineering <[email protected]> - 
3.300-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
 
-- 
cgit v1.1


        
https://src.fedoraproject.org/cgit/perl-Image-Size.git/commit/?h=master&id=94f50579cc8f8ab4fb1a551c6233a348f5eb5612
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to