diff options
Diffstat (limited to 'user/graphviz')
-rw-r--r-- | user/graphviz/0001-clone-nameclash.patch | 87 | ||||
-rw-r--r-- | user/graphviz/APKBUILD | 120 | ||||
-rw-r--r-- | user/graphviz/graphviz.pre-deinstall | 5 | ||||
-rw-r--r-- | user/graphviz/graphviz.trigger | 3 |
4 files changed, 215 insertions, 0 deletions
diff --git a/user/graphviz/0001-clone-nameclash.patch b/user/graphviz/0001-clone-nameclash.patch new file mode 100644 index 000000000..6222238d8 --- /dev/null +++ b/user/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/user/graphviz/APKBUILD b/user/graphviz/APKBUILD new file mode 100644 index 000000000..7f5b34c1f --- /dev/null +++ b/user/graphviz/APKBUILD @@ -0,0 +1,120 @@ +# Contributor: Sören Tempel <soeren/alpine@soeren-tempel.net> +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=graphviz +pkgver=2.40.1 +pkgrel=1 +pkgdesc="Graph Visualization Tools" +url="http://www.graphviz.org/" +arch="all" +license="EPL" +options="!check" # Requires unpackaged Criterion test framework +depends="" +depends_dev="zlib-dev libpng-dev libjpeg-turbo-dev expat-dev + fontconfig-dev libsm-dev libxext-dev cairo-dev pango-dev + librsvg-dev gmp-dev freetype-dev" +makedepends="$depends_dev flex swig guile-dev m4 libtool + bison gtk+2.0-dev lua5.2-dev libltdl tcl" +install="$pkgname.pre-deinstall" +triggers="$pkgname.trigger=/usr/lib/graphviz" +subpackages="$pkgname-dev $pkgname-doc lua-$pkgname:_lua + $pkgname-gtk $pkgname-graphs guile-$pkgname:guile" +source="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-$pkgver.tar.bz2 + $pkgname.trigger + 0001-clone-nameclash.patch + " + +prepare() { + # Rename unpacked directory with hash in the name to something sane... + mv "$srcdir"/$pkgname-stable_release_$pkgver-* "$builddir" + + default_prepare + + cd "$builddir" + ./autogen.sh NOCONFIG +} + +build() { + cd "$builddir" + + LIBPOSTFIX=/ \ + LUA=lua5.2 \ + LUA_CFLAGS="$(pkg-config --cflags lua5.2)" \ + LUA_LIBS="$(pkg-config --libs lua5.2)" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --without-included-ltdl \ + --disable-ltdl-install \ + --disable-silent-rules \ + --enable-ltdl \ + --with-x \ + --disable-static \ + --disable-dependency-tracking \ + --enable-java=no \ + --enable-lua=yes \ + --enable-python34=yes \ + --enable-tcl=no \ + --without-mylibgd \ + --with-ipsepcola \ + --with-pangocairo \ + --with-gdk-pixbuf \ + --with-png \ + --with-jpeg \ + --with-rsvg + + if [ "$CARCH" = "x86_64" ]; then + # the configure script thinks we have sincos. we dont. + sed -i -e '/HAVE_SINCOS/d' config.h + fi + + make +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" \ + pkgconfigdir=/usr/lib/pkgconfig \ + install + + mkdir -p "$pkgdir"/usr/share/doc + mv "$pkgdir"/usr/share/graphviz/doc \ + "$pkgdir"/usr/share/doc/graphviz +} + +guile() { + pkgdesc="Guile bindings for graphviz" + mkdir -p "$subpkgdir"/usr/lib/graphviz + mv "$pkgdir"/usr/lib/graphviz/guile* \ + "$subpkgdir"/usr/lib/graphviz/ +} + +_lua() { + pkgdesc="Lua extension for graphviz" + mkdir -p "$subpkgdir"/usr/lib/graphviz \ + "$subpkgdir"/usr/lib/lua + mv "$pkgdir"/usr/lib/graphviz/lua \ + "$subpkgdir"/usr/lib/graphviz + mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/ +} + +gtk() { + pkgdesc="Gtk extension for graphviz" + mkdir -p "$subpkgdir"/usr/lib/graphviz + mv "$pkgdir"/usr/lib/graphviz/libgvplugin_g?k* \ + "$pkgdir"/usr/lib/graphviz/libgvplugin_rsvg* \ + "$subpkgdir"/usr/lib/graphviz +} + +graphs() { + pkgdesc="Demo graphs for graphviz" + mkdir -p "$subpkgdir"/usr/share/graphviz + mv "$pkgdir"/usr/share/graphviz/graphs \ + "$subpkgdir"/usr/share/graphviz/ +} + +sha512sums="4e819b3906f3b8e31245a021acd6fae4a1bc55df0a4df6b57a3578a62017e9db0b474a38f3f54682b9e9136d332f2374feee308af489e2848f8bc303ffab58ac graphviz-2.40.1.tar.bz2 +50947e6a11929f724759266f7716d52d10923eba6d59704ab39e4bdf18f8471d548c2b11ab051dd4b67cb82742aaf54d6358890d049d5b5982f3383b65f7ae8c graphviz.trigger +aa4cbc341906a949a6bf78cadd96c437d6bcc90369941fe03519aa4447731ecbf6063a0dd0366d3e7aaadf22b69e4bcab3f8632a7da7a01f8e08a3be05c2bc5d 0001-clone-nameclash.patch" diff --git a/user/graphviz/graphviz.pre-deinstall b/user/graphviz/graphviz.pre-deinstall new file mode 100644 index 000000000..cfc43bf6a --- /dev/null +++ b/user/graphviz/graphviz.pre-deinstall @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -e /usr/lib/graphviz/config6 ]; then + rm /usr/lib/graphviz/config6 +fi diff --git a/user/graphviz/graphviz.trigger b/user/graphviz/graphviz.trigger new file mode 100644 index 000000000..99d447b9b --- /dev/null +++ b/user/graphviz/graphviz.trigger @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /usr/bin/dot -c |