rpms/gnome-scan/devel gnome-scan-latest_gegl.patch, NONE, 1.1 gnome-scan.spec, 1.2, 1.3

Deji Akingunola (deji) fedora-extras-commits at redhat.com
Thu Jan 10 16:48:12 UTC 2008


Author: deji

Update of /cvs/pkgs/rpms/gnome-scan/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20455

Modified Files:
	gnome-scan.spec 
Added Files:
	gnome-scan-latest_gegl.patch 
Log Message:
* Thu Jan 10 2008 Deji Akingunola <dakingun at gmail.com> - 0.5.3-0.2.20071030svn
- Fixed to build with latest gegl 


gnome-scan-latest_gegl.patch:

--- NEW FILE gnome-scan-latest_gegl.patch ---
--- trunk/src/flegita-gimp-sink.c	2007/09/23 17:48:14	447
+++ trunk/src/flegita-gimp-sink.c	2007/12/11 18:06:10	464
@@ -43,7 +43,8 @@
 	gint32  		layer;
 	gchar 			*layer_name;
 	GimpDrawable	*drawable;
-	GeglRectangle	*extent;
+	const GeglRectangle	*extent;
+	GeglRectangle	actual_extent;
 	BablFormat		*format;
 	GimpPixelRgn	rgn;
 	gpointer		iter;
@@ -165,12 +166,15 @@
 	gchar*format_name = NULL;
 	gint i;
 
-	if (!gegl_buffer_pixel_count (priv->buffer)) {
+	if (!gegl_buffer_get_pixel_count (priv->buffer)) {
 		g_warning (G_STRLOC ": No image to process !");
 		return FALSE;
 	}
 
-	priv->extent = gegl_buffer_extent (priv->buffer);
+	priv->extent = gegl_buffer_get_extent (priv->buffer);
+	priv->actual_extent.width = priv->extent->width - priv->extent->x;
+	priv->actual_extent.height = priv->extent->height - priv->extent->y;
+	
 	g_debug (G_STRLOC ": rect is %ix%i+%i+%i",
 			 priv->extent->width, priv->extent->height,
 			 priv->extent->x, priv->extent->y);
@@ -202,20 +206,20 @@
 
 	priv->layer = gimp_layer_new (sink->image_ID,
 								  priv->layer_name,
-								  priv->extent->width, priv->extent->height,
+								  priv->actual_extent.width, priv->actual_extent.height,
 								  image_type,
 								  opacity,
 								  GIMP_NORMAL_MODE);
 
 	priv->drawable = gimp_drawable_get (priv->layer);
 	gimp_pixel_rgn_init (&priv->rgn, priv->drawable, 0, 0,
-						 priv->extent->width, priv->extent->height,
+						 priv->actual_extent.width, priv->actual_extent.height,
 						 TRUE, FALSE);
 
 	if (sink->is_new) {
 		gimp_image_resize (sink->image_ID,
-						   MAX (priv->extent->width, gimp_image_width (sink->image_ID)),
-						   MAX (priv->extent->height, gimp_image_height (sink->image_ID)),
+						   MAX (priv->actual_extent.width, gimp_image_width (sink->image_ID)),
+						   MAX (priv->actual_extent.height, gimp_image_height (sink->image_ID)),
 						   0, 0);
 
 	}
@@ -231,7 +235,12 @@
 	GimpPixelRgn *rgn = &priv->rgn;
 
 	gint chunk_size = rgn->w * rgn->h * priv->format->bytes_per_pixel;
-	GeglRectangle rect = {rgn->x, rgn->y, rgn->w, rgn->h};
+	GeglRectangle rect = {
+		.x		= rgn->x + priv->extent->x,
+		.y		= rgn->y + priv->extent->y,
+		.width	= rgn->w,
+		.height	= rgn->h
+	};
 	guchar* chunk = g_new0 (guchar, chunk_size);
 
 	gegl_buffer_get (priv->buffer,
@@ -260,9 +269,10 @@
 						  -1);
 
 	gimp_image_undo_freeze (image);
+	/* center */
 	gimp_layer_translate (priv->layer,
-						  (gimp_image_width (image) - priv->extent->width) / 2,
-						  (gimp_image_height (image) - priv->extent->height) / 2);
+						  (gimp_image_width (image) - priv->actual_extent.width) / 2,
+						  (gimp_image_height (image) - priv->actual_extent.height) / 2);
 
 	gimp_image_undo_thaw (image);
 


Index: gnome-scan.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-scan/devel/gnome-scan.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnome-scan.spec	31 Oct 2007 05:39:45 -0000	1.2
+++ gnome-scan.spec	10 Jan 2008 16:47:35 -0000	1.3
@@ -1,7 +1,7 @@
 Summary:	Gnome solution for scanning in the desktop on top of libsane
 Name:		gnome-scan
 Version:	0.5.3
-Release:	0.1.20071030svn%{?dist}
+Release:	0.2.20071030svn%{?dist}
 Group:		Applications/System
 License:	LGPLv2+
 URL:		http://home.gna.org/gnomescan/
@@ -11,6 +11,7 @@
 #  svn co -r 458 http://svn.gnome.org/svn/gnome-scan/trunk/ gnome-scan-svn20071030
 #  cd gnome-scan-svn20071030 && ./autogen.sh && make distcheck
 Source0:	%{name}-%{version}.tar.bz2
+Patch0:		gnome-scan-latest_gegl.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	gtk2-devel libgnomeui-devel sane-backends-devel
 BuildRequires:	gegl-devel gimp-devel
@@ -46,6 +47,7 @@
 
 %prep
 %setup -q
+%patch0 -p0 -b .gegl
 
 %build
 %configure --disable-static
@@ -114,6 +116,9 @@
 %{_libdir}/pkgconfig/gnome-scan.pc
 
 %changelog
+* Thu Jan 10 2008 Deji Akingunola <dakingun at gmail.com> - 0.5.3-0.2.20071030svn
+- Fixed to build with latest gegl 
+
 * Tue Oct 30 2007 Deji Akingunola <dakingun at gmail.com> - 0.5.3-0.1.20071030svn
 - Update to a SVN snapshot that build against current gegl
 




More information about the fedora-extras-commits mailing list