graphviz: Fix a few issues
authorFredrik Fornwall <fredrik@fornwall.net>
Sat, 29 Oct 2016 21:27:16 +0000 (17:27 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Sat, 29 Oct 2016 21:27:16 +0000 (17:27 -0400)
- Remove two unneeded patches.
- Do not install a custom libltdl, use the system one.
- Add dependency on librsvg and libgd.

packages/graphviz/build.sh
packages/graphviz/fix-edgepaintmain-include.patch [deleted file]
packages/graphviz/fix-gdefs-include.patch [deleted file]

index 2d095a5..a8eea74 100644 (file)
@@ -4,11 +4,29 @@ 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_DEPENDS="libandroid-glob,libcairo,pango,libexpat,libltdl,librsvg,libgd"
+TERMUX_PKG_BUILD_IN_SRC=yes
+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
+--with-pic --with-x=no --with-pangocairo=yes
+--with-ltdl-include=$TERMUX_PREFIX/include --with-ltdl-lib=$TERMUX_PREFIX/lib"
 TERMUX_PKG_RM_AFTER_INSTALL="bin/*-config share/man/man1/*-config.1"
 
 termux_step_pre_configure() {
-    LDFLAGS+=" -landroid-glob"
-    cp -r ../src/* .
+       LDFLAGS+=" -landroid-glob"
+}
+
+termux_step_post_make_install() {
+       # Some binaries (dot_builtins, gvpack) links against these:
+       cd $TERMUX_PREFIX/lib
+       for lib in graphviz/*.so.*; do
+               ln -s -f $lib `basename $lib`
+       done
+}
+
+termux_step_create_debscripts () {
+       echo "dot -c" > postinst
+       echo "exit 0" >> postinst
+       chmod 0755 postinst
 }
diff --git a/packages/graphviz/fix-edgepaintmain-include.patch b/packages/graphviz/fix-edgepaintmain-include.patch
deleted file mode 100644 (file)
index cebaa9c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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 <cgraph.h>
- #include <agxbuf.h>
- #include <ingraphs.h>
--#include <pointset.h>
-+#include "pointset.h"
- #ifdef HAVE_GETOPT_H
- #include <getopt.h>
- #else
diff --git a/packages/graphviz/fix-gdefs-include.patch b/packages/graphviz/fix-gdefs-include.patch
deleted file mode 100644 (file)
index 43f9ce5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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 <gdefs.h>
-+#include "gdefs.h"
- #include "ctype.h"
- #include "trie.c"