rpms/gegl/devel gegl-compile_fix.patch, NONE, 1.1 gegl-envelopes.patch, NONE, 1.1 gegl-lua.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 gegl.spec, 1.1, 1.2 sources, 1.2, 1.3

Deji Akingunola (deji) fedora-extras-commits at redhat.com
Wed Dec 19 04:48:41 UTC 2007


Author: deji

Update of /cvs/pkgs/rpms/gegl/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24722

Modified Files:
	.cvsignore gegl.spec sources 
Added Files:
	gegl-compile_fix.patch gegl-envelopes.patch gegl-lua.patch 
Log Message:
* Sat Dec 08 2007 Deji Akingunola <dakingun at gmail.com> - 0.0.14-1
- Update to 0.0.14 release
- License change from GPLv2+ to GPLv3+


gegl-compile_fix.patch:

--- NEW FILE gegl-compile_fix.patch ---
--- gegl/graph/gegl-node.c	2007-11-11 18:56:52.000000000 -0500
+++ gegl/graph/gegl-node.c.new	2007-11-21 11:20:16.000000000 -0500
@@ -230,6 +230,7 @@
               const GValue *value,
               GParamSpec   *pspec)
 {
+  va_list var_args;
   GeglNode *node = GEGL_NODE (gobject);
   switch (property_id)
     {
@@ -239,7 +240,7 @@
 
       case PROP_OP_CLASS:
         gegl_node_set_op_class (node, g_value_get_string (value),
-                                NULL, NULL);
+                                NULL, var_args);
         break;
 
       case PROP_OPERATION:
--- operations/workshop/Makefile.am	2007-11-25 18:02:40.000000000 -0500
+++ operations/workshop/Makefile.am.new	2007-12-11 14:09:21.000000000 -0500
@@ -27,9 +27,12 @@
 	-$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) `pkg-config gstreamer-0.10 --libs --cflags`
 
 ff-save.so: ff-save.c $(GEGLHEADERS)
-	-$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) \
+	@if [ ! $(-z "$(AVCODEC_LIBS)") -o $(-z "$(AVFORMAT_LIBS)") ]; then \
+	echo $@;\
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) \
 		$(AVCODEC_CFLAGS) $(AVCODEC_LIBS) \
-		$(AVFORMAT_CFLAGS) $(AVFORMAT_LIBS) 
+		$(AVFORMAT_CFLAGS) $(AVFORMAT_LIBS);\
+	fi
 
 gtk-display.so: gtk-display.c $(GEGLHEADERS)
 	@[ ! -z "$(GTK_LIBS)" ] &&\
--- operations/workshop/Makefile.in	2007-12-08 05:04:09.000000000 -0500
+++ operations/workshop/Makefile.in.new	2007-12-11 14:09:34.000000000 -0500
@@ -657,9 +657,12 @@
 	-$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) `pkg-config gstreamer-0.10 --libs --cflags`
 
 ff-save.so: ff-save.c $(GEGLHEADERS)
-	-$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) \
+	@if [ ! $(-z "$(AVCODEC_LIBS)") -o $(-z "$(AVFORMAT_LIBS)") ]; then \
+	echo $@;\
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) \
 		$(AVCODEC_CFLAGS) $(AVCODEC_LIBS) \
-		$(AVFORMAT_CFLAGS) $(AVFORMAT_LIBS) 
+		$(AVFORMAT_CFLAGS) $(AVFORMAT_LIBS);\
+	fi
 
 gtk-display.so: gtk-display.c $(GEGLHEADERS)
 	@[ ! -z "$(GTK_LIBS)" ] &&\

gegl-envelopes.patch:

