aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-07-27 14:58:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-07-27 14:58:38 +0000
commit8f4c141782d853e0136e02409f34a3bf538ab110 (patch)
tree0f5936ce57bd6a955b31b9c87e65c61c8b248e60
parent83521e400736c0af1ebfc3b828bc4ecd4d97f5c7 (diff)
testing/graphviz: new aport
Graph Visualization Tools http://www.graphviz.org/
-rw-r--r--testing/graphviz/0001-clone-nameclash.patch87
-rw-r--r--testing/graphviz/APKBUILD95
2 files changed, 182 insertions, 0 deletions
diff --git a/testing/graphviz/0001-clone-nameclash.patch b/testing/graphviz/0001-clone-nameclash.patch
new file mode 100644
index 00000000000..6222238d8d9
--- /dev/null
+++ b/testing/graphviz/0001-clone-nameclash.patch
@@ -0,0 +1,87 @@
+From cb8bbbd3a48fa1f41965617852d11e02eb20b1f0 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 26 Jul 2011 12:41:21 +0000
+Subject: [PATCH] clone nameclash
+
+---
+ lib/gvpr/actions.c | 6 +++---
+ lib/gvpr/actions.h | 2 +-
+ lib/gvpr/compile.c | 2 +-
+ lib/gvpr/gvpr.c | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/lib/gvpr/actions.c b/lib/gvpr/actions.c
+index 05bfcd1..b3b4a60 100644
+--- a/lib/gvpr/actions.c
++++ b/lib/gvpr/actions.c
+@@ -380,7 +380,7 @@ Agraph_t *cloneG(Agraph_t * g, char* name)
+ * graph. Otherwise, create a clone subgraph of g.
+ * Assume obj != NULL.
+ */
+-Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
++Agobj_t *cloneO(Agraph_t * g, Agobj_t * obj)
+ {
+ Agobj_t *nobj = 0;
+ Agedge_t *e;
+@@ -415,8 +415,8 @@ Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
+ case AGINEDGE:
+ case AGOUTEDGE:
+ e = (Agedge_t *) obj;
+- t = (Agnode_t *) clone(g, OBJ(agtail(e)));
+- h = (Agnode_t *) clone(g, OBJ(aghead(e)));
++ t = (Agnode_t *) cloneO(g, OBJ(agtail(e)));
++ h = (Agnode_t *) cloneO(g, OBJ(aghead(e)));
+ name = agnameof (AGMKOUT(e));
+ nobj = (Agobj_t *) openEdge(g, t, h, name);
+ if (nobj)
+diff --git a/lib/gvpr/actions.h b/lib/gvpr/actions.h
+index 5c62a3b..4223c52 100644
+--- a/lib/gvpr/actions.h
++++ b/lib/gvpr/actions.h
+@@ -22,7 +22,7 @@ extern "C" {
+ #include "expr.h"
+
+ extern void nodeInduce(Agraph_t * selected);
+- extern Agobj_t *clone(Agraph_t * g, Agobj_t * obj);
++ extern Agobj_t *cloneO(Agraph_t * g, Agobj_t * obj);
+ extern Agraph_t *cloneG(Agraph_t * g, char* name);
+ extern Agobj_t *copy(Agraph_t * g, Agobj_t * obj);
+ extern int copyAttr(Agobj_t * obj, Agobj_t * obj1);
+diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c
+index c157572..0914210 100644
+--- a/lib/gvpr/compile.c
++++ b/lib/gvpr/compile.c
+@@ -1087,7 +1087,7 @@ getval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
+ error(ERROR_WARNING, "NULL object passed to clone()");
+ v.integer = 0;
+ } else
+- v.integer = PTR2INT(clone(gp, objp));
++ v.integer = PTR2INT(cloneO(gp, objp));
+ break;
+ case F_cloneG:
+ gp = INT2PTR(Agraph_t *, args[0].integer);
+diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c
+index 0d47d70..9a1bfd1 100644
+--- a/lib/gvpr/gvpr.c
++++ b/lib/gvpr/gvpr.c
+@@ -803,7 +803,7 @@ addOutputGraph (Gpr_t* state, gvpropts* uopts)
+ Agraph_t* g = state->outgraph;
+
+ if ((agroot(g) == state->curgraph) && !uopts->ingraphs)
+- g = (Agraph_t*)clone (0, (Agobj_t *)g);
++ g = (Agraph_t*)cloneO (0, (Agobj_t *)g);
+
+ uopts->n_outgraphs++;
+ uopts->outgraphs = oldof(uopts->outgraphs,Agraph_t*,uopts->n_outgraphs,0);
+@@ -988,7 +988,7 @@ int gvpr (int argc, char *argv[], gvpropts * uopts)
+
+ /* begin graph */
+ if (incoreGraphs && (opts->compflags & CLONE))
+- state->curgraph = (Agraph_t*)clone (0, (Agobj_t*)(state->curgraph));
++ state->curgraph = (Agraph_t*)cloneO (0, (Agobj_t*)(state->curgraph));
+ state->curobj = (Agobj_t *) state->curgraph;
+ state->tvroot = 0;
+ if (bp->begg_stmt)
+--
+1.7.6
+
diff --git a/testing/graphviz/APKBUILD b/testing/graphviz/APKBUILD
new file mode 100644
index 00000000000..23fa059b93d
--- /dev/null
+++ b/testing/graphviz/APKBUILD
@@ -0,0 +1,95 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=graphviz
+pkgver=2.28.0
+pkgrel=0
+pkgdesc="Graph Visualization Tools"
+url="http://www.graphviz.org/"
+arch="all"
+license="EPL"
+depends=""
+depends_dev="zlib-dev libpng-dev jpeg-dev expat-dev freetype-dev bison m4 flex
+ fontconfig-dev libtool libsm-dev libxext-dev cairo-dev pango-dev
+ gmp-dev lua-dev gtk+-dev swig python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc py-$pkgname:py lua-$pkgname:_lua
+ $pkgname-gtk $pkgname-graphs"
+source="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-$pkgver.tar.gz
+ 0001-clone-nameclash.patch"
+
+_builddir="$srcdir"/graphviz-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-x \
+ --disable-static \
+ --disable-dependency-tracking \
+ --enable-lua=yes \
+ --without-mylibgd \
+ --with-ipsepcola \
+ --with-pangocairo \
+ --with-gdk-pixbuf \
+ --with-png \
+ --with-jpeg \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" \
+ pkgconfigdir=/usr/lib/pkgconfig \
+ install || return 1
+ mkdir -p "$pkgdir"/usr/share/doc
+ mv "$pkgdir"/usr/share/graphviz/doc "$pkgdir"/usr/share/doc/graphviz || return 1
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/graphviz/*.la \
+ "$pkgdir"/usr/lib/graphviz/*/*.la \
+ || return 1
+}
+
+py() {
+ pkgdesc="Python extension for graphviz"
+ mkdir -p "$subpkgdir"/usr/lib/graphviz \
+ "$subpkgdir"/usr/lib || return 1
+ mv "$pkgdir"/usr/lib/graphviz/python* \
+ "$subpkgdir"/usr/lib/graphviz || return 1
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
+_lua() {
+ pkgdesc="Lua extension for graphviz"
+ mkdir -p "$subpkgdir"/usr/lib/graphviz \
+ "$subpkgdir"/usr/lib/lua || return 1
+ mv "$pkgdir"/usr/lib/graphviz/lua \
+ "$subpkgdir"/usr/lib/graphviz || return 1
+ mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/
+}
+
+gtk() {
+ pkgdesc="Gtk extension for graphviz"
+ mkdir -p "$subpkgdir"/usr/lib/graphviz || return 1
+ mv "$pkgdir"/usr/lib/graphviz/libgvplugin_g?k* \
+ "$subpkgdir"/usr/lib/graphviz || return 1
+}
+
+graphs() {
+ pkgdesc="Demo graphs for graphviz"
+ mkdir -p "$subpkgdir"/usr/share/graphviz || return 1
+ mv "$pkgdir"/usr/share/graphviz/graphs \
+ "$subpkgdir"/usr/share/graphviz/
+}
+md5sums="8d26c1171f30ca3b1dc1b429f7937e58 graphviz-2.28.0.tar.gz
+bce8a9ae4c3a8c52c1bcf0e03d5ce364 0001-clone-nameclash.patch"