summaryrefslogtreecommitdiffstats
path: root/patches/source/gegl
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/gegl')
-rw-r--r--patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch68
-rw-r--r--patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch159
-rw-r--r--patches/source/gegl/gegl-0.2.0-libopenraw.patch71
-rw-r--r--patches/source/gegl/gegl-0.2.0-linker-flags.patch36
-rw-r--r--patches/source/gegl/gegl-0.2.0-lua-5.2.patch53
-rw-r--r--patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch195
-rwxr-xr-xpatches/source/gegl/gegl.SlackBuild116
-rw-r--r--patches/source/gegl/slack-desc19
8 files changed, 717 insertions, 0 deletions
diff --git a/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch b/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
new file mode 100644
index 00000000..53d7328e
--- /dev/null
+++ b/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
@@ -0,0 +1,68 @@
+From 012b0b019ede3cfa7df20bf60c7915a771ecff78 Mon Sep 17 00:00:00 2001
+From: Kalev Lember <kalevlember@gmail.com>
+Date: Thu, 4 Dec 2014 11:22:04 +0100
+Subject: [PATCH] matting-levin: Fix the build with recent suitesparse versions
+
+Stop using the UF_long define that was deprecated previously and has
+completely disappeared in suitesparse 4.3.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741105
+---
+ operations/external/matting-levin.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/operations/external/matting-levin.c b/operations/external/matting-levin.c
+index 63e85d1..cf84699 100644
+--- a/operations/external/matting-levin.c
++++ b/operations/external/matting-levin.c
+@@ -850,8 +850,8 @@ matting_sparse_new (guint cols, guint rows, guint elems)
+ sparse_t *s = g_new (sparse_t, 1);
+ s->columns = cols;
+ s->rows = rows;
+- s->col_idx = g_new (UF_long, cols + 1);
+- s->row_idx = g_new (UF_long, elems);
++ s->col_idx = g_new (SuiteSparse_long, cols + 1);
++ s->row_idx = g_new (SuiteSparse_long, elems);
+ s->values = g_new0 (gdouble, elems);
+
+ return s;
+@@ -964,8 +964,8 @@ matting_get_laplacian (const gdouble *restrict image,
+ image_elems = roi->width * roi->height,
+ i, j, k, x, y,
+ status;
+- UF_long *trip_col,
+- *trip_row;
++ SuiteSparse_long *trip_col,
++ *trip_row;
+ glong trip_nz = 0,
+ trip_cursor = 0,
+ trip_masked = 0;
+@@ -995,8 +995,8 @@ matting_get_laplacian (const gdouble *restrict image,
+ trip_nz = trip_masked * window_elems * window_elems;
+ trip_nz += image_elems; // Sparse diagonal and row summing at conclusion
+
+- trip_col = g_new (UF_long, trip_nz);
+- trip_row = g_new (UF_long, trip_nz);
++ trip_col = g_new (SuiteSparse_long, trip_nz);
++ trip_row = g_new (SuiteSparse_long, trip_nz);
+ trip_val = g_new0 (gdouble, trip_nz);
+
+ /* Compute the contribution of each pixel in the image to the laplacian */
+@@ -1082,10 +1082,10 @@ matting_get_laplacian (const gdouble *restrict image,
+ for (y = 0; y < window_elems; ++y)
+ for (x = 0; x < window_elems; ++x)
+ {
+- UF_long yx = y % diameter,
+- yy = y / diameter,
+- xx = x % diameter,
+- xy = x / diameter;
++ SuiteSparse_long yx = y % diameter,
++ yy = y / diameter,
++ xx = x % diameter,
++ xy = x / diameter;
+
+ g_return_val_if_fail (trip_cursor < trip_nz, FALSE);
+ trip_col[trip_cursor] = (i - radius + yx) + (j - radius + yy) * roi->width,
+--
+2.1.0
+
diff --git a/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch b/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch
new file mode 100644
index 00000000..965c6fc2
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch
@@ -0,0 +1,159 @@
+From ffa77a246652c7e706d690682fe659f50fbe5656 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 12:03:51 +0200
+Subject: [PATCH] patch: CVE-2012-4433
+
+Squashed commit of the following:
+
+commit 2a9071e2dc4cfe1aaa7a726805985281936f9874
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:57:37 2012 +0200
+
+ ppm-load: bring comment in line with reality
+
+ (cherry picked from commit 6975a9cfeaf0698b42ac81b1c2f00d13c8755453)
+
+commit 8bb88ebf78e54837322d3be74688f98800e9f33a
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:56:40 2012 +0200
+
+ ppm-load: CVE-2012-4433: add plausibility checks for header fields
+
+ Refuse values that are non-decimal, negative or overflow the target
+ type.
+
+ (cherry picked from commit 4757cdf73d3675478d645a3ec8250ba02168a230)
+
+commit 2b099886969bf055a8635d06a4d89f20fed1ee42
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:58:27 2012 +0200
+
+ ppm-load: CVE-2012-4433: don't overflow memory allocation
+
+ Carefully selected width/height values could cause the size of a later
+ allocation to overflow, resulting in a buffer much too small to store
+ the data which would then written beyond its end.
+
+ (cherry picked from commit 1e92e5235ded0415d555aa86066b8e4041ee5a53)
+---
+ operations/external/ppm-load.c | 64 +++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 54 insertions(+), 10 deletions(-)
+
+diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
+index efe6d56..e22521c 100644
+--- a/operations/external/ppm-load.c
++++ b/operations/external/ppm-load.c
+@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+ #include "gegl-chant.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <errno.h>
+
+ typedef enum {
+ PIXMAP_ASCII = 51,
+@@ -44,8 +45,8 @@ typedef enum {
+
+ typedef struct {
+ map_type type;
+- gint width;
+- gint height;
++ glong width;
++ glong height;
+ gsize numsamples; /* width * height * channels */
+ gsize bpc; /* bytes per channel */
+ guchar *data;
+@@ -61,7 +62,7 @@ ppm_load_read_header(FILE *fp,
+ gchar header[MAX_CHARS_IN_ROW];
+ gint maxval;
+
+- /* Check the PPM file Type P2 or P5 */
++ /* Check the PPM file Type P3 or P6 */
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+
+ if (header[0] != ASCII_P ||
+@@ -82,12 +83,33 @@ ppm_load_read_header(FILE *fp,
+ }
+
+ /* Get Width and Height */
+- img->width = strtol (header,&ptr,0);
+- img->height = atoi (ptr);
+- img->numsamples = img->width * img->height * CHANNEL_COUNT;
++ errno = 0;
++ img->width = strtol (header,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading width: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: width is negative");
++ return FALSE;
++ }
++
++ img->height = strtol (ptr,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading height: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: height is negative");
++ return FALSE;
++ }
+
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+- maxval = strtol (header,&ptr,0);
++ maxval = strtol (header,&ptr,10);
+
+ if ((maxval != 255) && (maxval != 65535))
+ {
+@@ -109,6 +131,16 @@ ppm_load_read_header(FILE *fp,
+ g_warning ("%s: Programmer stupidity error", G_STRLOC);
+ }
+
++ /* Later on, img->numsamples is multiplied with img->bpc to allocate
++ * memory. Ensure it doesn't overflow. */
++ if (!img->width || !img->height ||
++ G_MAXSIZE / img->width / img->height / CHANNEL_COUNT < img->bpc)
++ {
++ g_warning ("Illegal width/height: %ld/%ld", img->width, img->height);
++ return FALSE;
++ }
++ img->numsamples = img->width * img->height * CHANNEL_COUNT;
++
+ return TRUE;
+ }
+
+@@ -229,12 +261,24 @@ process (GeglOperation *operation,
+ if (!ppm_load_read_header (fp, &img))
+ goto out;
+
+- rect.height = img.height;
+- rect.width = img.width;
+-
+ /* Allocating Array Size */
++
++ /* Should use g_try_malloc(), but this causes crashes elsewhere because the
++ * error signalled by returning FALSE isn't properly acted upon. Therefore
++ * g_malloc() is used here which aborts if the requested memory size can't be
++ * allocated causing a controlled crash. */
+ img.data = (guchar*) g_malloc (img.numsamples * img.bpc);
+
++ /* No-op without g_try_malloc(), see above. */
++ if (! img.data)
++ {
++ g_warning ("Couldn't allocate %" G_GSIZE_FORMAT " bytes, giving up.", ((gsize)img.numsamples * img.bpc));
++ goto out;
++ }
++
++ rect.height = img.height;
++ rect.width = img.width;
++
+ switch (img.bpc)
+ {
+ case 1:
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl-0.2.0-libopenraw.patch b/patches/source/gegl/gegl-0.2.0-libopenraw.patch
new file mode 100644
index 00000000..c5738d6c
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-libopenraw.patch
@@ -0,0 +1,71 @@
+diff -up gegl-0.2.0/configure.ac.libopenraw gegl-0.2.0/configure.ac
+--- gegl-0.2.0/configure.ac.libopenraw 2016-12-03 08:11:31.968387802 +0100
++++ gegl-0.2.0/configure.ac 2016-12-03 08:12:19.398987931 +0100
+@@ -790,7 +790,7 @@ AC_ARG_WITH(libopenraw, [ --without-lib
+
+ have_libopenraw="no"
+ if test "x$with_libopenraw" != "xno"; then
+- PKG_CHECK_MODULES(OPENRAW, libopenraw-1.0 >= openraw_required_version,
++ PKG_CHECK_MODULES(OPENRAW, libopenraw-0.1 >= openraw_required_version,
+ have_libopenraw="yes",
+ have_libopenraw="no (openraw library not found)")
+ fi
+diff -up gegl-0.2.0/configure.libopenraw gegl-0.2.0/configure
+--- gegl-0.2.0/configure.libopenraw 2016-12-03 08:11:33.954412931 +0100
++++ gegl-0.2.0/configure 2016-12-03 08:12:15.506938686 +0100
+@@ -20760,12 +20760,12 @@ if test -n "$OPENRAW_CFLAGS"; then
+ pkg_cv_OPENRAW_CFLAGS="$OPENRAW_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-1.0 >= 0.0.5\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "libopenraw-1.0 >= 0.0.5") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-0.1 >= 0.0.5\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "libopenraw-0.1 >= 0.0.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_OPENRAW_CFLAGS=`$PKG_CONFIG --cflags "libopenraw-1.0 >= 0.0.5" 2>/dev/null`
++ pkg_cv_OPENRAW_CFLAGS=`$PKG_CONFIG --cflags "libopenraw-0.1 >= 0.0.5" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+@@ -20777,12 +20777,12 @@ if test -n "$OPENRAW_LIBS"; then
+ pkg_cv_OPENRAW_LIBS="$OPENRAW_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-1.0 >= 0.0.5\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "libopenraw-1.0 >= 0.0.5") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-0.1 >= 0.0.5\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "libopenraw-0.1 >= 0.0.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_OPENRAW_LIBS=`$PKG_CONFIG --libs "libopenraw-1.0 >= 0.0.5" 2>/dev/null`
++ pkg_cv_OPENRAW_LIBS=`$PKG_CONFIG --libs "libopenraw-0.1 >= 0.0.5" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+@@ -20803,9 +20803,9 @@ else
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- OPENRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenraw-1.0 >= 0.0.5" 2>&1`
++ OPENRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenraw-0.1 >= 0.0.5" 2>&1`
+ else
+- OPENRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenraw-1.0 >= 0.0.5" 2>&1`
++ OPENRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenraw-0.1 >= 0.0.5" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$OPENRAW_PKG_ERRORS" >&5
+diff -up gegl-0.2.0/operations/external/openraw.c.libopenraw gegl-0.2.0/operations/external/openraw.c
+--- gegl-0.2.0/operations/external/openraw.c.libopenraw 2016-12-03 08:28:14.284333843 +0100
++++ gegl-0.2.0/operations/external/openraw.c 2016-12-03 08:29:01.495751180 +0100
+@@ -116,7 +116,7 @@ load_buffer (GeglOperation *operation)
+ goto clean_file;
+ }
+
+- if(or_rawdata_format (rawdata) != OR_DATA_TYPE_CFA)
++ if(or_rawdata_format (rawdata) != OR_DATA_TYPE_RAW)
+ {
+ goto clean_file;
+ }
diff --git a/patches/source/gegl/gegl-0.2.0-linker-flags.patch b/patches/source/gegl/gegl-0.2.0-linker-flags.patch
new file mode 100644
index 00000000..0006ba24
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-linker-flags.patch
@@ -0,0 +1,36 @@
+diff -urNp gegl-0.2.0.orig/bin/Makefile.in gegl-0.2.0/bin/Makefile.in
+--- gegl-0.2.0.orig/bin/Makefile.in 2015-05-07 15:06:23.716649233 +0200
++++ gegl-0.2.0/bin/Makefile.in 2015-05-07 15:08:38.104260506 +0200
+@@ -363,7 +363,7 @@ AM_CFLAGS = \
+
+ AM_LDFLAGS = \
+ $(no_undefined) ../gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO)
++ $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO) -lm
+
+ gegl_SOURCES = gegl.c gegl-options.c gegl-options.h gegl-path-smooth.c \
+ gegl-path-smooth.h $(am__append_1)
+diff -urNp gegl-0.2.0.orig/examples/Makefile.in gegl-0.2.0/examples/Makefile.in
+--- gegl-0.2.0.orig/examples/Makefile.in 2015-05-07 15:06:23.674649046 +0200
++++ gegl-0.2.0/examples/Makefile.in 2015-05-07 16:13:36.057203261 +0200
+@@ -376,7 +376,7 @@ AM_CPPFLAGS = \
+ AM_CFLAGS = $(DEP_CFLAGS) $(GTK_CFLAGS) $(BABL_CFLAGS) $(PNG_CFLAGS)
+ AM_LDFLAGS = \
+ $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS)
++ $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS) -lm
+
+ all: all-recursive
+
+diff -urNp gegl-0.2.0.orig/tools/Makefile.in gegl-0.2.0/tools/Makefile.in
+--- gegl-0.2.0.orig/tools/Makefile.in 2015-05-07 15:06:23.716649233 +0200
++++ gegl-0.2.0/tools/Makefile.in 2015-05-07 15:31:43.643298848 +0200
+@@ -394,7 +394,7 @@ AM_CPPFLAGS = \
+ AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS)
+ AM_LDFLAGS = \
+ $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(BABL_LIBS)
++ $(DEP_LIBS) $(BABL_LIBS) -lm
+
+ @HAVE_EXIV2_TRUE@exp_combine_SOURCES = exp_combine.cpp
+ @HAVE_EXIV2_TRUE@exp_combine_LDADD = $(EXIV2_LIBS)
diff --git a/patches/source/gegl/gegl-0.2.0-lua-5.2.patch b/patches/source/gegl/gegl-0.2.0-lua-5.2.patch
new file mode 100644
index 00000000..e5a60bb9
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-lua-5.2.patch
@@ -0,0 +1,53 @@
+From 1e12a153d9a82a771c3bfd95c0265b810a424b3c Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 14:41:33 +0200
+Subject: [PATCH] patch: lua-5.2
+
+Squashed commit of the following:
+
+commit 96f65d260c6e40940f2818b721c19565c1b40607
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Wed Jan 11 09:52:25 2012 +0100
+
+ Fix build with lua 5.2 by not using API deprecated in 5.1 already
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=667675
+ (cherry picked from commit a14a29c39352c60f003a65b721c9af8a1d8d20df)
+---
+ operations/workshop/external/gluas.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/operations/workshop/external/gluas.c b/operations/workshop/external/gluas.c
+index 8ba1101..63e82a2 100644
+--- a/operations/workshop/external/gluas.c
++++ b/operations/workshop/external/gluas.c
+@@ -97,7 +97,7 @@ static int l_progress (lua_State * lua);
+ static int l_flush (lua_State * lua);
+ static int l_print (lua_State * lua);
+
+-static const luaL_reg gluas_functions[] =
++static const luaL_Reg gluas_functions[] =
+ {
+ {"set_rgba", l_set_rgba},
+ {"get_rgba", l_get_rgba},
+@@ -122,7 +122,7 @@ static const luaL_reg gluas_functions[] =
+ };
+ static void
+ register_functions (lua_State *L,
+- const luaL_reg *l)
++ const luaL_Reg *l)
+ {
+ for (;l->name; l++)
+ lua_register (L, l->name, l->func);
+@@ -146,7 +146,7 @@ drawable_lua_process (GeglOperation *op,
+ lua_State *L;
+ Priv p;
+
+- L = lua_open ();
++ L = luaL_newstate ();
+ luaL_openlibs (L);
+
+ register_functions (L, gluas_functions);
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch b/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch
new file mode 100644
index 00000000..a823580f
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch
@@ -0,0 +1,195 @@
+From 72168aba34445e4cd99aaed32d8e6a80e89ce729 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 13:53:18 +0200
+Subject: [PATCH] patch: remove-src-over-op
+
+Squashed commit of the following:
+
+commit b766094d951bf1515a75408ee85d4e1af432e6bd
+Author: Daniel Sabo <DanielSabo@gmail.com>
+Date: Tue Jun 4 20:57:03 2013 -0700
+
+ Remove auto-generated svg:src-over
+
+ It was already shadowed by gegl:over, which declares
+ svg:src-over as a compat-name.
+
+ (cherry picked from commit c1caf2401271e8a17fd1937bf84279c250bd8e2a)
+
+ Conflicts:
+ po/POTFILES.in
+---
+ operations/generated/src-over.c | 122 -----------------------------
+ operations/generated/svg-12-porter-duff.rb | 5 +-
+ po/POTFILES.in | 3 +-
+ 3 files changed, 4 insertions(+), 126 deletions(-)
+ delete mode 100644 operations/generated/src-over.c
+
+diff --git a/operations/generated/src-over.c b/operations/generated/src-over.c
+deleted file mode 100644
+index e586087..0000000
+--- a/operations/generated/src-over.c
++++ /dev/null
+@@ -1,122 +0,0 @@
+-
+-/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
+- *
+- * This file is an image processing operation for GEGL
+- *
+- * 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 2006, 2007 Øyvind Kolås <pippin@gimp.org>
+- * 2007 John Marshall
+- *
+- * SVG rendering modes; see:
+- * http://www.w3.org/TR/SVG12/rendering.html
+- * http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
+- *
+- * aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
+- * cA = aux(src) colour cB = in(dst) colour cD = out colour
+- *
+- * !!!! AUTOGENERATED FILE !!!!!
+- */
+-#include "config.h"
+-#include <glib/gi18n-lib.h>
+-
+-
+-#ifdef GEGL_CHANT_PROPERTIES
+-
+-/* no properties */
+-
+-#else
+-
+-#define GEGL_CHANT_TYPE_POINT_COMPOSER
+-#define GEGL_CHANT_C_FILE "src-over.c"
+-
+-#include "gegl-chant.h"
+-
+-static void prepare (GeglOperation *operation)
+-{
+- const Babl *format = babl_format ("RaGaBaA float");
+-
+- gegl_operation_set_format (operation, "input", format);
+- gegl_operation_set_format (operation, "aux", format);
+- gegl_operation_set_format (operation, "output", format);
+-}
+-
+-static gboolean
+-process (GeglOperation *op,
+- void *in_buf,
+- void *aux_buf,
+- void *out_buf,
+- glong n_pixels,
+- const GeglRectangle *roi,
+- gint level)
+-{
+- gint i;
+- gfloat * GEGL_ALIGNED in = in_buf;
+- gfloat * GEGL_ALIGNED aux = aux_buf;
+- gfloat * GEGL_ALIGNED out = out_buf;
+-
+- if (aux==NULL)
+- return TRUE;
+-
+- for (i = 0; i < n_pixels; i++)
+- {
+- gint j;
+- gfloat aA G_GNUC_UNUSED, aB G_GNUC_UNUSED, aD G_GNUC_UNUSED;
+-
+- aB = in[3];
+- aA = aux[3];
+- aD = aA + aB - aA * aB;
+-
+- for (j = 0; j < 3; j++)
+- {
+- gfloat cA G_GNUC_UNUSED, cB G_GNUC_UNUSED;
+-
+- cB = in[j];
+- cA = aux[j];
+- out[j] = cA + cB * (1.0f - aA);
+- }
+- out[3] = aD;
+- in += 4;
+- aux += 4;
+- out += 4;
+- }
+- return TRUE;
+-}
+-
+-
+-static void
+-gegl_chant_class_init (GeglChantClass *klass)
+-{
+- GeglOperationClass *operation_class;
+- GeglOperationPointComposerClass *point_composer_class;
+-
+- operation_class = GEGL_OPERATION_CLASS (klass);
+- point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+-
+- point_composer_class->process = process;
+- operation_class->prepare = prepare;
+-
+-
+- operation_class->compat_name = "gegl:src-over";
+- gegl_operation_class_set_keys (operation_class,
+- "name" , "svg:src-over",
+- "categories", "compositors:porter-duff",
+- "description",
+- _("Porter Duff operation src-over (d = cA + cB * (1.0f - aA))"),
+- NULL);
+-
+-
+-}
+-
+-#endif
+diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
+index 5516802..dab5d2f 100755
+--- a/operations/generated/svg-12-porter-duff.rb
++++ b/operations/generated/svg-12-porter-duff.rb
+@@ -1,4 +1,5 @@
+ #!/usr/bin/env ruby
++# encoding: utf-8
+
+ copyright = '
+ /* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
+@@ -38,8 +39,8 @@ a = [
+ 'aA'],
+ ['dst', 'cB',
+ 'aB'],
+- ['src_over', 'cA + cB * (1.0f - aA)',
+- 'aA + aB - aA * aB'],
++# ['src_over', 'cA + cB * (1.0f - aA)',
++# 'aA + aB - aA * aB'],
+ ['dst_over', 'cB + cA * (1.0f - aB)',
+ 'aA + aB - aA * aB'],
+ ['dst_in', 'cB * aA', # <- XXX: typo?
+diff --git a/po/POTFILES.in b/po/POTFILES.in
+index e309594..d36cbc2 100644
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -115,10 +115,9 @@ operations/generated/plus.c
+ operations/generated/screen.c
+ operations/generated/soft-light.c
+ operations/generated/src-atop.c
++operations/generated/src.c
+ operations/generated/src-in.c
+ operations/generated/src-out.c
+-operations/generated/src-over.c
+-operations/generated/src.c
+ operations/generated/subtract.c
+ operations/generated/svg-multiply.c
+ operations/generated/xor.c
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl.SlackBuild b/patches/source/gegl/gegl.SlackBuild
new file mode 100755
index 00000000..ce301c73
--- /dev/null
+++ b/patches/source/gegl/gegl.SlackBuild
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009 Robby Workman, Northport, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=${VERSION:-$(echo gegl-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gegl
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf gegl-$VERSION
+tar xvf $CWD/gegl-$VERSION.tar.?z* || exit 1
+cd gegl-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/gegl-0.2.0-lua-5.2.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-CVE-2012-4433.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-remove-src-over-op.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-linker-flags.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-libopenraw.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/gegl-$VERSION \
+ --enable-gtk-doc \
+ --disable-docs \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Trust defaults:
+# --enable-mmx \
+# --disable-sse \
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/gegl-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/gegl-$VERSION
+#( cd $PKG/usr/doc/gegl-$VERSION ; ln -s /usr/share/gtk-doc/html/gegl/ html )
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gegl-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gegl/slack-desc b/patches/source/gegl/slack-desc
new file mode 100644
index 00000000..75eea8ad
--- /dev/null
+++ b/patches/source/gegl/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------------|
+gegl: GEGL (Generic Graphics Library)
+gegl:
+gegl: GEGL (Generic Graphics Library) is a graph based image processing
+gegl: framework.
+gegl:
+gegl: GEGL provides infrastructure to do demand based cached non destructive
+gegl: image editing on larger than RAM buffers. Through babl it provides
+gegl: support for a wide range of color models and pixel storage formats for
+gegl: input and output.
+gegl:
+gegl: