wok-current view vala/stuff/disable-graphviz.patch @ rev 25701

Fix dep for libglamoregl.so (libepoxy), and miss file for amdgpu (thanks alanyih)
author Stanislas Leduc <shann@slitaz.org>
date Fri Apr 19 12:48:51 2024 +0000 (2 months ago)
parents
children
line source
1 --- ./configure.ac.orig 2019-03-10 13:06:41.459005634 -0500
2 +++ ./configure.ac 2019-03-10 13:11:12.155008532 -0500
3 @@ -158,8 +158,11 @@
5 AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes)
6 if test x$enable_valadoc = xyes; then
7 +AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
8 +if test x$enable_graphviz = xyes; then
9 PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
10 AC_MSG_CHECKING([for CGRAPH])
11 + VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
12 cgraph_tmp_LIBADD="$LIBADD"
13 cgraph_tmp_CFLAGS="$CFLAGS"
14 LIBADD="$LIBADD $LIBGVC_LIBS"
15 @@ -186,6 +189,8 @@
16 LIBADD="$cgraph_tmp_LIBADD"
17 CFLAGS="$cgraph_tmp_CFLAGS"
18 fi
19 +AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
20 +fi
21 AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
22 AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
24 --- ./libvaladoc/html/basicdoclet.vala.orig 2019-03-07 06:45:45.000000000 -0600
25 +++ ./libvaladoc/html/basicdoclet.vala 2019-03-10 13:06:41.513005635 -0500
26 @@ -46,7 +46,11 @@
27 protected HtmlRenderer _renderer;
28 protected Html.MarkupWriter writer;
29 protected Html.CssClassResolver cssresolver;
30 +#if HAVE_GRAPHVIZ
31 protected Charts.Factory image_factory;
32 +#else
33 + protected void* image_factory;
34 +#endif
35 protected ErrorReporter reporter;
36 protected string package_list_link = "../index.html";
38 @@ -120,7 +124,9 @@
39 this.linker = new LinkHelper ();
41 _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
42 +#if HAVE_GRAPHVIZ
43 this.image_factory = new SimpleChartFactory (settings, linker);
44 +#endif
45 }
48 @@ -1025,6 +1031,7 @@
49 }
51 protected void write_image_block (Api.Node element) {
52 +#if HAVE_GRAPHVIZ
53 if (element is Class || element is Interface || element is Struct) {
54 unowned string format = (settings.use_svg_images ? "svg" : "png");
55 var chart = new Charts.Hierarchy (image_factory, element);
56 @@ -1044,6 +1051,7 @@
57 this.get_img_path_html (element, format)});
58 writer.add_usemap (chart);
59 }
60 +#endif
61 }
63 public void write_namespace_content (Namespace node, Api.Node? parent) {
64 --- ./libvaladoc/html/htmlmarkupwriter.vala.orig 2019-03-07 06:45:45.000000000 -0600
65 +++ ./libvaladoc/html/htmlmarkupwriter.vala 2019-03-10 13:06:41.528005635 -0500
66 @@ -51,12 +51,16 @@
67 }
68 }
70 +#if HAVE_GRAPHVIZ
71 public unowned MarkupWriter add_usemap (Charts.Chart chart) {
72 string? buf = (string?) chart.write_buffer ("cmapx");
73 if (buf != null) {
74 raw_text ("\n");
75 raw_text ((!) buf);
76 }
77 +#else
78 + public unowned MarkupWriter add_usemap (void* chart) {
79 +#endif
81 return this;
82 }
83 --- ./libvaladoc/Makefile.am.orig 2019-03-07 08:55:35.000000000 -0600
84 +++ ./libvaladoc/Makefile.am 2019-03-10 13:06:41.509005635 -0500
85 @@ -119,10 +119,6 @@
86 content/tablerow.vala \
87 content/taglet.vala \
88 content/text.vala \
89 - charts/chart.vala \
90 - charts/chartfactory.vala \
91 - charts/hierarchychart.vala \
92 - charts/simplechartfactory.vala \
93 parser/manyrule.vala \
94 parser/oneofrule.vala \
95 parser/optionalrule.vala \
96 @@ -149,13 +145,24 @@
97 highlighter/codetoken.vala \
98 highlighter/highlighter.vala \
99 html/basicdoclet.vala \
100 - html/htmlchartfactory.vala \
101 html/linkhelper.vala \
102 html/cssclassresolver.vala \
103 html/htmlmarkupwriter.vala \
104 html/htmlrenderer.vala \
105 $(NULL)
107 +if ENABLE_GRAPHVIZ
108 +libvaladoc_la_VALASOURCES += \
109 + charts/chart.vala \
110 + charts/chartfactory.vala \
111 + charts/hierarchychart.vala \
112 + charts/simplechartfactory.vala \
113 + html/htmlchartfactory.vala \
114 + $(NULL)
115 +
116 +LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
117 +endif
118 +
119 libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
120 libvaladoc.vala.stamp \
121 $(libvaladoc_la_VALASOURCES:.vala=.c) \
122 @@ -175,11 +182,11 @@
123 --library valadoc \
124 --vapi valadoc@PACKAGE_SUFFIX@.vapi \
125 --vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
126 - --vapidir $(top_srcdir)/vapi --pkg libgvc \
127 --vapidir $(top_srcdir)/gee --pkg gee \
128 --vapidir $(top_srcdir)/vala --pkg vala \
129 --vapidir $(top_srcdir)/ccode --pkg ccode \
130 --vapidir $(top_srcdir)/codegen --pkg codegen \
131 + $(LIBGVC_PKG) \
132 --pkg config \
133 $(filter %.vala %.c,$^)
134 touch $@
135 @@ -207,6 +214,9 @@
137 valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
138 cp $< $@
139 +if !ENABLE_GRAPHVIZ
140 + sed -i "s/libgvc //g" $@
141 +endif
143 vapidir = $(datadir)/vala/vapi
144 dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
145 @@ -214,6 +224,9 @@
147 valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
148 cp $< $@
149 +if !ENABLE_GRAPHVIZ
150 + sed -i "s/libgvc//g" $@
151 +endif
153 EXTRA_DIST = \
154 $(libvaladoc_la_VALASOURCES) \