Accepting request 37078 from GNOME:Apps

Copy from GNOME:Apps/gimp based on submit request 37078 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/37078
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gimp?expand=0&rev=40
This commit is contained in:
OBS User autobuild 2010-04-06 20:23:15 +00:00 committed by Git OBS Bridge
parent eae45dc8fb
commit d457e61b18
3 changed files with 49 additions and 2 deletions

39
gimp-new-libpng.patch Normal file
View File

@ -0,0 +1,39 @@
From b22eb0a8271a99257fe214cbf0adda29cf9a39dd Mon Sep 17 00:00:00 2001
From: Michael Natterer <mitch@gimp.org>
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

View File

@ -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

View File

@ -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