From 8f905a7097b09a28bd597b4e4c81a9414a7fe0ae Mon Sep 17 00:00:00 2001 From: Dustin DeWeese Date: Sat, 29 Oct 2016 13:33:37 -0700 Subject: [PATCH] Add Graphviz (#526) --- packages/graphviz/add-libcommon-to-gc.patch | 24 +++++++++++++++++++ packages/graphviz/build.sh | 14 +++++++++++ .../graphviz/fix-edgepaintmain-include.patch | 11 +++++++++ packages/graphviz/fix-gdefs-include.patch | 11 +++++++++ packages/graphviz/general-free.patch | 11 +++++++++ .../graphviz/no-configure-dot-plugins.patch | 24 +++++++++++++++++++ packages/graphviz/no-mkdefs.patch | 24 +++++++++++++++++++ packages/graphviz/sfdpgen-free.patch | 11 +++++++++ 8 files changed, 130 insertions(+) create mode 100644 packages/graphviz/add-libcommon-to-gc.patch create mode 100644 packages/graphviz/build.sh create mode 100644 packages/graphviz/fix-edgepaintmain-include.patch create mode 100644 packages/graphviz/fix-gdefs-include.patch create mode 100644 packages/graphviz/general-free.patch create mode 100644 packages/graphviz/no-configure-dot-plugins.patch create mode 100644 packages/graphviz/no-mkdefs.patch create mode 100644 packages/graphviz/sfdpgen-free.patch diff --git a/packages/graphviz/add-libcommon-to-gc.patch b/packages/graphviz/add-libcommon-to-gc.patch new file mode 100644 index 000000000..614d8c45f --- /dev/null +++ b/packages/graphviz/add-libcommon-to-gc.patch @@ -0,0 +1,24 @@ +diff -r -u graphviz-2.38.0/cmd/tools/Makefile.am src/cmd/tools/Makefile.am +--- graphviz-2.38.0/cmd/tools/Makefile.am 2014-04-13 13:40:25.000000000 -0700 ++++ src/cmd/tools/Makefile.am 2016-04-09 09:34:27.178979677 -0700 +@@ -135,6 +135,7 @@ + gc_SOURCES = gc.c + + gc_LDADD = \ ++ $(top_builddir)/lib/common/libcommon_C.la \ + $(top_builddir)/lib/ingraphs/libingraphs_C.la \ + $(top_builddir)/lib/cgraph/libcgraph.la + +Only in src/cmd/tools: Makefile.am~ +diff -r -u graphviz-2.38.0/cmd/tools/Makefile.in src/cmd/tools/Makefile.in +--- graphviz-2.38.0/cmd/tools/Makefile.in 2014-04-13 13:41:53.000000000 -0700 ++++ src/cmd/tools/Makefile.in 2016-04-09 09:35:23.858509449 -0700 +@@ -722,6 +722,7 @@ + + gc_SOURCES = gc.c + gc_LDADD = \ ++ $(top_builddir)/lib/common/libcommon_C.la \ + $(top_builddir)/lib/ingraphs/libingraphs_C.la \ + $(top_builddir)/lib/cgraph/libcgraph.la + +Only in src/cmd/tools: Makefile.in~ diff --git a/packages/graphviz/build.sh b/packages/graphviz/build.sh new file mode 100644 index 000000000..2d095a5a8 --- /dev/null +++ b/packages/graphviz/build.sh @@ -0,0 +1,14 @@ +TERMUX_PKG_MAINTAINER="Dustin DeWeese @HackerFoo" +TERMUX_PKG_HOMEPAGE=http://www.graphviz.org/ +TERMUX_PKG_DESCRIPTION="rich set of graph drawing tools" +TERMUX_PKG_VERSION=2.38.0 +TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_SRCURL=http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_DEPENDS="libandroid-glob,libcairo,pango,libexpat" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-poppler=no --enable-java=no --enable-perl=no --enable-swig=no --enable-sharp=no --enable-guile=no --enable-lua=no --enable-ocaml=no --enable-php=no --enable-python=no --enable-r=no --enable-ruby=no --enable-tcl=no --enable-ltdl-install --with-pic --with-x=no --with-pangocairo=yes" +TERMUX_PKG_RM_AFTER_INSTALL="bin/*-config share/man/man1/*-config.1" + +termux_step_pre_configure() { + LDFLAGS+=" -landroid-glob" + cp -r ../src/* . +} diff --git a/packages/graphviz/fix-edgepaintmain-include.patch b/packages/graphviz/fix-edgepaintmain-include.patch new file mode 100644 index 000000000..cebaa9c7d --- /dev/null +++ b/packages/graphviz/fix-edgepaintmain-include.patch @@ -0,0 +1,11 @@ +--- graphviz-2.38.0/cmd/edgepaint/edgepaintmain.c 2014-04-13 13:40:25.000000000 -0700 ++++ src/cmd/edgepaint/edgepaintmain.c 2016-04-03 10:46:38.532882314 -0700 +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include ++#include "pointset.h" + #ifdef HAVE_GETOPT_H + #include + #else diff --git a/packages/graphviz/fix-gdefs-include.patch b/packages/graphviz/fix-gdefs-include.patch new file mode 100644 index 000000000..43f9ce520 --- /dev/null +++ b/packages/graphviz/fix-gdefs-include.patch @@ -0,0 +1,11 @@ +--- graphviz-2.38.0/lib/gvpr/compile.c 2014-04-13 13:40:25.000000000 -0700 ++++ src/lib/gvpr/compile.c 2016-04-03 06:35:21.867051986 -0700 +@@ -43,7 +43,7 @@ + #define MIN(a,b) ((a)<(b)?(a):(b)) + #define MAX(a,b) ((a)>(b)?(a):(b)) + +-#include ++#include "gdefs.h" + + #include "ctype.h" + #include "trie.c" diff --git a/packages/graphviz/general-free.patch b/packages/graphviz/general-free.patch new file mode 100644 index 000000000..103696fec --- /dev/null +++ b/packages/graphviz/general-free.patch @@ -0,0 +1,11 @@ +--- src/lib/sparse/general.h.orig 2016-04-01 08:13:25.222810595 -0700 ++++ src/lib/sparse/general.h 2016-04-01 08:14:12.770312988 -0700 +@@ -14,6 +14,8 @@ + #ifndef GENERAL_H + #define GENERAL_H + ++void free(void *ptr); ++ + #include + #include + #include diff --git a/packages/graphviz/no-configure-dot-plugins.patch b/packages/graphviz/no-configure-dot-plugins.patch new file mode 100644 index 000000000..0f54a4ec0 --- /dev/null +++ b/packages/graphviz/no-configure-dot-plugins.patch @@ -0,0 +1,24 @@ +diff -r -u graphviz-2.38.0/cmd/dot/Makefile.am src/cmd/dot/Makefile.am +--- graphviz-2.38.0/cmd/dot/Makefile.am 2014-04-13 13:40:25.000000000 -0700 ++++ src/cmd/dot/Makefile.am 2016-04-04 15:38:30.797597592 -0700 +@@ -58,7 +58,6 @@ + # run "dot -c", if possible, to create plugin config + install-exec-hook: + (cd $(DESTDIR)$(bindir); if test -x dot$(EXEEXT); then for i in $(linkedprogram); do rm -f $$i; $(LN_S) dot$(EXEEXT) $$i; done; fi;) +- if test "x$(DESTDIR)" = "x"; then if test -x $(bindir)/dot$(EXEEXT); then if test -x /sbin/ldconfig; then /sbin/ldconfig 2>/dev/null; fi; $(bindir)/dot$(EXEEXT) -c; else $(bindir)/dot_static$(EXEEXT) -c; fi; fi + + uninstall-hook: + (cd $(DESTDIR)$(man1dir); for i in $(linkedman); do rm -f $$i; done;) +Only in src/cmd/dot: Makefile.am~ +diff -r -u graphviz-2.38.0/cmd/dot/Makefile.in src/cmd/dot/Makefile.in +--- graphviz-2.38.0/cmd/dot/Makefile.in 2014-04-13 13:41:50.000000000 -0700 ++++ src/cmd/dot/Makefile.in 2016-04-04 15:38:02.213908307 -0700 +@@ -1177,7 +1177,6 @@ + # run "dot -c", if possible, to create plugin config + install-exec-hook: + (cd $(DESTDIR)$(bindir); if test -x dot$(EXEEXT); then for i in $(linkedprogram); do rm -f $$i; $(LN_S) dot$(EXEEXT) $$i; done; fi;) +- if test "x$(DESTDIR)" = "x"; then if test -x $(bindir)/dot$(EXEEXT); then if test -x /sbin/ldconfig; then /sbin/ldconfig 2>/dev/null; fi; $(bindir)/dot$(EXEEXT) -c; else $(bindir)/dot_static$(EXEEXT) -c; fi; fi + + uninstall-hook: + (cd $(DESTDIR)$(man1dir); for i in $(linkedman); do rm -f $$i; done;) +Only in src/cmd/dot: Makefile.in~ diff --git a/packages/graphviz/no-mkdefs.patch b/packages/graphviz/no-mkdefs.patch new file mode 100644 index 000000000..bace84824 --- /dev/null +++ b/packages/graphviz/no-mkdefs.patch @@ -0,0 +1,24 @@ +diff -r -u graphviz-2.38.0/lib/gvpr/Makefile.am src/lib/gvpr/Makefile.am +--- graphviz-2.38.0/lib/gvpr/Makefile.am 2014-04-13 13:40:25.000000000 -0700 ++++ src/lib/gvpr/Makefile.am 2016-04-02 20:34:42.351125236 -0700 +@@ -53,7 +53,7 @@ + mkdefs_SOURCES = mkdefs.c + + gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs +- ./mkdefs gdefs.h < $(top_srcdir)/lib/gvpr/gprdata ++ touch gdefs.h + + EXTRA_DIST = $(man_MANS) $(pdf_DATA) gprdata mkdefs.c gdefs.h trie.c gvprlib.vcproj + +diff -r -u graphviz-2.38.0/lib/gvpr/Makefile.in src/lib/gvpr/Makefile.in +--- graphviz-2.38.0/lib/gvpr/Makefile.in 2014-04-13 13:41:55.000000000 -0700 ++++ src/lib/gvpr/Makefile.in 2016-04-02 20:35:14.926790938 -0700 +@@ -1065,7 +1065,7 @@ + - @GROFF@ -Tps -man $(srcdir)/gvpr.3 | @PS2PDF@ - - >gvpr.3.pdf + + gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs +- ./mkdefs gdefs.h < $(top_srcdir)/lib/gvpr/gprdata ++ touch gdefs.h + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/packages/graphviz/sfdpgen-free.patch b/packages/graphviz/sfdpgen-free.patch new file mode 100644 index 000000000..ec35c6fda --- /dev/null +++ b/packages/graphviz/sfdpgen-free.patch @@ -0,0 +1,11 @@ +--- src/lib/sfdpgen/PriorityQueue.c.orig 2016-04-01 08:29:58.788223689 -0700 ++++ src/lib/sfdpgen/PriorityQueue.c 2016-04-01 08:30:44.507731384 -0700 +@@ -11,6 +11,8 @@ + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + *************************************************************************/ + ++void free(void *ptr); ++ + #include "LinkedList.h" + #include "PriorityQueue.h" + #include "memory.h"