rpms/gnome-scan/F-12 gnome-scan_babl-0.1.0_api.patch, NONE, 1.1 gnome-scan.spec, 1.13, 1.14
Deji Akingunola
deji at fedoraproject.org
Fri Jan 15 14:59:30 UTC 2010
Author: deji
Update of /cvs/pkgs/rpms/gnome-scan/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11935
Modified Files:
gnome-scan.spec
Added Files:
gnome-scan_babl-0.1.0_api.patch
Log Message:
* Fri Jan 15 2010 Deji Akingunola <dakingun at gmail.com> - 0.6.2-3
- Patch to build with babl-0.1.0 api by Caolan McNamara
gnome-scan_babl-0.1.0_api.patch:
flegita-gimp-sink.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
--- NEW FILE gnome-scan_babl-0.1.0_api.patch ---
--- src/flegita-gimp-sink.c 2009-01-31 11:18:50.000000000 -0500
+++ src/flegita-gimp-sink.c.new 2010-01-15 09:20:56.300741963 -0500
@@ -46,7 +46,7 @@
const GeglRectangle *extent;
GeglRectangle actual_extent;
gdouble res;
- BablFormat *format;
+ Babl *format;
guint image_type;
GimpPixelRgn rgn;
gpointer iter;
@@ -136,13 +136,13 @@
fgs_create_image(FlegitaGimpSink *sink)
{
FlegitaGimpSinkPrivate *priv = GET_PRIVATE (sink);
- BablFormat *format = NULL;
+ Babl *format = NULL;
guint image_type = 0;
guint image_base_type = 0;
g_object_get (priv->buffer, "format", &format, NULL);
- switch (format->components) {
+ switch (babl_format_get_n_components(format)) {
case 1:
image_type = GIMP_GRAY_IMAGE;
image_base_type = GIMP_GRAY;
@@ -164,17 +164,19 @@
/* Compute babl format and update layer type according to image type
(not incomming gegl buffer type) */
-static BablFormat*
+static Babl*
fgs_compute_babl_format(FlegitaGimpSink *sink)
{
FlegitaGimpSinkPrivate *priv = GET_PRIVATE (sink);
- BablFormat *format = NULL;
+ Babl *format = NULL;
gchar*format_name = NULL;
gint i;
gint bps;
g_object_get (priv->buffer, "format", &format, NULL);
- bps = format->type[0]->bits;
+ bps = 8;
+ if (babl_format_get_type (format, 0) != babl_type ("u8"))
+ bps = 16;
switch (gimp_image_base_type(sink->image_ID)) {
case GIMP_GRAY:
@@ -187,16 +189,15 @@
break;
}
- for (i = 0; i < format->components; i++) {
- g_debug (G_STRLOC ": component %i:%s use %i bits",i,
- format->type[i]->instance.name,
- format->type[i]->bits);
+ for (i = 0; i < babl_format_get_n_components(format); i++) {
+ g_debug (G_STRLOC ": component %i:%s",i,
+ babl_get_name(babl_format_get_type(format, i)));
}
format_name = g_strdup_printf ("%s u%i", format_name, bps > 8 ? 16 : bps);
g_debug("Format is %s", format_name);
- return (BablFormat*) babl_format (format_name);
+ return (Babl*) babl_format (format_name);
}
@@ -278,7 +279,7 @@
FlegitaGimpSinkPrivate *priv = GET_PRIVATE (plugin);
GimpPixelRgn *rgn = &priv->rgn;
- gint chunk_size = rgn->w * rgn->h * priv->format->bytes_per_pixel;
+ gint chunk_size = rgn->w * rgn->h * babl_format_get_bytes_per_pixel(priv->format);
GeglRectangle rect = {
.x = rgn->x + priv->extent->x,
.y = rgn->y + priv->extent->y,
Index: gnome-scan.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-scan/F-12/gnome-scan.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- gnome-scan.spec 25 Jul 2009 00:45:43 -0000 1.13
+++ gnome-scan.spec 15 Jan 2010 14:59:30 -0000 1.14
@@ -1,11 +1,12 @@
Summary: Gnome solution for scanning in the desktop on top of libsane
Name: gnome-scan
Version: 0.6.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Applications/System
License: LGPLv2+
URL: http://home.gna.org/gnomescan/
Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.6/%{name}-%{version}.tar.bz2
+Patch0: gnome-scan_babl-0.1.0_api.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel libgnomeui-devel sane-backends-devel
BuildRequires: gegl-devel gimp-devel
@@ -42,6 +43,7 @@ Contains development headers and librari
%prep
%setup -q
+%patch0 -p0 -b .babl
%build
%configure --disable-static
@@ -108,6 +110,9 @@ fi
%doc %{_datadir}/gtk-doc/html/gnome-scan*/
%changelog
+* Fri Jan 15 2010 Deji Akingunola <dakingun at gmail.com> - 0.6.2-3
+- Patch to build with babl-0.1.0 api by Caolan McNamara
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list