Hello community,
here is the log from the commit of package perl-Tk for openSUSE:Factory checked in at 2013-03-10 08:38:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Tk (Old)
and /work/SRC/openSUSE:Factory/.perl-Tk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Tk", Maintainer is "DLovasko@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Tk/perl-Tk.changes 2011-10-25 16:59:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Tk.new/perl-Tk.changes 2013-03-10 08:38:36.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Feb 28 10:43:28 UTC 2013 - pgajdos@suse.com
+
+- builds also against libpng16
+ * libpng16.patch
+
+-------------------------------------------------------------------
New:
----
Tk-804.030-libpng16.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Tk.spec ++++++
--- /var/tmp/diff_new_pack.MKeMhm/_old 2013-03-10 08:38:38.000000000 +0100
+++ /var/tmp/diff_new_pack.MKeMhm/_new 2013-03-10 08:38:38.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Tk
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
#
-
Name: perl-Tk
BuildRequires: libpng-devel
BuildRequires: xkeyboard-config
@@ -31,11 +30,11 @@
BuildRequires: xorg-x11-server
%endif
Version: 804.030
-Release: 11
-License: (GPL-1.0+ or Artistic-1.0) and Zlib
+Release: 0
Summary: Perl Tk
-Url: http://cpan.org/modules/by-module/Tk/
+License: (GPL-1.0+ or Artistic-1.0) and Zlib
Group: Development/Libraries/Perl
+Url: http://cpan.org/modules/by-module/Tk/
Source: Tk-%{version}.tar.gz
Patch0: Tk-804.029-lib64.diff
Patch1: Tk-804.029-macro.diff
@@ -44,6 +43,9 @@
Patch4: Tk-804.029-event.diff
# PATCH-FIX-UPSTREAM compile with recent Xorg versions too - coolo@novell.com
Patch5: Tk-804.029-xorg.diff
+# PATCH-FIX-UPSTREAM Tk-804.030-libpng16.diff fix t/photo.t while building against libpng16: move setting gamma before png_read_update_info() -- pgajdos@suse.com
+# Slaven is notified, but didn't reply sofar. See correspondence in the patch preamble.
+Patch6: Tk-804.030-libpng16.diff
BuildRequires: perl
BuildRequires: perl-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -54,7 +56,6 @@
graphical library Tk with the powerful scripting language Perl.
%package devel
-License: (GPL-1.0+ or Artistic-1.0) and Zlib
Summary: Perl Tk
Group: Development/Libraries/Perl
Requires: %{name} = %{version}
@@ -74,6 +75,7 @@
%patch3
%patch4
%patch5
+%patch6
%build
find -name "*.orig" -exec rm {} \;
++++++ Tk-804.030-libpng16.diff ++++++
Move 'sRGB block' before png_read_update_info()
My email to Slaven, ccing Glenn:
================================
Hi Slaven,
when building perl-Tk against libpng16, t/photo.t test is failing
because:
# Failed test 'No error loading t/test.png as png'
# at t/photo.t line 45.
# got: 'invalid after png_start_read_image or
# png_read_update_info at
# /home/abuild/rpmbuild/BUILD/Tk-804.030/blib/lib/Tk/Image.pm
# line 21.
# '
# expected: ''
This is related to png_rtran_ok() check running at beginning of
libpng-1.6.0/pngrtran.c. Relevant code from perl-Tk is:
-----------------------------8<-----------------------------
if (png_set_strip_16 != NULL) {
png_set_strip_16(png_ptr);
} else if (bit_depth == 16) {
block.offset[1] = 2;
block.offset[2] = 4;
}
if (png_set_expand != NULL) {
png_set_expand(png_ptr);
}
png_read_update_info(png_ptr,info_ptr);
block.pixelSize = png_get_channels(png_ptr, info_ptr);
block.pitch = png_get_rowbytes(png_ptr, info_ptr);
if ((color_type & PNG_COLOR_MASK_COLOR) == 0) {
/* grayscale image */
block.offset[1] = 0;
block.offset[2] = 0;
}
block.width = width;
block.height = height;
if ((color_type & PNG_COLOR_MASK_ALPHA)
|| png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
/* with alpha channel */
block.offset[3] = block.pixelSize - 1;
} else {
/* without alpha channel */
block.offset[3] = 0;
}
#if defined(PNG_sRGB_SUPPORTED) || defined(PNG_gAMA_SUPPORTED)
#if defined(PNG_sRGB_SUPPORTED)
if (png_get_sRGB(png_ptr, info_ptr, &intent)) {
png_set_sRGB(png_ptr, info_ptr, intent);
} else {
#endif
#if defined(PNG_gAMA_SUPPORTED)
double gamma;
if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) {
gamma = 0.45455;
}
png_set_gamma(png_ptr, 1.0, gamma);
#endif
#if defined(PNG_sRGB_SUPPORTED)
}
#endif
#endif
-------------------------------->8------------------------
First, png_set_strip_16() and png_set_expand() are called. They
contain the check as well, nevertheless png_read_update_info() is
called after them. But, later on, there is png_set_gamma() is
invoked and it triggers png_app_error() with 'invalid after
png_start_read_image or png_read_update_info'.
CCing Glenn because my knowledge about libpng is tiny.
Thanks!
Petr
Glenn's reply:
==============
Date: Tue, 26 Feb 2013 08:07:23 -0500
From: Glenn Randers-Pehrson