summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-10-04 15:31:40 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-09 12:33:16 +0000
commitfa1a12a33ae5c73b83fc265012e8959e77f9df33 (patch)
treef92434798c5d054c44e554f6cbdb75f5269a85d3 /meta/recipes-devtools
parentc38e700644583b0833e8a9831a7dda3678a7d041 (diff)
downloadpoky-fa1a12a33ae5c73b83fc265012e8959e77f9df33.tar.gz
vala: update to 0.38.2
Valadoc has been merged into the main vala tree, so add necessary patches to disable it. (From OE-Core rev: 2c290f7253bba5ceb0d32e7d0b0ec0d0e81cc263) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-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.patch223
-rw-r--r--meta/recipes-devtools/vala/vala_0.36.4.bb8
-rw-r--r--meta/recipes-devtools/vala/vala_0.38.2.bb10
5 files changed, 267 insertions, 8 deletions
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 1261c02777..b22faad780 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -34,6 +34,8 @@ EOF
34 chmod +x ${B}/vapigen-wrapper 34 chmod +x ${B}/vapigen-wrapper
35} 35}
36 36
37EXTRA_OECONF += " --disable-graphviz"
38
37# Vapigen wrapper needs to be available system-wide, because it will be used 39# Vapigen wrapper needs to be available system-wide, because it will be used
38# to build vapi files from all other packages with vala support 40# to build vapi files from all other packages with vala support
39do_install_append_class-target() { 41do_install_append_class-target() {
diff --git a/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch b/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
new file mode 100644
index 0000000000..9b27b7fd14
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
@@ -0,0 +1,32 @@
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
new file mode 100644
index 0000000000..15d186de05
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala/disable-graphviz.patch
@@ -0,0 +1,223 @@
1From eb716dc856c20b3da146a4e83e9800bd1f53c739 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 valadoc
6
7https://bugzilla.gnome.org/show_bug.cgi?id=787375
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9Upstream-Status: Submitted [bugzilla link above]
10---
11 configure.ac | 60 +++++++++++++++++++----------------
12 libvaladoc/Makefile.am | 25 +++++++++++----
13 libvaladoc/html/basicdoclet.vala | 8 +++++
14 libvaladoc/html/htmlmarkupwriter.vala | 4 +++
15 4 files changed, 63 insertions(+), 34 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index c73d5d6b1..291e503d5 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -98,34 +98,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
22 AC_SUBST(GMODULE_CFLAGS)
23 AC_SUBST(GMODULE_LIBS)
24
25-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
26-AC_MSG_CHECKING([for CGRAPH])
27-cgraph_tmp_LIBADD="$LIBADD"
28-cgraph_tmp_CFLAGS="$CFLAGS"
29-LIBADD="$LIBADD $LIBGVC_LIBS"
30-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
31-AC_RUN_IFELSE(
32- [AC_LANG_SOURCE([
33- #include <gvc.h>
34-
35- int main(void) {
36- #ifdef WITH_CGRAPH
37- return 0;
38- #else
39- return -1;
40- #endif
41- }
42- ])], [
43- AC_MSG_RESULT([yes])
44- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
45- have_cgraph=yes
46- ], [
47- AC_MSG_RESULT([no])
48- have_cgraph=no
49- ]
50-)
51-LIBADD="$cgraph_tmp_LIBADD"
52-CFLAGS="$cgraph_tmp_CFLAGS"
53+AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
54+if test x$enable_graphviz = xyes; then
55+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
56+ AC_MSG_CHECKING([for CGRAPH])
57+ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
58+ cgraph_tmp_LIBADD="$LIBADD"
59+ cgraph_tmp_CFLAGS="$CFLAGS"
60+ LIBADD="$LIBADD $LIBGVC_LIBS"
61+ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
62+ AC_RUN_IFELSE(
63+ [AC_LANG_SOURCE([
64+ #include <gvc.h>
65+ int main(void) {
66+ #ifdef WITH_CGRAPH
67+ return 0;
68+ #else
69+ return -1;
70+ #endif
71+ }
72+ ])], [
73+ AC_MSG_RESULT([yes])
74+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
75+ have_cgraph=yes
76+ ], [
77+ AC_MSG_RESULT([no])
78+ have_cgraph=no
79+ ]
80+ )
81+ LIBADD="$cgraph_tmp_LIBADD"
82+ CFLAGS="$cgraph_tmp_CFLAGS"
83+fi
84+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
85 AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
86
87 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
88diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
89index 89245d86b..7c07498b9 100644
90--- a/libvaladoc/Makefile.am
91+++ b/libvaladoc/Makefile.am
92@@ -127,10 +127,6 @@ libvaladoc_la_VALASOURCES = \
93 content/tablerow.vala \
94 content/taglet.vala \
95 content/text.vala \
96- charts/chart.vala \
97- charts/chartfactory.vala \
98- charts/hierarchychart.vala \
99- charts/simplechartfactory.vala \
100 parser/manyrule.vala \
101 parser/oneofrule.vala \
102 parser/optionalrule.vala \
103@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
104 highlighter/codetoken.vala \
105 highlighter/highlighter.vala \
106 html/basicdoclet.vala \
107- html/htmlchartfactory.vala \
108 html/linkhelper.vala \
109 html/cssclassresolver.vala \
110 html/htmlmarkupwriter.vala \
111 html/htmlrenderer.vala \
112 $(NULL)
113
114+if ENABLE_GRAPHVIZ
115+libvaladoc_la_VALASOURCES += \
116+ charts/chart.vala \
117+ charts/chartfactory.vala \
118+ charts/hierarchychart.vala \
119+ charts/simplechartfactory.vala \
120+ html/htmlchartfactory.vala \
121+ $(NULL)
122+
123+LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
124+endif
125+
126 libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
127 libvaladoc.vala.stamp \
128 $(libvaladoc_la_VALASOURCES:.vala=.c) \
129@@ -182,8 +189,8 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
130 --library valadoc \
131 --vapi valadoc@PACKAGE_SUFFIX@.vapi \
132 --vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
133- --vapidir $(top_srcdir)/vapi --pkg libgvc \
134 --vapidir $(top_srcdir)/gee --pkg gee \
135+ $(LIBGVC_PKG) \
136 --pkg config \
137 $(filter %.vala %.c,$^)
138 touch $@
139@@ -209,6 +216,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
140
141 valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
142 cp $< $@
143+if !ENABLE_GRAPHVIZ
144+ sed -i "s/libgvc //g" $@
145+endif
146
147 vapidir = $(datadir)/vala/vapi
148 dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
149@@ -216,6 +226,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
150
151 valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
152 cp $< $@
153+if !ENABLE_GRAPHVIZ
154+ sed -i "s/libgvc//g" $@
155+endif
156
157 EXTRA_DIST = \
158 $(libvaladoc_la_VALASOURCES) \
159diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
160index cc9ea4ed7..432c3818f 100644
161--- a/libvaladoc/html/basicdoclet.vala
162+++ b/libvaladoc/html/basicdoclet.vala
163@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
164 protected HtmlRenderer _renderer;
165 protected Html.MarkupWriter writer;
166 protected Html.CssClassResolver cssresolver;
167+#if HAVE_GRAPHVIZ
168 protected Charts.Factory image_factory;
169+#else
170+ protected void* image_factory;
171+#endif
172 protected ErrorReporter reporter;
173 protected string package_list_link = "../index.html";
174
175@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
176 this.linker = new LinkHelper ();
177
178 _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
179+#if HAVE_GRAPHVIZ
180 this.image_factory = new SimpleChartFactory (settings, linker);
181+#endif
182 }
183
184
185@@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
186 }
187
188 protected void write_image_block (Api.Node element) {
189+#if HAVE_GRAPHVIZ
190 if (element is Class || element is Interface || element is Struct) {
191 unowned string format = (settings.use_svg_images ? "svg" : "png");
192 var chart = new Charts.Hierarchy (image_factory, element);
193@@ -1044,6 +1051,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
194 this.get_img_path_html (element, format)});
195 writer.add_usemap (chart);
196 }
197+#endif
198 }
199
200 public void write_namespace_content (Namespace node, Api.Node? parent) {
201diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
202index 15ed9efd1..fe0d705d4 100644
203--- a/libvaladoc/html/htmlmarkupwriter.vala
204+++ b/libvaladoc/html/htmlmarkupwriter.vala
205@@ -43,12 +43,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
206 }, xml_declaration);
207 }
208
209+#if HAVE_GRAPHVIZ
210 public MarkupWriter add_usemap (Charts.Chart chart) {
211 string? buf = (string?) chart.write_buffer ("cmapx");
212 if (buf != null) {
213 raw_text ("\n");
214 raw_text ((!) buf);
215 }
216+#else
217+ public MarkupWriter add_usemap (void* chart) {
218+#endif
219
220 return this;
221 }
222--
2232.14.1
diff --git a/meta/recipes-devtools/vala/vala_0.36.4.bb b/meta/recipes-devtools/vala/vala_0.36.4.bb
deleted file mode 100644
index 51000d9e12..0000000000
--- a/meta/recipes-devtools/vala/vala_0.36.4.bb
+++ /dev/null
@@ -1,8 +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"
6
7SRC_URI[md5sum] = "3c19014093f1a3d995357253b463082c"
8SRC_URI[sha256sum] = "e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059"
diff --git a/meta/recipes-devtools/vala/vala_0.38.2.bb b/meta/recipes-devtools/vala/vala_0.38.2.bb
new file mode 100644
index 0000000000..18751fe81a
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala_0.38.2.bb
@@ -0,0 +1,10 @@
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] = "720846116448fc20b0ab3c0921e19798"
10SRC_URI[sha256sum] = "20d5d9c4fbd17877969dbce27e6428da67138e116b1717cc07b5b75fd6ab78a7"