[GREYCstoration] fix building with libpng-1.5

Nils Philippsen nphilipp at fedoraproject.org
Fri Dec 16 17:27:32 UTC 2011


commit 37c71b660b3f02d34fdbcda1f312ebf6b02eea0e
Author: Nils Philippsen <nils at redhat.com>
Date:   Fri Dec 16 18:27:19 2011 +0100

    fix building with libpng-1.5

 GREYCstoration-2.8-libpng15.patch |   21 +++++++++++++++++++++
 GREYCstoration.spec               |    5 ++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/GREYCstoration-2.8-libpng15.patch b/GREYCstoration-2.8-libpng15.patch
new file mode 100644
index 0000000..2bf4ffc
--- /dev/null
+++ b/GREYCstoration-2.8-libpng15.patch
@@ -0,0 +1,21 @@
+diff -up GREYCstoration-2.8/src/CImg.h.libpng15 GREYCstoration-2.8/src/CImg.h
+--- GREYCstoration-2.8/src/CImg.h.libpng15	2008-03-10 12:03:44.000000000 +0100
++++ GREYCstoration-2.8/src/CImg.h	2011-12-16 16:55:04.920360352 +0100
+@@ -23454,7 +23454,7 @@ namespace cimg_library {
+       png_uint_32 W, H;
+       int bit_depth, color_type, interlace_type;
+       png_get_IHDR(png_ptr, info_ptr, &W, &H, &bit_depth, &color_type, &interlace_type,
+-                   int_p_NULL, int_p_NULL);
++                   NULL, NULL);
+       int new_bit_depth = bit_depth;
+       int new_color_type = color_type;
+ 
+@@ -23465,7 +23465,7 @@ namespace cimg_library {
+         new_bit_depth = 8;
+       }
+       if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
+-        png_set_gray_1_2_4_to_8(png_ptr);
++        png_set_expand_gray_1_2_4_to_8(png_ptr);
+         new_bit_depth = 8;
+       }
+       if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
diff --git a/GREYCstoration.spec b/GREYCstoration.spec
index f70748c..c4e35d4 100644
--- a/GREYCstoration.spec
+++ b/GREYCstoration.spec
@@ -8,6 +8,7 @@ URL:            http://www.greyc.ensicaen.fr/~dtschump/greycstoration/index.html
 Source0:        http://dl.sf.net/cimg/%{name}-%{version}.zip
 Source1:        %{name}.png
 Patch0:         GREYCstoration-2.8-fixmakefile.patch
+Patch1:         GREYCstoration-2.8-libpng15.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  gimp-devel gimp
 BuildRequires:  desktop-file-utils
@@ -55,7 +56,8 @@ This package contains the GREYCstoration GUI.
 
 %prep
 %setup -q
-%patch0 -p1
+%patch0 -p1 -b .fixmakefile
+%patch1 -p1 -b .libpng15
 # Include path for CImg.h is wrong, fix it.
 sed -i -r "s|#include \"../CImg.h\"|#include \"CImg.h\"|" src/greycstoration*.cpp
 iconv -f iso-8859-1 -t utf-8 Licence_CeCILL_V2-en.txt > Licence_CeCILL_V2-en.txt.conv
@@ -138,6 +140,7 @@ fi
 %changelog
 * Fri Dec 16 2011 Nils Philippsen <nils at redhat.com> - 2.8-8
 - rebuild for GIMP 2.7
+- fix building with libpng-1.5
 
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 2.8-7
 - Rebuild for new libpng


More information about the scm-commits mailing list