[freeimage] 01/01: ix FTBFS against libpng1.6. (Closes: #742560)

Anton Gladky gladk at moszumanska.debian.org
Mon Jan 25 14:08:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch debian/sid
in repository freeimage.

commit 1eabb75b9ddf0ebefc2bd9f4defd1d75872a794e
Author: Tobias Frost <tobi at debian.org>
Date:   Mon Jan 25 15:08:21 2016 +0100

    ix FTBFS against libpng1.6. (Closes: #742560)
---
 debian/patches/libpng16.patch | 39 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/libpng16.patch b/debian/patches/libpng16.patch
new file mode 100644
index 0000000..22b6792
--- /dev/null
+++ b/debian/patches/libpng16.patch
@@ -0,0 +1,39 @@
+Description: fix FTBFS against libpng1.6
+Author: Tobias Frost <tobi at debian.org>
+Bug-Debian: https://bugs.debian.org/742560
+Last-Update: 2016-01-25
+
+--- a/Source/FreeImage/PluginPNG.cpp
++++ b/Source/FreeImage/PluginPNG.cpp
+@@ -713,11 +713,19 @@
+
+                       if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) {
+                               png_charp profile_name = NULL;
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++                              png_bytepp profile_data = NULL;
++#else
+                               png_charp profile_data = NULL;
++#endif
+                               png_uint_32 profile_length = 0;
+                               int  compression_type;
+
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++                              png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, profile_data, &profile_length);
++#else
+                               png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &profile_length);
++#endif
+
+                               // copy ICC profile data (must be done after FreeImage_AllocateHeader)
+
+@@ -1000,7 +1008,11 @@
+
+                       FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib);
+                       if (iccProfile->size && iccProfile->data) {
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++                              //png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_const_bytep)iccProfile->data, iccProfile->size);
++#else
+                               png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_charp)iccProfile->data, iccProfile->size);
++#endif
+                       }
+
+                       // write metadata
diff --git a/debian/patches/series b/debian/patches/series
index f756876..f5dab4d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ Fix-missing-cstdio-include-in-testsuite.patch
 Fix-endianness-detection.patch
 Fix-CVE-2015-0852.patch
 Fix-encoding-of-fi-header.patch
+libpng16.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freeimage.git



More information about the debian-science-commits mailing list