diff --git a/gimp-new-libpng.patch b/gimp-new-libpng.patch new file mode 100644 index 0000000..c5e597d --- /dev/null +++ b/gimp-new-libpng.patch @@ -0,0 +1,39 @@ +From b22eb0a8271a99257fe214cbf0adda29cf9a39dd Mon Sep 17 00:00:00 2001 +From: Michael Natterer +Date: Sun, 31 Jan 2010 11:28:02 +0000 +Subject: Bug 607242 - GIMP 2.7.0 fails to build against libpng 1.4.0 + +Use png_set_expand_gray_1_2_4_to_8() instead of the deprecated +png_set_gray_1_2_4_to_8() if libpng is at least 1.2.27 (which is in +debian stable), so plug-ins built against old versions contine to work +when libpng 1.4 gets installed. +--- +diff --git a/plug-ins/file-ico/ico-load.c b/plug-ins/file-ico/ico-load.c +index 79512ae..4d894be 100644 +--- a/plug-ins/file-ico/ico-load.c ++++ b/plug-ins/file-ico/ico-load.c +@@ -287,14 +287,22 @@ ico_read_png (FILE *fp, + switch (color_type) + { + case PNG_COLOR_TYPE_GRAY: ++#if PNG_LIBPNG_VER < 10227 + png_set_gray_1_2_4_to_8 (png_ptr); ++#else ++ png_set_expand_gray_1_2_4_to_8 (png_ptr); ++#endif + if ( bit_depth == 16 ) + png_set_strip_16 (png_ptr); + png_set_gray_to_rgb (png_ptr); + png_set_add_alpha (png_ptr, 0xff, PNG_FILLER_AFTER); + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: ++#if PNG_LIBPNG_VER < 10227 + png_set_gray_1_2_4_to_8 (png_ptr); ++#else ++ png_set_expand_gray_1_2_4_to_8 (png_ptr); ++#endif + if ( bit_depth == 16 ) + png_set_strip_16 (png_ptr); + png_set_gray_to_rgb (png_ptr); +-- +cgit v0.8.3.1 diff --git a/gimp.changes b/gimp.changes index 091cf9e..c0be0b2 100644 --- a/gimp.changes +++ b/gimp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 6 12:40:10 CEST 2010 - vuntz@opensuse.org + +- Add gimp-new-libpng.patch to fix build with newer libpng. + ------------------------------------------------------------------- Fri Dec 11 15:43:28 CET 2009 - vuntz@opensuse.org diff --git a/gimp.spec b/gimp.spec index 6be08cf..3ac5af9 100644 --- a/gimp.spec +++ b/gimp.spec @@ -1,7 +1,7 @@ # # spec file for package gimp (Version 2.6.8) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 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 @@ -48,7 +48,7 @@ BuildRequires: update-desktop-files BuildRequires: xorg-x11-libXfixes-devel Url: http://www.gimp.org/ Version: 2.6.8 -Release: 1 +Release: 2 License: GPLv2+ Group: Productivity/Graphics/Bitmap Editors Suggests: AdobeICCProfiles @@ -59,6 +59,8 @@ Requires: gtk2 Summary: The GNU Image Manipulation Program Source: ftp://ftp.gimp.org/pub/gimp/v2.6/%{name}-%{version}.tar.bz2 Source1: macros.gimp +# PATCH-FIX-UPSTREAM gimp-new-libpng.patch vuntz@opensuse.org -- Taken from upstream, fix build with recent libpng +Patch0: gimp-new-libpng.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-branding >= 2.4 Recommends: %{name}-plugins-python = %{version} gimp-2.0-scanner-plugin %{name}-help-browser @@ -174,6 +176,7 @@ translation-update-upstream po-python gimp20-python translation-update-upstream po-script-fu gimp20-script-fu translation-update-upstream po-plug-ins gimp20-std-plug-ins translation-update-upstream po-tips gimp20-tips +%patch0 -p1 # Safety check for ABI version change. vabi=`printf "%d" $(sed -n '/#define GIMP_MODULE_ABI_VERSION/{s/.* //;p}' libgimpmodule/gimpmodule.h)` if test "x${vabi}" != "x%{abiver}"; then