Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 361)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/x/gegl
+
+versions = 0.4.46
+pkgname = gegl
+suffix = tar.xz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+patches = $(CURDIR)/patches/gegl-0.4.46-runtime-dot.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+$(patches): $(sha1s)
+ @echo -e "\n======= Create Patches =======\n" ; \
+ ( cd create-0.4.46-runtime-dot-patch ; ./create.patch.sh ) ; \
+ echo -e "\n"
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s) $(patches)
Index: create-0.4.46-runtime-dot-patch/create.patch.sh
===================================================================
--- create-0.4.46-runtime-dot-patch/create.patch.sh (nonexistent)
+++ create-0.4.46-runtime-dot-patch/create.patch.sh (revision 361)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=0.4.46
+
+tar --files-from=file.list -xJvf ../gegl-$VERSION.tar.xz
+mv gegl-$VERSION gegl-$VERSION-orig
+
+cp -rf ./gegl-$VERSION-new ./gegl-$VERSION
+
+diff --unified -Nr gegl-$VERSION-orig gegl-$VERSION > gegl-$VERSION-runtime-dot.patch
+
+mv gegl-$VERSION-runtime-dot.patch ../patches
+
+rm -rf ./gegl-$VERSION
+rm -rf ./gegl-$VERSION-orig
Property changes on: create-0.4.46-runtime-dot-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-0.4.46-runtime-dot-patch/file.list
===================================================================
--- create-0.4.46-runtime-dot-patch/file.list (nonexistent)
+++ create-0.4.46-runtime-dot-patch/file.list (revision 361)
@@ -0,0 +1 @@
+gegl-0.4.46/operations/common/introspect.c
Index: create-0.4.46-runtime-dot-patch/gegl-0.4.46-new/operations/common/introspect.c
===================================================================
--- create-0.4.46-runtime-dot-patch/gegl-0.4.46-new/operations/common/introspect.c (nonexistent)
+++ create-0.4.46-runtime-dot-patch/gegl-0.4.46-new/operations/common/introspect.c (revision 361)
@@ -0,0 +1,206 @@
+/* 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 <https://www.gnu.org/licenses/>.
+ *
+ * Copyright 2006 Øyvind Kolås <pippin@gimp.org>
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <glib/gi18n-lib.h>
+#include <unistd.h>
+
+
+#ifdef GEGL_PROPERTIES
+
+property_object(node, _("Node"), GEGL_TYPE_NODE)
+
+#else
+
+#define GEGL_OP_SOURCE
+#define GEGL_OP_NAME introspect
+#define GEGL_OP_C_SOURCE introspect.c
+
+#include "gegl-op.h"
+gchar *gegl_to_dot (GeglNode *node);
+#include <stdio.h>
+
+static void
+gegl_introspect_load_cache (GeglProperties *op_introspect)
+{
+ gchar *dot_string = NULL;
+ gchar *png_filename = NULL;
+ gchar *dot_filename = NULL;
+ gchar *dot_cmd = NULL;
+ gchar *dot;
+ gint fd;
+
+ dot = g_find_program_in_path ("dot");
+
+ if (op_introspect->user_data || op_introspect->node == NULL)
+ return;
+
+ /* Construct temp filenames */
+ dot_filename = g_build_filename (g_get_tmp_dir (), "gegl-introspect-XXXXXX.dot", NULL);
+ png_filename = g_build_filename (g_get_tmp_dir (), "gegl-introspect-XXXXXX.png", NULL);
+
+ /* Construct the .dot source */
+ fd = g_mkstemp (dot_filename);
+ dot_string = gegl_to_dot (GEGL_NODE (op_introspect->node));
+ write (fd, dot_string, strlen (dot_string));
+ close (fd);
+
+ /* The only point of using g_mkstemp() here is creating a new file and making
+ * sure we don't override a file which existed before.
+ * Also png_filename will be modified in-place to the actual path name
+ * generated as being unique.
+ */
+ fd = g_mkstemp (png_filename);
+ close (fd);
+
+ /* Process the .dot to a .png */
+ dot_cmd = g_strdup_printf ("%s -o %s -Tpng %s", dot, png_filename, dot_filename);
+ if (system (dot_cmd) != 0)
+ {
+ g_warning ("Error executing GraphViz dot program");
+ }
+ else
+ {
+ GeglBuffer *new_buffer = NULL;
+ GeglNode *png_load = NULL;
+ GeglNode *buffer_sink = NULL;
+
+ /* Create a graph that loads the png into a GeglBuffer and process
+ * it
+ */
+ png_load = gegl_node_new_child (NULL,
+ "operation", "gegl:png-load",
+ "path", png_filename,
+ NULL);
+ buffer_sink = gegl_node_new_child (NULL,
+ "operation", "gegl:buffer-sink",
+ "buffer", &new_buffer,
+ NULL);
+ gegl_node_link_many (png_load, buffer_sink, NULL);
+ gegl_node_process (buffer_sink);
+
+ op_introspect->user_data= new_buffer;
+
+ g_object_unref (buffer_sink);
+ g_object_unref (png_load);
+ }
+
+ /* Do not keep the files around. */
+ unlink (dot_filename);
+ unlink (png_filename);
+
+ /* Cleanup */
+ g_free (dot);
+ g_free (dot_string);
+ g_free (dot_cmd);
+ g_free (dot_filename);
+ g_free (png_filename);
+}
+
+static void
+gegl_introspect_dispose (GObject *object)
+{
+ GeglProperties *o = GEGL_PROPERTIES (object);
+
+ g_clear_object (&o->user_data);
+
+ G_OBJECT_CLASS (gegl_op_parent_class)->dispose (object);
+}
+
+static GeglRectangle
+gegl_introspect_get_bounding_box (GeglOperation *operation)
+{
+ GeglRectangle result = {0,0,0,0};
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+
+ gegl_introspect_load_cache (o);
+
+ if (o->user_data)
+ {
+ gint width, height;
+
+ g_object_get (o->user_data,
+ "width", &width,
+ "height", &height,
+ NULL);
+
+ result.width = width;
+ result.height = height;
+ }
+
+ return result;
+}
+
+static gboolean
+gegl_introspect_process (GeglOperation *operation,
+ GeglOperationContext *context,
+ const gchar *output_pad,
+ const GeglRectangle *result,
+ gint level)
+{
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+
+ gegl_introspect_load_cache (o);
+
+ if (!o->user_data)
+ return FALSE;
+
+ /* gegl_operation_context_take_object() takes the reference we have,
+ * so we must increase it since we want to keep the object
+ */
+ g_object_ref (o->user_data);
+
+ gegl_operation_context_take_object (context, output_pad, G_OBJECT (o->user_data));
+
+ return TRUE;
+}
+
+static gboolean
+gegl_introspect_is_available (void)
+{
+ gchar *dot;
+ gboolean found = TRUE;
+
+ /* always return TRUE to avoid a runtime check on dot */
+ return found;
+}
+
+static void
+gegl_op_class_init (GeglOpClass *klass)
+{
+ GObjectClass *object_class;
+ GeglOperationClass *operation_class;
+
+ object_class = G_OBJECT_CLASS (klass);
+ operation_class = GEGL_OPERATION_CLASS (klass);
+
+ object_class->dispose = gegl_introspect_dispose;
+
+ operation_class->process = gegl_introspect_process;
+ operation_class->get_bounding_box = gegl_introspect_get_bounding_box;
+ operation_class->is_available = gegl_introspect_is_available;
+
+ gegl_operation_class_set_keys (operation_class,
+ "name" , "gegl:introspect",
+ "categories" , "render",
+ "description", _("GEGL graph visualizer."),
+ NULL);
+}
+
+#endif
Index: patches/README
===================================================================
--- patches/README (nonexistent)
+++ patches/README (revision 361)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+ TODO: Leave some comment here.
+
+ * end */
Index: patches
===================================================================
--- patches (nonexistent)
+++ patches (revision 361)
Property changes on: patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 361)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~