[DevIL] Rebuild for new libpng (rhbz#751583)

Hans de Goede jwrdegoede at fedoraproject.org
Sun Nov 20 12:42:07 UTC 2011


commit 5908aeebc66b6885373dcd2e8a8a6f13dcb17761
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sun Nov 20 13:42:37 2011 +0100

    Rebuild for new libpng (rhbz#751583)

 DevIL-1.7.8-libpng15.patch |   28 ++++++++++++++++++++++++++++
 DevIL.spec                 |    8 +++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/DevIL-1.7.8-libpng15.patch b/DevIL-1.7.8-libpng15.patch
new file mode 100644
index 0000000..19edcb6
--- /dev/null
+++ b/DevIL-1.7.8-libpng15.patch
@@ -0,0 +1,28 @@
+--- devil-1.7.8/src-IL/src/il_png.c.orig	2011-11-05 18:21:39.980007624 -0400
++++ devil-1.7.8/src-IL/src/il_png.c	2011-11-05 18:46:18.644000033 -0400
+@@ -278,7 +278,11 @@
+ 
+ 	// Expand low-bit-depth grayscale images to 8 bits
+ 	if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER > 10400
++		png_set_expand_gray_1_2_4_to_8(png_ptr);
++#else
+ 		png_set_gray_1_2_4_to_8(png_ptr);
++#endif
+ 	}
+ 
+ 	// Expand RGB images with transparency to full alpha channels
+--- devil-1.7.8/src-IL/src/il_icon.c.orig	2011-11-05 18:21:27.560000432 -0400
++++ devil-1.7.8/src-IL/src/il_icon.c	2011-11-05 18:46:44.626000535 -0400
+@@ -525,7 +525,11 @@
+ 
+ 	// Expand low-bit-depth grayscale images to 8 bits
+ 	if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER > 10400
++		png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
++#else
+ 		png_set_gray_1_2_4_to_8(ico_png_ptr);
++#endif
+ 	}
+ 
+ 	// Expand RGB images with transparency to full alpha channels
diff --git a/DevIL.spec b/DevIL.spec
index abfb004..1c82e23 100644
--- a/DevIL.spec
+++ b/DevIL.spec
@@ -1,6 +1,6 @@
 Name:           DevIL
 Version:        1.7.8
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A cross-platform image library
 Group:          System Environment/Libraries
 License:        LGPLv2
@@ -9,6 +9,7 @@ Source0:        http://downloads.sourceforge.net/openil/%{name}-%{version}.tar.g
 Patch0:         DevIL-1.7.5-allegropicfix.patch
 Patch1:         DevIL-1.7.5-il_endian_h.patch
 Patch2:         DevIL-1.7.8-CVE-2009-3994.patch
+Patch3:         DevIL-1.7.8-libpng15.patch
 BuildRequires:  allegro-devel
 BuildRequires:  lcms-devel
 BuildRequires:  libGLU-devel
@@ -66,10 +67,12 @@ Development files for the libILUT component of DevIL
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 iconv -f iso8859-1 CREDITS -t utf8 > CREDITS.conv
 touch -r CREDITS CREDITS.conv
 mv CREDITS.conv CREDITS
 chmod -x src-IL/src/il_*.c
+sed -i 's|png12|png15|g' configure
 
 
 %build
@@ -131,6 +134,9 @@ fi
 
 
 %changelog
+* Sun Nov 20 2011 Hans de Goede <hdegoede at redhat.com> - 1.7.8-7
+- Rebuild for new libpng (rhbz#751583)
+
 * Fri Jul 15 2011 Hans de Goede <hdegoede at redhat.com> - 1.7.8-6
 - Rebuild for new allegro-4.4
 


More information about the scm-commits mailing list