summaryrefslogtreecommitdiff
path: root/source/d/vala/disable-graphviz.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/vala/disable-graphviz.patch')
-rw-r--r--source/d/vala/disable-graphviz.patch210
1 files changed, 82 insertions, 128 deletions
diff --git a/source/d/vala/disable-graphviz.patch b/source/d/vala/disable-graphviz.patch
index 54631335..e29da728 100644
--- a/source/d/vala/disable-graphviz.patch
+++ b/source/d/vala/disable-graphviz.patch
@@ -1,75 +1,88 @@
---- ./configure.ac.orig 2018-12-20 08:54:58.000000000 -0600
-+++ ./configure.ac 2018-12-20 12:32:05.649552535 -0600
-@@ -119,34 +119,38 @@
- AC_SUBST(GMODULE_CFLAGS)
- AC_SUBST(GMODULE_LIBS)
+--- ./configure.ac.orig 2019-03-10 13:06:41.459005634 -0500
++++ ./configure.ac 2019-03-10 13:11:12.155008532 -0500
+@@ -158,8 +158,11 @@
--PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
--AC_MSG_CHECKING([for CGRAPH])
--cgraph_tmp_LIBADD="$LIBADD"
--cgraph_tmp_CFLAGS="$CFLAGS"
--LIBADD="$LIBADD $LIBGVC_LIBS"
--CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
--AC_RUN_IFELSE(
-- [AC_LANG_SOURCE([
-- #include <gvc.h>
--
-- int main(void) {
-- #ifdef WITH_CGRAPH
-- return 0;
-- #else
-- return -1;
-- #endif
-- }
-- ])], [
-- AC_MSG_RESULT([yes])
-- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
-- have_cgraph=yes
-- ], [
-- AC_MSG_RESULT([no])
-- have_cgraph=no
-- ]
--)
--LIBADD="$cgraph_tmp_LIBADD"
--CFLAGS="$cgraph_tmp_CFLAGS"
+ AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes)
+ if test x$enable_valadoc = xyes; then
+AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
+if test x$enable_graphviz = xyes; then
-+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
-+ AC_MSG_CHECKING([for CGRAPH])
+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+ AC_MSG_CHECKING([for CGRAPH])
+ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
-+ cgraph_tmp_LIBADD="$LIBADD"
-+ cgraph_tmp_CFLAGS="$CFLAGS"
-+ LIBADD="$LIBADD $LIBGVC_LIBS"
-+ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
-+ AC_RUN_IFELSE(
-+ [AC_LANG_SOURCE([
-+ #include <gvc.h>
-+ int main(void) {
-+ #ifdef WITH_CGRAPH
-+ return 0;
-+ #else
-+ return -1;
-+ #endif
-+ }
-+ ])], [
-+ AC_MSG_RESULT([yes])
-+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
-+ have_cgraph=yes
-+ ], [
-+ AC_MSG_RESULT([no])
-+ have_cgraph=no
-+ ]
-+ )
-+ LIBADD="$cgraph_tmp_LIBADD"
-+ CFLAGS="$cgraph_tmp_CFLAGS"
-+fi
+ cgraph_tmp_LIBADD="$LIBADD"
+ cgraph_tmp_CFLAGS="$CFLAGS"
+ LIBADD="$LIBADD $LIBGVC_LIBS"
+@@ -186,6 +189,8 @@
+ LIBADD="$cgraph_tmp_LIBADD"
+ CFLAGS="$cgraph_tmp_CFLAGS"
+ fi
+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
++fi
AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+ AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
+
+--- ./libvaladoc/html/basicdoclet.vala.orig 2019-03-07 06:45:45.000000000 -0600
++++ ./libvaladoc/html/basicdoclet.vala 2019-03-10 13:06:41.513005635 -0500
+@@ -46,7 +46,11 @@
+ protected HtmlRenderer _renderer;
+ protected Html.MarkupWriter writer;
+ protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ protected Charts.Factory image_factory;
++#else
++ protected void* image_factory;
++#endif
+ protected ErrorReporter reporter;
+ protected string package_list_link = "../index.html";
+
+@@ -120,7 +124,9 @@
+ this.linker = new LinkHelper ();
+
+ _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ }
+
+
+@@ -1025,6 +1031,7 @@
+ }
+
+ protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ if (element is Class || element is Interface || element is Struct) {
+ unowned string format = (settings.use_svg_images ? "svg" : "png");
+ var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1044,6 +1051,7 @@
+ this.get_img_path_html (element, format)});
+ writer.add_usemap (chart);
+ }
++#endif
+ }
- AC_PATH_PROG([XSLTPROC], [xsltproc], :)
---- ./libvaladoc/Makefile.am.orig 2018-12-20 08:00:31.000000000 -0600
-+++ ./libvaladoc/Makefile.am 2018-12-20 12:33:26.911553405 -0600
-@@ -128,10 +128,6 @@
+ public void write_namespace_content (Namespace node, Api.Node? parent) {
+--- ./libvaladoc/html/htmlmarkupwriter.vala.orig 2019-03-07 06:45:45.000000000 -0600
++++ ./libvaladoc/html/htmlmarkupwriter.vala 2019-03-10 13:06:41.528005635 -0500
+@@ -51,12 +51,16 @@
+ }
+ }
+
++#if HAVE_GRAPHVIZ
+ public unowned MarkupWriter add_usemap (Charts.Chart chart) {
+ string? buf = (string?) chart.write_buffer ("cmapx");
+ if (buf != null) {
+ raw_text ("\n");
+ raw_text ((!) buf);
+ }
++#else
++ public unowned MarkupWriter add_usemap (void* chart) {
++#endif
+
+ return this;
+ }
+--- ./libvaladoc/Makefile.am.orig 2019-03-07 08:55:35.000000000 -0600
++++ ./libvaladoc/Makefile.am 2019-03-10 13:06:41.509005635 -0500
+@@ -119,10 +119,6 @@
content/tablerow.vala \
content/taglet.vala \
content/text.vala \
@@ -80,7 +93,7 @@
parser/manyrule.vala \
parser/oneofrule.vala \
parser/optionalrule.vala \
-@@ -158,13 +154,24 @@
+@@ -149,13 +145,24 @@
highlighter/codetoken.vala \
highlighter/highlighter.vala \
html/basicdoclet.vala \
@@ -106,7 +119,7 @@
libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
libvaladoc.vala.stamp \
$(libvaladoc_la_VALASOURCES:.vala=.c) \
-@@ -184,11 +191,11 @@
+@@ -175,11 +182,11 @@
--library valadoc \
--vapi valadoc@PACKAGE_SUFFIX@.vapi \
--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
@@ -119,7 +132,7 @@
--pkg config \
$(filter %.vala %.c,$^)
touch $@
-@@ -217,6 +224,9 @@
+@@ -207,6 +214,9 @@
valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
cp $< $@
@@ -129,7 +142,7 @@
vapidir = $(datadir)/vala/vapi
dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
-@@ -224,6 +234,9 @@
+@@ -214,6 +224,9 @@
valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
cp $< $@
@@ -139,62 +152,3 @@
EXTRA_DIST = \
$(libvaladoc_la_VALASOURCES) \
---- ./libvaladoc/html/basicdoclet.vala.orig 2018-12-20 08:00:31.000000000 -0600
-+++ ./libvaladoc/html/basicdoclet.vala 2018-12-20 12:32:05.661552535 -0600
-@@ -46,7 +46,11 @@
- protected HtmlRenderer _renderer;
- protected Html.MarkupWriter writer;
- protected Html.CssClassResolver cssresolver;
-+#if HAVE_GRAPHVIZ
- protected Charts.Factory image_factory;
-+#else
-+ protected void* image_factory;
-+#endif
- protected ErrorReporter reporter;
- protected string package_list_link = "../index.html";
-
-@@ -120,7 +124,9 @@
- this.linker = new LinkHelper ();
-
- _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
-+#if HAVE_GRAPHVIZ
- this.image_factory = new SimpleChartFactory (settings, linker);
-+#endif
- }
-
-
-@@ -1026,6 +1032,7 @@
- }
-
- protected void write_image_block (Api.Node element) {
-+#if HAVE_GRAPHVIZ
- if (element is Class || element is Interface || element is Struct) {
- unowned string format = (settings.use_svg_images ? "svg" : "png");
- var chart = new Charts.Hierarchy (image_factory, element);
-@@ -1045,6 +1052,7 @@
- this.get_img_path_html (element, format)});
- writer.add_usemap (chart);
- }
-+#endif
- }
-
- public void write_namespace_content (Namespace node, Api.Node? parent) {
---- ./libvaladoc/html/htmlmarkupwriter.vala.orig 2018-12-20 08:54:58.000000000 -0600
-+++ ./libvaladoc/html/htmlmarkupwriter.vala 2018-12-20 12:32:05.662552535 -0600
-@@ -51,12 +51,16 @@
- }
- }
-
-+#if HAVE_GRAPHVIZ
- public unowned MarkupWriter add_usemap (Charts.Chart chart) {
- string? buf = (string?) chart.write_buffer ("cmapx");
- if (buf != null) {
- raw_text ("\n");
- raw_text ((!) buf);
- }
-+#else
-+ public unowned MarkupWriter add_usemap (void* chart) {
-+#endif
-
- return this;
- }