summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/vala
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-04-15 12:54:44 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-16 11:10:02 +0100
commit62d64f4441fbf28c1c48ad5e6d962b782c917bb5 (patch)
tree245027a6c877c9b4316b1023b40b02e416438536 /meta/recipes-devtools/vala
parentc7a29f18e2bfbfdcc7c9e45f694683d381217452 (diff)
downloadpoky-62d64f4441fbf28c1c48ad5e6d962b782c917bb5.tar.gz
vala: update to 0.44.3
Remove valadoc-related patches, as upstream added an option to disable it; adjust the recipe accordingly. (From OE-Core rev: dc4555d3cb6109e57c2dcfcc6713f69e1ef99755) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/vala')
-rw-r--r--meta/recipes-devtools/vala/vala.inc2
-rw-r--r--meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch32
-rw-r--r--meta/recipes-devtools/vala/vala/disable-graphviz.patch226
-rw-r--r--meta/recipes-devtools/vala/vala_0.42.5.bb10
-rw-r--r--meta/recipes-devtools/vala/vala_0.44.3.bb8
5 files changed, 9 insertions, 269 deletions
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index f680640ca6..703ed1aa8d 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -37,7 +37,7 @@ EOF
37 chmod +x ${B}/vapigen-wrapper 37 chmod +x ${B}/vapigen-wrapper
38} 38}
39 39
40EXTRA_OECONF += " --disable-graphviz" 40EXTRA_OECONF += " --disable-valadoc"
41 41
42# Vapigen wrapper needs to be available system-wide, because it will be used 42# Vapigen wrapper needs to be available system-wide, because it will be used
43# to build vapi files from all other packages with vala support 43# to build vapi files from all other packages with vala support
diff --git a/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch b/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
deleted file mode 100644
index 9b27b7fd14..0000000000
--- a/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From b6ca3876e233c724fd460c1579abc4ab63c8d01e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 4 Oct 2017 15:23:08 +0300
4Subject: [PATCH] Disable valadoc
5
6Valadoc is a documentation generator for Vala sources, which was
7recently merged into the main vala source tree. Unsurprisingly,
8it's broken in cross-compile environment in multiple ways,
9so let's fix it some other time.
10
11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 Makefile.am | 2 --
15 1 file changed, 2 deletions(-)
16
17diff --git a/Makefile.am b/Makefile.am
18index e5dc0cc..813b3fc 100644
19--- a/Makefile.am
20+++ b/Makefile.am
21@@ -13,8 +13,6 @@ SUBDIRS = \
22 doc \
23 gobject-introspection \
24 vapigen \
25- libvaladoc \
26- valadoc \
27 $(NULL)
28
29 if ENABLE_UNVERSIONED
30--
312.14.1
32
diff --git a/meta/recipes-devtools/vala/vala/disable-graphviz.patch b/meta/recipes-devtools/vala/vala/disable-graphviz.patch
deleted file mode 100644
index e521bc854b..0000000000
--- a/meta/recipes-devtools/vala/vala/disable-graphviz.patch
+++ /dev/null
@@ -1,226 +0,0 @@
1From b2723ff18b70c67c8a7fab5375a7f3c442d49790 Mon Sep 17 00:00:00 2001
2From: Rico Tzschichholz <ricotz@ubuntu.com>
3Date: Wed, 6 Sep 2017 18:52:55 +0200
4Subject: [PATCH] libvaladoc: Allow disabling the graphviz dependency of
5
6 valadoc
7
8https://bugzilla.gnome.org/show_bug.cgi?id=787375
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10Upstream-Status: Submitted [bugzilla link above]
11
12---
13 configure.ac | 60 ++++++++++++++-------------
14 libvaladoc/Makefile.am | 25 ++++++++---
15 libvaladoc/html/basicdoclet.vala | 8 ++++
16 libvaladoc/html/htmlmarkupwriter.vala | 4 ++
17 4 files changed, 63 insertions(+), 34 deletions(-)
18
19diff --git a/configure.ac b/configure.ac
20index 730c72d..af81986 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -119,34 +119,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
24 AC_SUBST(GMODULE_CFLAGS)
25 AC_SUBST(GMODULE_LIBS)
26
27-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
28-AC_MSG_CHECKING([for CGRAPH])
29-cgraph_tmp_LIBADD="$LIBADD"
30-cgraph_tmp_CFLAGS="$CFLAGS"
31-LIBADD="$LIBADD $LIBGVC_LIBS"
32-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
33-AC_RUN_IFELSE(
34- [AC_LANG_SOURCE([
35- #include <gvc.h>
36-
37- int main(void) {
38- #ifdef WITH_CGRAPH
39- return 0;
40- #else
41- return -1;
42- #endif
43- }
44- ])], [
45- AC_MSG_RESULT([yes])
46- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
47- have_cgraph=yes
48- ], [
49- AC_MSG_RESULT([no])
50- have_cgraph=no
51- ]
52-)
53-LIBADD="$cgraph_tmp_LIBADD"
54-CFLAGS="$cgraph_tmp_CFLAGS"
55+AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
56+if test x$enable_graphviz = xyes; then
57+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
58+ AC_MSG_CHECKING([for CGRAPH])
59+ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
60+ cgraph_tmp_LIBADD="$LIBADD"
61+ cgraph_tmp_CFLAGS="$CFLAGS"
62+ LIBADD="$LIBADD $LIBGVC_LIBS"
63+ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
64+ AC_RUN_IFELSE(
65+ [AC_LANG_SOURCE([
66+ #include <gvc.h>
67+ int main(void) {
68+ #ifdef WITH_CGRAPH
69+ return 0;
70+ #else
71+ return -1;
72+ #endif
73+ }
74+ ])], [
75+ AC_MSG_RESULT([yes])
76+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
77+ have_cgraph=yes
78+ ], [
79+ AC_MSG_RESULT([no])
80+ have_cgraph=no
81+ ]
82+ )
83+ LIBADD="$cgraph_tmp_LIBADD"
84+ CFLAGS="$cgraph_tmp_CFLAGS"
85+fi
86+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
87 AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
88
89 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
90diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
91index f3f790e..3c5dc4c 100644
92--- a/libvaladoc/Makefile.am
93+++ b/libvaladoc/Makefile.am
94@@ -128,10 +128,6 @@ libvaladoc_la_VALASOURCES = \
95 content/tablerow.vala \
96 content/taglet.vala \
97 content/text.vala \
98- charts/chart.vala \
99- charts/chartfactory.vala \
100- charts/hierarchychart.vala \
101- charts/simplechartfactory.vala \
102 parser/manyrule.vala \
103 parser/oneofrule.vala \
104 parser/optionalrule.vala \
105@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
106 highlighter/codetoken.vala \
107 highlighter/highlighter.vala \
108 html/basicdoclet.vala \
109- html/htmlchartfactory.vala \
110 html/linkhelper.vala \
111 html/cssclassresolver.vala \
112 html/htmlmarkupwriter.vala \
113 html/htmlrenderer.vala \
114 $(NULL)
115
116+if ENABLE_GRAPHVIZ
117+libvaladoc_la_VALASOURCES += \
118+ charts/chart.vala \
119+ charts/chartfactory.vala \
120+ charts/hierarchychart.vala \
121+ charts/simplechartfactory.vala \
122+ html/htmlchartfactory.vala \
123+ $(NULL)
124+
125+LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
126+endif
127+
128 libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
129 libvaladoc.vala.stamp \
130 $(libvaladoc_la_VALASOURCES:.vala=.c) \
131@@ -184,11 +191,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
132 --library valadoc \
133 --vapi valadoc@PACKAGE_SUFFIX@.vapi \
134 --vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
135- --vapidir $(top_srcdir)/vapi --pkg libgvc \
136 --vapidir $(top_srcdir)/gee --pkg gee \
137 --vapidir $(top_srcdir)/vala --pkg vala \
138 --vapidir $(top_srcdir)/ccode --pkg ccode \
139 --vapidir $(top_srcdir)/codegen --pkg codegen \
140+ $(LIBGVC_PKG) \
141 --pkg config \
142 $(filter %.vala %.c,$^)
143 touch $@
144@@ -217,6 +224,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
145
146 valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
147 cp $< $@
148+if !ENABLE_GRAPHVIZ
149+ sed -i "s/libgvc //g" $@
150+endif
151
152 vapidir = $(datadir)/vala/vapi
153 dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
154@@ -224,6 +234,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
155
156 valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
157 cp $< $@
158+if !ENABLE_GRAPHVIZ
159+ sed -i "s/libgvc//g" $@
160+endif
161
162 EXTRA_DIST = \
163 $(libvaladoc_la_VALASOURCES) \
164diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
165index 192e488..ec09602 100644
166--- a/libvaladoc/html/basicdoclet.vala
167+++ b/libvaladoc/html/basicdoclet.vala
168@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
169 protected HtmlRenderer _renderer;
170 protected Html.MarkupWriter writer;
171 protected Html.CssClassResolver cssresolver;
172+#if HAVE_GRAPHVIZ
173 protected Charts.Factory image_factory;
174+#else
175+ protected void* image_factory;
176+#endif
177 protected ErrorReporter reporter;
178 protected string package_list_link = "../index.html";
179
180@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
181 this.linker = new LinkHelper ();
182
183 _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
184+#if HAVE_GRAPHVIZ
185 this.image_factory = new SimpleChartFactory (settings, linker);
186+#endif
187 }
188
189
190@@ -1026,6 +1032,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
191 }
192
193 protected void write_image_block (Api.Node element) {
194+#if HAVE_GRAPHVIZ
195 if (element is Class || element is Interface || element is Struct) {
196 unowned string format = (settings.use_svg_images ? "svg" : "png");
197 var chart = new Charts.Hierarchy (image_factory, element);
198@@ -1045,6 +1052,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
199 this.get_img_path_html (element, format)});
200 writer.add_usemap (chart);
201 }
202+#endif
203 }
204
205 public void write_namespace_content (Namespace node, Api.Node? parent) {
206diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
207index 5aa4afd..e79b0b8 100644
208--- a/libvaladoc/html/htmlmarkupwriter.vala
209+++ b/libvaladoc/html/htmlmarkupwriter.vala
210@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
211 }
212 }
213
214+#if HAVE_GRAPHVIZ
215 public unowned MarkupWriter add_usemap (Charts.Chart chart) {
216 string? buf = (string?) chart.write_buffer ("cmapx");
217 if (buf != null) {
218 raw_text ("\n");
219 raw_text ((!) buf);
220 }
221+#else
222+ public unowned MarkupWriter add_usemap (void* chart) {
223+#endif
224
225 return this;
226 }
diff --git a/meta/recipes-devtools/vala/vala_0.42.5.bb b/meta/recipes-devtools/vala/vala_0.42.5.bb
deleted file mode 100644
index eea1766160..0000000000
--- a/meta/recipes-devtools/vala/vala_0.42.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require ${BPN}.inc
2
3SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
4 file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
5 file://disable-graphviz.patch \
6 file://0001-Disable-valadoc.patch \
7"
8
9SRC_URI[md5sum] = "d204eb4fa210995e731e2a9a01c8c772"
10SRC_URI[sha256sum] = "8c33b4abc0573d364781bbfe54a1668ed34956902e471191a31cf05dc87c6e12"
diff --git a/meta/recipes-devtools/vala/vala_0.44.3.bb b/meta/recipes-devtools/vala/vala_0.44.3.bb
new file mode 100644
index 0000000000..fe6a5fcdcb
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala_0.44.3.bb
@@ -0,0 +1,8 @@
1require ${BPN}.inc
2
3SRC_URI += "file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
4 file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
5 "
6
7SRC_URI[md5sum] = "25f97c1b46ae0b60b5cc49cbc044eca2"
8SRC_URI[sha256sum] = "8553b422484af88be1685d8b47f7b0df36ae4477c3e77e89ab22276ffed1eae9"