--- NEW FILE gegl-envelopes.patch ---
--- operations/workshop/envelopes.h.new	1969-12-31 19:00:00.000000000 -0500
+++ operations/workshop/envelopes.h	2007-12-08 09:31:48.000000000 -0500
@@ -0,0 +1,217 @@
+/* GEGL is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * GEGL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright 2007 Øyvind Kolås     <pippin at gimp.org>
+ */
+
+#define ANGLE_PRIME  95273
+#define RADIUS_PRIME 29537
+#define SCALE_PRIME 85643
+
+static gfloat   lut_cos[ANGLE_PRIME];
+static gfloat   lut_sin[ANGLE_PRIME];
+static gfloat   radiuses[RADIUS_PRIME];
+static gdouble  luts_computed = 0.0; 
+static gint     angle_no=0;
+static gint     radius_no=0;
+
+static void compute_luts(gdouble rgamma)
+{
+  gint i;
+  if (luts_computed==rgamma)
+    return;
+  luts_computed = rgamma;
+
+  for (i=0;i<ANGLE_PRIME;i++)
+    {
+      gfloat angle = (random() / (RAND_MAX*1.0)) * 3.141592653589793*2;
+      lut_cos[i] = cos(angle);
+      lut_sin[i] = sin(angle);
+    }
+  for (i=0;i<RADIUS_PRIME;i++)
+    {
+      radiuses[i] = pow(random() / (RAND_MAX*1.0), rgamma);
+    }
+}
+
+static inline void
+sample (gfloat *buf,
+        gint    width,
+        gint    height,
+        gint    x,
+        gint    y,
+        gfloat *dst)
+{
+  gfloat *pixel = (buf + ((width * y) + x) * 4);
+  gint c;
+
+  for (c=0;c<4;c++)
+    {
+      dst[c] = pixel[c];
+    }
+}
+
+static inline void
+sample_min_max (gfloat *buf,
+                gint    width,
+                gint    height,
+                gint    x,
+                gint    y,
+                gint    radius,
+                gint    samples,
+                gfloat *min,
+                gfloat *max)
+{
+  gfloat best_min[3];
+  gfloat best_max[3];
+  gfloat *center_pix = (buf + (width * y + x) * 4);
+
+  gint i, c;
+
+  for (c=0;c<3;c++)
+    {
+      best_min[c]=center_pix[c];
+      best_max[c]=center_pix[c];
+    }
+
+  for (i=0; i<samples; i++)
+    {
+      gint u, v;
+      gint angle;
+      gfloat rmag;
+retry:                      /* if we've sampled outside the valid image
+                               area, we grab another sample instead, this
+                               should potentially work better than mirroring
+                               or extending the image
+                             */
+      angle = angle_no++;
+      rmag = radiuses[radius_no++] * radius;
+
+      if (angle_no>=ANGLE_PRIME)
+        angle_no=0;
+      if (radius_no>=RADIUS_PRIME)
+        radius_no=0;
+
+      u = x + rmag * lut_cos[angle];
+      v = y + rmag * lut_sin[angle];
+
+      if (u>=width ||
+          u<0 ||
+          v>=height ||
+          v<0)
+        goto retry;
+
+      {
+        gfloat pixel[4];
+
+        sample (buf, width, height, u, v, pixel);
+
+        if (pixel[3]>0.0)
+          {
+            for (c=0;c<3;c++)
+              {
+                if (pixel[c]<best_min[c])
+                  best_min[c]=pixel[c];
+
+                if (pixel[c]>best_max[c])
+                  best_max[c]=pixel[c];
+              }
+          }
+        else
+          {
+            goto retry;
+          }
+      }
+    }
+  for (c=0;c<3;c++)
+    {
+      min[c]=best_min[c];
+      max[c]=best_max[c];
+    }
+}
+
+static void compute_envelopes (gfloat  *buf,
+                               gint     width,
+                               gint     height,
+                               gint     x,
+                               gint     y,
+                               gint     radius,
+                               gint     samples,
+                               gint     iterations,
+                               gboolean same_spray,
+                               gdouble  rgamma,
+                               gfloat  *min_envelope,
+                               gfloat  *max_envelope)
+{
+  gint    i;
+  gint    c;
+  /*gfloat  range_avg[4]  = {0,0,0,0};*/
+  gfloat  dark_avg[4]   = {0,0,0,0};
+  gfloat  bright_avg[4] = {0,0,0,0};
+  /*gfloat *pixel = buf + (width*y+x)*4;*/
+
+  compute_luts(rgamma);
+
+  if (same_spray)
+    {
+      angle_no = 0;
+      radius_no = 0;
+    }
+
+  for (i=0;i<iterations;i++)
+    {
+      gfloat min[3], max[3];      /* sampled min/max */
+
+      sample_min_max (buf,
+                      width,
+                      height,
+                      x, y,
+                      radius, samples,
+                      min, max);
+
+      for (c=0;c<3;c++)
+        {
+          /*gfloat range, bright, dark;
+
+          range = max[c] - min[c];
+
+          if (range>0.0)
+            {
+              bright = (max[c] - pixel[c]) / range;
+              dark = (pixel[c] - min[c]) / range;
+            }
+          else
+            {
+              bright = 0.5;
+              dark = 0.5;
+            }*/
+
+          dark_avg[c] += min[c];
+          bright_avg[c] += max[c];
+        }
+    }
+
+    for (c=0;c<3;c++)
+      {
+        dark_avg[c]   /= iterations;
+        bright_avg[c] /= iterations;
+      }
+
+    if (max_envelope)
+      for (c=0;c<3;c++)
+        max_envelope[c] = bright_avg[c];/*pixel[c] + bright_avg[c] * range_avg[c];*/
+
+    if (min_envelope)
+      for (c=0;c<3;c++)
+        min_envelope[c] = dark_avg[c];/*pixel[c] - dark_avg[c] * range_avg[c];*/
+}

gegl-lua.patch:

