[ufraw] use new GIMP 2.8 API if available

Nils Philippsen nphilipp at fedoraproject.org
Fri Mar 16 12:16:10 UTC 2012


commit b9711604b1ede00edc2cbecaad9f383d591f8a6d
Author: Nils Philippsen <nils at redhat.com>
Date:   Fri Mar 16 13:15:23 2012 +0100

    use new GIMP 2.8 API if available

 ufraw-0.18-gimp-2.8.patch |   40 ++++++++++++++++++++++++++++++++++++++++
 ufraw.spec                |    8 +++++++-
 2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/ufraw-0.18-gimp-2.8.patch b/ufraw-0.18-gimp-2.8.patch
new file mode 100644
index 0000000..d10bd78
--- /dev/null
+++ b/ufraw-0.18-gimp-2.8.patch
@@ -0,0 +1,40 @@
+From be156caff9b57a45bb1f9e4491b1d40e47675b67 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Fri, 16 Mar 2012 12:34:33 +0100
+Subject: [PATCH] patch: gimp-2.8
+
+Squashed commit of the following:
+
+commit 5c50f3be8e1f665e4a7b071b09738e00a1f6adb1
+Author: nkbj <nkbj>
+Date:   Sat Dec 3 05:30:20 2011 +0000
+
+    Update code for GIMP 2.8 (tested with GIMP 2.7.3).
+    (cherry picked from commit 681d2e46e0b0fbcc601068025cf3dbcd3c5bdb9b)
+---
+ ufraw-gimp.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/ufraw-gimp.c b/ufraw-gimp.c
+index c393336..b5ed51c 100644
+--- a/ufraw-gimp.c
++++ b/ufraw-gimp.c
+@@ -361,7 +361,15 @@ long ufraw_save_gimp_image(ufraw_data *uf, GtkWidget *widget)
+     layer = gimp_layer_new(uf->gimpImage, _("Background"), Crop.width,
+                            Crop.height, depth == 3 ? GIMP_RGB_IMAGE : U16_RGB_IMAGE,
+                            100.0, GIMP_NORMAL_MODE);
++#ifdef UFRAW_CINEPAINT
++    gimp_image_add_layer(uf->gimpImage, layer, 0);
++#else
++#if defined(GIMP_CHECK_VERSION) && GIMP_CHECK_VERSION(2,7,2)
++    gimp_image_insert_layer(uf->gimpImage, layer, 0, 0);
++#else
+     gimp_image_add_layer(uf->gimpImage, layer, 0);
++#endif
++#endif
+ 
+     /* Get the drawable and set the pixel region for our load... */
+     drawable = gimp_drawable_get(layer);
+-- 
+1.7.7.6
+
diff --git a/ufraw.spec b/ufraw.spec
index 9bfe919..f33ec7f 100644
--- a/ufraw.spec
+++ b/ufraw.spec
@@ -36,7 +36,7 @@
 Summary: Raw image data retrieval tool for digital cameras
 Name: ufraw
 Version: 0.18
-Release: 8%{?dist}
+Release: 9%{?dist}
 Group: Applications/Multimedia
 License: GPLv2+
 URL: http://ufraw.sourceforge.net
@@ -47,6 +47,8 @@ Patch0: ufraw-0.18-darkframe.patch
 # https://sourceforge.net/tracker/?func=detail&aid=3310116&group_id=127649&atid=709086
 # backported from upstream CVS
 Patch1: ufraw-0.18-crop-area.patch
+# backported from upstream CVS
+Patch2: ufraw-0.18-gimp-2.8.patch
 BuildRequires: gimp-devel >= 2.2
 BuildRequires: gimp >= 2.2
 %if %{with cinepaint}
@@ -151,6 +153,7 @@ EOF
 %setup -q
 %patch0 -p1 -b .darkframe
 %patch1 -p1 -b .crop-area
+%patch2 -p1 -b .gimp-2.8
 
 #./autogen.sh
 
@@ -237,6 +240,9 @@ update-desktop-database >& /dev/null || :
 %endif
 
 %changelog
+* Fri Mar 16 2012 Nils Philippsen <nils at redhat.com> - 0.18-9
+- use new GIMP 2.8 API if available
+
 * Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.18-8
 - Rebuilt for c++ ABI breakage
 


More information about the scm-commits mailing list