summarylogtreecommitdiffstats
path: root/gegl-0.4.diff
diff options
context:
space:
mode:
Diffstat (limited to 'gegl-0.4.diff')
-rw-r--r--gegl-0.4.diff116
1 files changed, 116 insertions, 0 deletions
diff --git a/gegl-0.4.diff b/gegl-0.4.diff
new file mode 100644
index 00000000000..b5b68111b4f
--- /dev/null
+++ b/gegl-0.4.diff
@@ -0,0 +1,116 @@
+=== modified file 'configure.ac'
+--- configure.ac 2018-03-25 18:10:52 +0000
++++ configure.ac 2018-05-05 00:30:21 +0000
+@@ -57,6 +57,12 @@
+ [with_gegl2=yes],
+ [with_gegl2=no])
+
++AC_ARG_WITH([gegl-0.4],
++ [AS_HELP_STRING([--with-gegl-0.4],
++ [Use gegl v. 0.4 @<:@default=no@:>@])],
++ [with_gegl4=yes],
++ [with_gegl4=no])
++
+ AC_ARG_WITH([exiv2],
+ [AS_HELP_STRING([--with-exiv2],
+ [Read/write exif metadata @<:@default=yes@:>@])],
+@@ -73,15 +79,20 @@
+ PKG_CHECK_MODULES([GEGL], [gegl-0.2 >= 0.2.0], [GEGL_PC="gegl-0.2"])
+ GEGL_PC="gegl-0.2"
+ GEGL_DIR="gegl-0.2"
++elif test x"${with_gegl4}" = xyes; then
++ PKG_CHECK_MODULES([GEGL], [gegl-0.4 >= 0.4.0], [GEGL_PC="gegl-0.4"])
++ GEGL_PC="gegl-0.4"
++ GEGL_DIR="gegl-0.4"
++ GEGL_CHANT="yes"
+ else
+ PKG_CHECK_MODULES([GEGL], [gegl-0.3 >= 0.3.0], [GEGL_PC="gegl-0.3"])
+ GEGL_PC="gegl-0.3"
+ GEGL_DIR="gegl-0.3"
+
+- GEGL_3_8="no"
++ GEGL_CHANT="no"
+ # From version 0.3.8 on up, gegl-chant.h was deprecated. We
+ # have to use insta-curve.c which uses gegl-op.h
+- PKG_CHECK_EXISTS([gegl-0.3 >= 0.3.8], [ GEGL_3_8="yes" ], [])
++ PKG_CHECK_EXISTS([gegl-0.3 >= 0.3.8], [ GEGL_CHANT="yes" ], [])
+ fi
+
+ ##### Check if we want to read exif data #######################################
+@@ -94,7 +105,7 @@
+
+ ##### Check if using effects ###################################################
+
+-AM_CONDITIONAL([DO_RETRO_FX], [test "$GEGL_3_8" = yes])
++AM_CONDITIONAL([DO_RETRO_FX], [test "$GEGL_CHANT" = yes])
+
+ AM_CONDITIONAL([DO_PLUGINS], [test "$with_plugins" = yes])
+
+
+=== modified file 'src/effects.c'
+--- src/effects.c 2018-03-28 15:29:25 +0000
++++ src/effects.c 2018-05-05 01:10:56 +0000
+@@ -21,6 +21,12 @@
+ Some parts from gimp
+ */
+
++#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 3 && GEGL_MICRO_VERSION >= 8
++ #define USE_INSTA 1
++#elif GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 4
++ #define USE_INSTA 1
++#endif
++
+ #if BABL_MAJOR_VERSION == 0 && BABL_MINOR_VERSION <= 1 && BABL_MICRO_VERSION <= 2
+ const Babl *fx_get_format_RGB24(void)
+ {
+@@ -240,7 +246,7 @@
+ g_return_if_fail (GEGL_IS_BUFFER (src_buffer));
+ g_return_if_fail (GEGL_IS_BUFFER (dest_buffer));
+
+-#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 3 && GEGL_MICRO_VERSION >= 8
++#ifdef USE_INSTA
+ node = gegl_node_new_child (NULL, "operation", op, "preset",
+ GEGL_DIBUJA_INSTA_CURVE_PRESET_1977 ,NULL);
+ #else
+@@ -260,7 +266,7 @@
+ g_return_if_fail (GEGL_IS_BUFFER (src_buffer));
+ g_return_if_fail (GEGL_IS_BUFFER (dest_buffer));
+
+-#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 3 && GEGL_MICRO_VERSION >= 8
++#ifdef USE_INSTA
+ node = gegl_node_new_child (NULL, "operation", op, "preset",
+ GEGL_DIBUJA_INSTA_CURVE_PRESET_BRANNAN ,NULL);
+ #else
+
+=== modified file 'src/effects.h'
+--- src/effects.h 2018-03-29 20:58:36 +0000
++++ src/effects.h 2018-05-05 01:03:42 +0000
+@@ -30,8 +30,12 @@
+ #include <gegl-0.2/gegl.h>
+ extern const gchar * gegl_operation_get_key(const gchar *operation_type,
+ const gchar *key_name);
+-#elif GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 3
+- #include <gegl-0.3/gegl.h>
++#elif GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION >= 3
++ #if GEGL_MINOR_VERSION == 3
++ #include <gegl-0.3/gegl.h>
++ #elif GEGL_MINOR_VERSION == 4
++ #include <gegl-0.4/gegl.h>
++ #endif
+
+ typedef enum{
+ GEGL_DIBUJA_INSTA_CURVE_PRESET_NONE = 0,
+
+=== modified file 'src/main.c'
+--- src/main.c 2018-03-28 15:29:25 +0000
++++ src/main.c 2018-05-05 01:12:41 +0000
+@@ -373,7 +373,7 @@
+ dibuja_new_file(NULL, NULL, CANVAS_DEF_WIDTH, CANVAS_DEF_HEIGHT);
+ }
+
+-#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 3 && GEGL_MICRO_VERSION >= 0
++#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION >= 3
+ g_object_set(gegl_config(), "application-license", "GPL3", NULL);
+ #endif
+ gegl_init (&argc, &argv);
+