Re: [Gegl-developer] pygegl make fails

2009-02-19 Thread Hubert Figuiere
On 02/19/2009 11:03 AM, Scott Gorlin wrote:
 I'm trying to build the python bindings without much success. babl and
 gegl are successfully installed from svn, but I get the error below when
 making pygegl. I'm running Ubuntu 8.10 w/ python 2.5 on a dell latitude
 d620. Any suggestions?


Are you sure the python bindings are up to date with the API changes in 
trunk?


Hub
___
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer


Re: [Gegl-developer] GEGL 0.0.22

2008-12-31 Thread Hubert Figuiere
On Wed, 2008-12-31 at 17:05 +, Øyvind Kolås wrote:
 d34a30cfccc8322dfe4198d26cf6bfc0210f141b  glib-2.18.1.tar.bz2

Do we really need that recent version of glib? Because that mean only
the very latest distro users can use GEGL. No openSUSE 11.0 for example
(released just before GUADEC to give a time frame)



Hub

___
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer


Re: [Gegl-developer] libopenraw support

2008-08-16 Thread Hubert Figuiere
On Sun, 2008-08-17 at 00:25 +0100, Øyvind Kolås wrote:
 On Fri, Aug 1, 2008 at 2:44 AM, Hubert Figuiere [EMAIL PROTECTED] wrote:
  Here is my patch to provide (optional) libopenraw support to GEGL.
 
  Is it OK to commit?
 
 Feel free.

Done. Thanks.

There'll be some more improvements in the future when I release a newer
verison of libopenraw.

Hub

___
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer


[Gegl-developer] geglmm

2008-05-18 Thread Hubert Figuiere
Hi,

just a quick not to announce that I have a rough version of geglmm, the
C++ bindings for GEGL, in SVN:

svn+ssh://svn.gnome.org/svn/gnomemm/geglmm/trunk

The current version if probably very rough and buggy.

Hub


signature.asc
Description: This is a digitally signed message part
___
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer


[Gegl-developer] Patch: GIO dependency made optionnal

2008-05-17 Thread Hubert Figuiere
Hi

Here is my initial patch for GEGL to make gio an optional dependency for
those who run an already obsolete version of glib.

The only non-trivial part is GFileMonitor, and I actually scraped that
part.

Also another caveat is that I had to change the prototype of two
functions that wanted a GInputStream *. 

Any comment?

Hub

PS: there might also be some indent issues. Will fix them.
Index: configure.ac
===
--- configure.ac	(revision 2307)
+++ configure.ac	(working copy)
@@ -39,7 +39,7 @@
 
 # required versions of external libraries
 m4_define([babl_required_version], [0.0.20])
-m4_define([glib_required_version], [2.16.1])
+m4_define([glib_required_version], [2.12.0])
 m4_define([gtk_required_version], [2.8.6])
 m4_define([lua_required_version], [5.1.0])
 m4_define([cairo_required_version], [0.0.0])
@@ -434,7 +434,7 @@
 
 PKG_CHECK_MODULES(BABL, babl = babl_required_version)
 
-GLIB_PACKAGES=gobject-2.0 gmodule-2.0 gio-2.0
+GLIB_PACKAGES=gobject-2.0 gmodule-2.0 
 AC_SUBST(GLIB_PACKAGES)
 
 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and 
@@ -453,6 +453,12 @@
 *** Errors follow:
 $DEP_PKG_ERRORS]))
 
