From 693d2212e4c5ae5178b813a60247e6df2172051a Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sat, 18 Apr 2020 19:24:31 +0200 Subject: [PATCH] graphviz: fix regex problem when graphviz parses plugins Fixes https://github.com/termux/termux-packages/issues/5135 --- packages/graphviz/build.sh | 1 + packages/graphviz/lib-gvc-gvconfig.c.patch | 23 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 packages/graphviz/lib-gvc-gvconfig.c.patch diff --git a/packages/graphviz/build.sh b/packages/graphviz/build.sh index f578f40da..3aebac3ee 100644 --- a/packages/graphviz/build.sh +++ b/packages/graphviz/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.graphviz.org/ TERMUX_PKG_DESCRIPTION="Rich set of graph drawing tools" TERMUX_PKG_LICENSE="EPL-2.0" TERMUX_PKG_VERSION=2.44.0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://www2.graphviz.org/Packages/stable/portable_source/graphviz-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=9aabd13a8018b708ab3c822de2326c19d0a52ed59f50a6b0f9318c07e2a6d93b TERMUX_PKG_DEPENDS="libandroid-glob, libc++, libcairo, pango, libexpat, libltdl, librsvg, libgd, zlib" diff --git a/packages/graphviz/lib-gvc-gvconfig.c.patch b/packages/graphviz/lib-gvc-gvconfig.c.patch new file mode 100644 index 000000000..77cbcdfce --- /dev/null +++ b/packages/graphviz/lib-gvc-gvconfig.c.patch @@ -0,0 +1,23 @@ +--- ../gvconfig.c.orig 2020-04-18 19:07:49.625114827 +0200 ++++ ./lib/gvc/gvconfig.c 2020-04-18 19:16:04.460802577 +0200 +@@ -393,7 +393,7 @@ + char *plugin_re_end = "$"; + #else + /* Everyone else */ +- char *plugin_re_beg = "\\.so\\."; ++ char *plugin_re_beg = "\\.so"; + char *plugin_re_end= "$"; + #endif + +@@ -417,10 +417,8 @@ + + #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) + sprintf(config_re,"%s%s", plugin_re_beg, plugin_re_end); +-#elif defined(GVPLUGIN_VERSION) +- sprintf(config_re,"%s%d%s", plugin_re_beg, GVPLUGIN_VERSION, plugin_re_end); + #else +- sprintf(config_re,"%s[0-9]+%s", plugin_re_beg, plugin_re_end); ++ sprintf(config_re,"%s%s", plugin_re_beg, plugin_re_end); + #endif + + if (regcomp(&re, config_re, REG_EXTENDED|REG_NOSUB) != 0) {