wok-current diff vala/stuff/disable-graphviz.patch @ rev 25698
Fix ntfs-3g receipt
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Tue Apr 16 19:01:01 2024 +0000 (7 months ago) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/vala/stuff/disable-graphviz.patch Tue Apr 16 19:01:01 2024 +0000 1.3 @@ -0,0 +1,154 @@ 1.4 +--- ./configure.ac.orig 2019-03-10 13:06:41.459005634 -0500 1.5 ++++ ./configure.ac 2019-03-10 13:11:12.155008532 -0500 1.6 +@@ -158,8 +158,11 @@ 1.7 + 1.8 + AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes) 1.9 + if test x$enable_valadoc = xyes; then 1.10 ++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes) 1.11 ++if test x$enable_graphviz = xyes; then 1.12 + PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED) 1.13 + AC_MSG_CHECKING([for CGRAPH]) 1.14 ++ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ" 1.15 + cgraph_tmp_LIBADD="$LIBADD" 1.16 + cgraph_tmp_CFLAGS="$CFLAGS" 1.17 + LIBADD="$LIBADD $LIBGVC_LIBS" 1.18 +@@ -186,6 +189,8 @@ 1.19 + LIBADD="$cgraph_tmp_LIBADD" 1.20 + CFLAGS="$cgraph_tmp_CFLAGS" 1.21 + fi 1.22 ++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes) 1.23 ++fi 1.24 + AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes") 1.25 + AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes) 1.26 + 1.27 +--- ./libvaladoc/html/basicdoclet.vala.orig 2019-03-07 06:45:45.000000000 -0600 1.28 ++++ ./libvaladoc/html/basicdoclet.vala 2019-03-10 13:06:41.513005635 -0500 1.29 +@@ -46,7 +46,11 @@ 1.30 + protected HtmlRenderer _renderer; 1.31 + protected Html.MarkupWriter writer; 1.32 + protected Html.CssClassResolver cssresolver; 1.33 ++#if HAVE_GRAPHVIZ 1.34 + protected Charts.Factory image_factory; 1.35 ++#else 1.36 ++ protected void* image_factory; 1.37 ++#endif 1.38 + protected ErrorReporter reporter; 1.39 + protected string package_list_link = "../index.html"; 1.40 + 1.41 +@@ -120,7 +124,9 @@ 1.42 + this.linker = new LinkHelper (); 1.43 + 1.44 + _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver); 1.45 ++#if HAVE_GRAPHVIZ 1.46 + this.image_factory = new SimpleChartFactory (settings, linker); 1.47 ++#endif 1.48 + } 1.49 + 1.50 + 1.51 +@@ -1025,6 +1031,7 @@ 1.52 + } 1.53 + 1.54 + protected void write_image_block (Api.Node element) { 1.55 ++#if HAVE_GRAPHVIZ 1.56 + if (element is Class || element is Interface || element is Struct) { 1.57 + unowned string format = (settings.use_svg_images ? "svg" : "png"); 1.58 + var chart = new Charts.Hierarchy (image_factory, element); 1.59 +@@ -1044,6 +1051,7 @@ 1.60 + this.get_img_path_html (element, format)}); 1.61 + writer.add_usemap (chart); 1.62 + } 1.63 ++#endif 1.64 + } 1.65 + 1.66 + public void write_namespace_content (Namespace node, Api.Node? parent) { 1.67 +--- ./libvaladoc/html/htmlmarkupwriter.vala.orig 2019-03-07 06:45:45.000000000 -0600 1.68 ++++ ./libvaladoc/html/htmlmarkupwriter.vala 2019-03-10 13:06:41.528005635 -0500 1.69 +@@ -51,12 +51,16 @@ 1.70 + } 1.71 + } 1.72 + 1.73 ++#if HAVE_GRAPHVIZ 1.74 + public unowned MarkupWriter add_usemap (Charts.Chart chart) { 1.75 + string? buf = (string?) chart.write_buffer ("cmapx"); 1.76 + if (buf != null) { 1.77 + raw_text ("\n"); 1.78 + raw_text ((!) buf); 1.79 + } 1.80 ++#else 1.81 ++ public unowned MarkupWriter add_usemap (void* chart) { 1.82 ++#endif 1.83 + 1.84 + return this; 1.85 + } 1.86 +--- ./libvaladoc/Makefile.am.orig 2019-03-07 08:55:35.000000000 -0600 1.87 ++++ ./libvaladoc/Makefile.am 2019-03-10 13:06:41.509005635 -0500 1.88 +@@ -119,10 +119,6 @@ 1.89 + content/tablerow.vala \ 1.90 + content/taglet.vala \ 1.91 + content/text.vala \ 1.92 +- charts/chart.vala \ 1.93 +- charts/chartfactory.vala \ 1.94 +- charts/hierarchychart.vala \ 1.95 +- charts/simplechartfactory.vala \ 1.96 + parser/manyrule.vala \ 1.97 + parser/oneofrule.vala \ 1.98 + parser/optionalrule.vala \ 1.99 +@@ -149,13 +145,24 @@ 1.100 + highlighter/codetoken.vala \ 1.101 + highlighter/highlighter.vala \ 1.102 + html/basicdoclet.vala \ 1.103 +- html/htmlchartfactory.vala \ 1.104 + html/linkhelper.vala \ 1.105 + html/cssclassresolver.vala \ 1.106 + html/htmlmarkupwriter.vala \ 1.107 + html/htmlrenderer.vala \ 1.108 + $(NULL) 1.109 + 1.110 ++if ENABLE_GRAPHVIZ 1.111 ++libvaladoc_la_VALASOURCES += \ 1.112 ++ charts/chart.vala \ 1.113 ++ charts/chartfactory.vala \ 1.114 ++ charts/hierarchychart.vala \ 1.115 ++ charts/simplechartfactory.vala \ 1.116 ++ html/htmlchartfactory.vala \ 1.117 ++ $(NULL) 1.118 ++ 1.119 ++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc 1.120 ++endif 1.121 ++ 1.122 + libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \ 1.123 + libvaladoc.vala.stamp \ 1.124 + $(libvaladoc_la_VALASOURCES:.vala=.c) \ 1.125 +@@ -175,11 +182,11 @@ 1.126 + --library valadoc \ 1.127 + --vapi valadoc@PACKAGE_SUFFIX@.vapi \ 1.128 + --vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \ 1.129 +- --vapidir $(top_srcdir)/vapi --pkg libgvc \ 1.130 + --vapidir $(top_srcdir)/gee --pkg gee \ 1.131 + --vapidir $(top_srcdir)/vala --pkg vala \ 1.132 + --vapidir $(top_srcdir)/ccode --pkg ccode \ 1.133 + --vapidir $(top_srcdir)/codegen --pkg codegen \ 1.134 ++ $(LIBGVC_PKG) \ 1.135 + --pkg config \ 1.136 + $(filter %.vala %.c,$^) 1.137 + touch $@ 1.138 +@@ -207,6 +214,9 @@ 1.139 + 1.140 + valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc 1.141 + cp $< $@ 1.142 ++if !ENABLE_GRAPHVIZ 1.143 ++ sed -i "s/libgvc //g" $@ 1.144 ++endif 1.145 + 1.146 + vapidir = $(datadir)/vala/vapi 1.147 + dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi 1.148 +@@ -214,6 +224,9 @@ 1.149 + 1.150 + valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps 1.151 + cp $< $@ 1.152 ++if !ENABLE_GRAPHVIZ 1.153 ++ sed -i "s/libgvc//g" $@ 1.154 ++endif 1.155 + 1.156 + EXTRA_DIST = \ 1.157 + $(libvaladoc_la_VALASOURCES) \