+PKG_CHECK_MODULES(GIO, gio-2.0, 
+	have_gio=yes
+	AC_DEFINE(HAVE_GIO, 1, [Define to 1 to compile with gio support.]),
+	have_gio=no (gio not found))
+AM_CONDITIONAL(HAVE_GIO, test x$have_gio = xyes)
+
 # Rerun PKG_CONFIG to add gthread-2.0 cflags and libs
 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
 DEP_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES gthread-2.0`
@@ -849,6 +855,7 @@
 
 Optional dependencies:
   GTK+:   $have_gtk
+  GIO:$have_gio
   Ruby:   $have_ruby
   Lua:$have_lua
   Cairo:  $have_cairo
Index: gegl/gegl-init.c
===
--- gegl/gegl-init.c	(revision 2307)
+++ gegl/gegl-init.c	(working copy)
@@ -227,7 +227,9 @@
 }
 
 void gegl_tile_backend_ram_stats (void);
+#if HAVE_GIO
 void gegl_tile_backend_tiledir_stats (void);
+#endif
 void gegl_tile_backend_file_stats (void);
 
 void
@@ -256,7 +258,9 @@
   gegl_buffer_stats ();
   gegl_tile_backend_ram_stats ();
   gegl_tile_backend_file_stats ();
+#if HAVE_GIO
   gegl_tile_backend_tiledir_stats ();
+#endif
 }
   global_time = gegl_ticks () - global_time;
   gegl_instrument (gegl, gegl, global_time);
Index: gegl/buffer/gegl-buffer-load.c
===
--- gegl/buffer/gegl-buffer-load.c	(revision 2307)
+++ gegl/buffer/gegl-buffer-load.c	(working copy)
@@ -21,7 +21,14 @@
 #include string.h
 #include errno.h
 
+#if HAVE_GIO
 #include gio/gio.h
+#else
+#include sys/types.h
+#include sys/stat.h
+#include fcntl.h
+#include unistd.h
+#endif
 #include glib-object.h
 
 #include gegl-types.h
@@ -49,8 +56,12 @@
   GeglBufferHeader header;
   GList   *tiles;
   gchar   *path;
+#if HAVE_GIO
   GFile   *file;
   GInputStream*i;
+#else
+  int  i;
+#endif
   gint tile_size;
   Babl*format;
   goffset  offset;
@@ -62,7 +73,11 @@
 {
   info-offset = offset;
   GEGL_NOTE (BUFFER_LOAD, seek to %i, offset);
+#if HAVE_GIO
   if(!g_seekable_seek (G_SEEKABLE (info-i), info-offset, G_SEEK_SET, NULL, NULL))
+#else
+  if(lseek (info-i, info-offset, SEEK_SET) == -1)
+#endif
 {
   g_warning (failed seeking);
 }
@@ -75,11 +90,15 @@
 return;
   if (info-path)
 g_free (info-path);
+#if HAVE_GIO
   if (info-i)
 g_object_unref (info-i);
   if (info-file)
 g_object_unref (info-file);
-
+#else
+  if (info-i != -1)
+close (info-i);
+#endif
   if (info-tiles != NULL)
 {
   GList *iter;
@@ -93,24 +112,42 @@
   g_slice_free (LoadInfo, info);
 }
 
+#if HAVE_GIO
 GeglBufferItem *
 gegl_buffer_read_header (GInputStream *i,
  goffset  *offset)
+#else
+GeglBufferItem *
+gegl_buffer_read_header (int i,
+ goffset  *offset)
+#endif
 {
   goffset placeholder;
   GeglBufferItem *ret;
   if (offset==0)
 offset = placeholder;
 
+#if HAVE_GIO
   if(!g_seekable_seek (G_SEEKABLE (i), 0, G_SEEK_SET, NULL, NULL))
-  g_warning (failed seeking to %i, 0);
+#else
+  if(lseek(i, 0, SEEK_SET) == -1)
+#endif
+g_warning (failed seeking to %i, 0);
   *offset = 0;
 
   ret = g_malloc (sizeof (GeglBufferHeader));
+#if HAVE_GIO
   *offset += g_input_stream_read (i,
((gchar*)ret),
sizeof(GeglBufferHeader),
NULL, NULL);
+#else
+  {
+ssize_t sz_read = read(i, ret, sizeof(GeglBufferHeader));
+if (sz_read != -1)
+  *offset += sz_read;
+  }
+#endif
 
   GEGL_NOTE (BUFFER_LOAD, read header: tile-width: %i tile-height: %i next:%i  %ix%i\n,
ret-header.tile_width,
@@ -135,22 +172,39 @@
  * is passed in the offset stored at the location is used as the