mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 00:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
c7a29f18e2
commit
62d64f4441
@@ -37,7 +37,7 @@ EOF
|
||||
chmod +x ${B}/vapigen-wrapper
|
||||
}
|
||||
|
||||
EXTRA_OECONF += " --disable-graphviz"
|
||||
EXTRA_OECONF += " --disable-valadoc"
|
||||
|
||||
# Vapigen wrapper needs to be available system-wide, because it will be used
|
||||
# to build vapi files from all other packages with vala support
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From b6ca3876e233c724fd460c1579abc4ab63c8d01e Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Wed, 4 Oct 2017 15:23:08 +0300
|
||||
Subject: [PATCH] Disable valadoc
|
||||
|
||||
Valadoc is a documentation generator for Vala sources, which was
|
||||
recently merged into the main vala source tree. Unsurprisingly,
|
||||
it's broken in cross-compile environment in multiple ways,
|
||||
so let's fix it some other time.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
Makefile.am | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index e5dc0cc..813b3fc 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -13,8 +13,6 @@ SUBDIRS = \
|
||||
doc \
|
||||
gobject-introspection \
|
||||
vapigen \
|
||||
- libvaladoc \
|
||||
- valadoc \
|
||||
$(NULL)
|
||||
|
||||
if ENABLE_UNVERSIONED
|
||||
--
|
||||
2.14.1
|
||||
|
||||
@@ -1,226 +0,0 @@
|
||||
From b2723ff18b70c67c8a7fab5375a7f3c442d49790 Mon Sep 17 00:00:00 2001
|
||||
From: Rico Tzschichholz <ricotz@ubuntu.com>
|
||||
Date: Wed, 6 Sep 2017 18:52:55 +0200
|
||||
Subject: [PATCH] libvaladoc: Allow disabling the graphviz dependency of
|
||||
|
||||
valadoc
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=787375
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Upstream-Status: Submitted [bugzilla link above]
|
||||
|
||||
---
|
||||
configure.ac | 60 ++++++++++++++-------------
|
||||
libvaladoc/Makefile.am | 25 ++++++++---
|
||||
libvaladoc/html/basicdoclet.vala | 8 ++++
|
||||
libvaladoc/html/htmlmarkupwriter.vala | 4 ++
|
||||
4 files changed, 63 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 730c72d..af81986 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -119,34 +119,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
|
||||
AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
-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(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])
|
||||
+ 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
|
||||
+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
|
||||
AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
|
||||
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc], :)
|
||||
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
|
||||
index f3f790e..3c5dc4c 100644
|
||||
--- a/libvaladoc/Makefile.am
|
||||
+++ b/libvaladoc/Makefile.am
|
||||
@@ -128,10 +128,6 @@ libvaladoc_la_VALASOURCES = \
|
||||
content/tablerow.vala \
|
||||
content/taglet.vala \
|
||||
content/text.vala \
|
||||
- charts/chart.vala \
|
||||
- charts/chartfactory.vala \
|
||||
- charts/hierarchychart.vala \
|
||||
- charts/simplechartfactory.vala \
|
||||
parser/manyrule.vala \
|
||||
parser/oneofrule.vala \
|
||||
parser/optionalrule.vala \
|
||||
@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
|
||||
highlighter/codetoken.vala \
|
||||
highlighter/highlighter.vala \
|
||||
html/basicdoclet.vala \
|
||||
- html/htmlchartfactory.vala \
|
||||
html/linkhelper.vala \
|
||||
html/cssclassresolver.vala \
|
||||
html/htmlmarkupwriter.vala \
|
||||
html/htmlrenderer.vala \
|
||||
$(NULL)
|
||||
|
||||
+if ENABLE_GRAPHVIZ
|
||||
+libvaladoc_la_VALASOURCES += \
|
||||
+ charts/chart.vala \
|
||||
+ charts/chartfactory.vala \
|
||||
+ charts/hierarchychart.vala \
|
||||
+ charts/simplechartfactory.vala \
|
||||
+ html/htmlchartfactory.vala \
|
||||
+ $(NULL)
|
||||
+
|
||||
+LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
|
||||
+endif
|
||||
+
|
||||
libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
|
||||
libvaladoc.vala.stamp \
|
||||
$(libvaladoc_la_VALASOURCES:.vala=.c) \
|
||||
@@ -184,11 +191,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
|
||||
--library valadoc \
|
||||
--vapi valadoc@PACKAGE_SUFFIX@.vapi \
|
||||
--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
|
||||
- --vapidir $(top_srcdir)/vapi --pkg libgvc \
|
||||
--vapidir $(top_srcdir)/gee --pkg gee \
|
||||
--vapidir $(top_srcdir)/vala --pkg vala \
|
||||
--vapidir $(top_srcdir)/ccode --pkg ccode \
|
||||
--vapidir $(top_srcdir)/codegen --pkg codegen \
|
||||
+ $(LIBGVC_PKG) \
|
||||
--pkg config \
|
||||
$(filter %.vala %.c,$^)
|
||||
touch $@
|
||||
@@ -217,6 +224,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
|
||||
|
||||
valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
|
||||
cp $< $@
|
||||
+if !ENABLE_GRAPHVIZ
|
||||
+ sed -i "s/libgvc //g" $@
|
||||
+endif
|
||||
|
||||
vapidir = $(datadir)/vala/vapi
|
||||
dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
|
||||
@@ -224,6 +234,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
|
||||
|
||||
valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
|
||||
cp $< $@
|
||||
+if !ENABLE_GRAPHVIZ
|
||||
+ sed -i "s/libgvc//g" $@
|
||||
+endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(libvaladoc_la_VALASOURCES) \
|
||||
diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
|
||||
index 192e488..ec09602 100644
|
||||
--- a/libvaladoc/html/basicdoclet.vala
|
||||
+++ b/libvaladoc/html/basicdoclet.vala
|
||||
@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
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 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
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 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
}
|
||||
|
||||
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 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
this.get_img_path_html (element, format)});
|
||||
writer.add_usemap (chart);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
public void write_namespace_content (Namespace node, Api.Node? parent) {
|
||||
diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
|
||||
index 5aa4afd..e79b0b8 100644
|
||||
--- a/libvaladoc/html/htmlmarkupwriter.vala
|
||||
+++ b/libvaladoc/html/htmlmarkupwriter.vala
|
||||
@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
|
||||
}
|
||||
}
|
||||
|
||||
+#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;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
require ${BPN}.inc
|
||||
|
||||
SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
|
||||
file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
|
||||
file://disable-graphviz.patch \
|
||||
file://0001-Disable-valadoc.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "d204eb4fa210995e731e2a9a01c8c772"
|
||||
SRC_URI[sha256sum] = "8c33b4abc0573d364781bbfe54a1668ed34956902e471191a31cf05dc87c6e12"
|
||||
8
meta/recipes-devtools/vala/vala_0.44.3.bb
Normal file
8
meta/recipes-devtools/vala/vala_0.44.3.bb
Normal file
@@ -0,0 +1,8 @@
|
||||
require ${BPN}.inc
|
||||
|
||||
SRC_URI += "file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
|
||||
file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "25f97c1b46ae0b60b5cc49cbc044eca2"
|
||||
SRC_URI[sha256sum] = "8553b422484af88be1685d8b47f7b0df36ae4477c3e77e89ab22276ffed1eae9"
|
||||
Reference in New Issue
Block a user