--- NEW FILE gegl-lua.patch ---
--- operations/workshop/gluas.c	2007-11-26 00:58:42.000000000 -0500
+++ operations/workshop/gluas.c.new	2007-11-26 01:56:03.000000000 -0500
@@ -211,11 +211,7 @@
     /*gimp_tile_cache_ntiles (TILE_CACHE_SIZE);*/
 
     L = lua_open ();
-    lua_baselibopen (L);
-    lua_iolibopen (L);
-    lua_strlibopen (L);
-    lua_mathlibopen (L);
-    lua_tablibopen (L);
+    luaL_openlibs (L);
 
     register_functions (L, gluas_functions);
 
@@ -281,7 +277,7 @@
         {
       gint status = 0;
 
-      lua_dostring (L, "os.setlocale ('C', 'numeric')");
+      luaL_loadstring (L, "os.setlocale ('C', 'numeric')");
 
       if (file && file[0]!='\0')
         status = luaL_loadfile (L, file);


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gegl/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	30 Oct 2007 02:27:22 -0000	1.2
+++ .cvsignore	19 Dec 2007 04:48:08 -0000	1.3
@@ -1 +1 @@
-gegl-svn20071011.tar.bz2
+gegl-0.0.14.tar.bz2


Index: gegl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gegl/devel/gegl.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gegl.spec	30 Oct 2007 02:27:23 -0000	1.1
+++ gegl.spec	19 Dec 2007 04:48:08 -0000	1.2
@@ -1,23 +1,20 @@
 Summary:	A graph based image processing framework
 Name:		gegl
-Version:	0.0.13
-Release:	0.7.20071011svn%{?dist}
+Version:	0.0.14
+Release:	1%{?dist}
 # The binary is under the GPL, while the libs are under LGPL
-License:	LGPLv2+ and GPLv2+
+License:	LGPLv3+ and GPLv3+
 Group:		System Environment/Libraries
 URL:		http://www.gegl.org/
-# Tarball generated from svn checkout on the date referenced in the spec
-# 'Release' field. The tarball can be re-generated as follows;
-#  svn co -r 1671 http://svn.gnome.org/svn/gegl/trunk/ gegl-svn20071011
-#  tar -cjf gegl-svn20071011.tar.bz2 gegl-svn20071011
-Source0:	%{name}-svn20071011.tar.bz2
+Source0:	ftp://ftp.gtk.org/pub/gegl/0.0/%{name}-%{version}.tar.bz2
+Patch0:		gegl-envelopes.patch
+Patch1:		gegl-lua.patch
+Patch2:		gegl-compile_fix.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	babl-devel gtk2-devel ruby
 BuildRequires:	libpng-devel libjpeg-devel librsvg2-devel
-BuildRequires:	perl-devel SDL-devel OpenEXR-devel
+BuildRequires:	perl-devel SDL-devel OpenEXR-devel lua-devel
 BuildRequires:	enscript w3m graphviz pkgconfig
-#Requires these temporarily because of the use of the autogen script
-BuildRequires:	autoconf automake libtool
 
 %description
 GEGL (Generic Graphics Library) is a graph based image processing framework. 
@@ -36,12 +33,14 @@
 developing with %{name}.
 
 %prep
-%setup -q -n %{name}-svn20071011
+%setup -q
+%patch0 -p0 -b .eve
+%patch1 -p0 -b .lua
+%patch2 -p0 -b .fix
 chmod -x operations/io/ff-load.c operations/render/perlin/perlin.c
 
 %build
-./autogen.sh
-%configure --disable-static
+%configure --disable-static --enable-workshop --disable-docs
 make %{?_smp_mflags}
 										
 %install
@@ -62,7 +61,7 @@
 
 %files
 %defattr(-, root, root, -)
-%doc AUTHORS ChangeLog COPYING NEWS
+%doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README
 %{_bindir}/gegl
 %{_libdir}/*.so.*
 %{_libdir}/gegl-1.0/
@@ -74,6 +73,10 @@
 %{_libdir}/pkgconfig/%{name}.pc
 
 %changelog
+* Sat Dec 08 2007 Deji Akingunola <dakingun at gmail.com> - 0.0.14-1
+- Update to 0.0.14 release
+- License change from GPLv2+ to GPLv3+
+
 * Thu Oct 25 2007 Deji Akingunola <dakingun at gmail.com> - 0.0.13-0.7.20071011svn
 - Include missing requires for the devel subpackage
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gegl/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	30 Oct 2007 02:27:23 -0000	1.2
+++ sources	19 Dec 2007 04:48:08 -0000	1.3
@@ -1 +1 @@
-b9eabec42400a0260a02b37cbfcebc0e  gegl-svn20071011.tar.bz2
+7377258ee3d3a134a2909a9e9f4dfac1  gegl-0.0.14.tar.bz2




More information about the fedora-extras-commits mailing list