vala: update to 0.44.1.

This commit is contained in:
Rasmus Thomsen 2019-03-10 11:50:30 +01:00
parent 75a9161a41
commit ee5a0099cd
No known key found for this signature in database
GPG Key ID: 65BCD00D76C8F888
4 changed files with 45 additions and 231 deletions

View File

@ -2920,9 +2920,9 @@ libsysprof-2.so sysprof-3.24.1_1
libsysprof-ui-2.so sysprof-3.24.1_1
libmozjs-52.so mozjs52-52.3.0_1
libmozjs-52.so.0 mozjs52-52.3.0_1
libvala-0.42.so.0 libvala-0.42.1_1
libvaladoc-0.42.so.0 libvala-0.42.1_1
libvalaccodegen.so libvala-0.42.4_1
libvala-0.44.so.0 libvala-0.44.0_1
libvaladoc-0.44.so.0 libvala-0.44.0_1
libvalaccodegen.so libvala-0.44.0_1
libphodav-2.0.so.0 phodav-2.2_1
libgfshare.so.2 libgfshare-2.0.0_1
libtracker-miner-2.0.so.0 libtracker-2.0.1_1

View File

@ -0,0 +1,36 @@
This check is broken in cross, see https://gitlab.gnome.org/GNOME/vala/issues/775
We are sure that we have cgraph, so just hack around this for now.
diff --git configure.ac configure.ac
index 16ebd1f..df789b9 100644
--- configure.ac
+++ configure.ac
@@ -164,25 +164,8 @@ if test x$enable_valadoc = xyes; then
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
- ]
- )
+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+ have_cgraph=yes
LIBADD="$cgraph_tmp_LIBADD"
CFLAGS="$cgraph_tmp_CFLAGS"
fi

View File

@ -1,220 +0,0 @@
From eb716dc856c20b3da146a4e83e9800bd1f53c739 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
Rebased for 0.42
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 384292f..604ab54 100644
--- a/libvaladoc/Makefile.am
+++ b/libvaladoc/Makefile.am
@@ -126,10 +126,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 \
@@ -156,17 +152,30 @@ 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) \
+if ENABLE_GRAPHVIZ
gvc-compat.c \
+endif
$(NULL)
valadoc@PACKAGE_SUFFIX@.vapi valadoc.h: libvaladoc.vala.stamp
@@ -182,8 +191,8 @@ 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 \
+ $(LIBGVC_PKG) \
--vapidir $(top_srcdir)/vala --pkg vala \
--pkg config \
$(filter %.vala %.c,$^)
@@ -211,6 +220,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
@@ -218,6 +230,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 37c731c..e0326ef 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
}
@@ -1025,6 +1031,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);
@@ -1044,6 +1051,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..80781c2 100644
--- a/libvaladoc/html/htmlmarkupwriter.vala
+++ b/libvaladoc/html/htmlmarkupwriter.vala
@@ -51,13 +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 MarkupWriter add_usemap (void* chart) {
+#endif
return this;
}

View File

@ -1,11 +1,10 @@
# Template file for 'vala'
pkgname=vala
version=0.42.6
version=0.44.1
revision=1
build_style=gnu-configure
configure_args="--disable-graphviz"
hostmakedepends="flex libxslt pkg-config automake libtool"
makedepends="libfl-devel libglib-devel"
makedepends="libfl-devel libglib-devel graphviz-devel"
checkdepends="dbus libgirepository-devel"
short_desc="Compiler for the GObject type system"
maintainer="Enno Boland <gottox@voidlinux.org>"
@ -13,9 +12,8 @@ license="LGPL-2.1-or-later"
homepage="https://wiki.gnome.org/Projects/Vala"
changelog="https://gitlab.gnome.org/GNOME/vala/raw/0.42/NEWS"
distfiles="${GNOME_SITE}/vala/${version%.*}/vala-${version}.tar.xz"
checksum=3774f46fed70f528d069beaa2de5eaeafa2851c3509856dd10030fa1f7230290
checksum=96a8c1415c6484d7d6b837ae263af7c50465c7423bfc8eea5046f3eadfa42fe2
shlib_provides="libvalaccodegen.so"
patch_args="-Np1"
# for valadoc
if [ "$CROSS_BUILD" ]; then
@ -25,7 +23,7 @@ else
fi
pre_configure() {
autoreconf -fi
autoreconf -if
}
post_install() {
@ -33,8 +31,8 @@ post_install() {
# so the package that use it fall into our wrapper.
# keep the binary versioned, we don't know the potential
# fallout from using the unversioned one
vsed -e 's|^vapigen=.*|vapigen=vapigen-0.42|g' \
-i ${DESTDIR}/usr/lib/pkgconfig/vapigen-0.42.pc
vsed -e 's|^vapigen=.*|vapigen=vapigen-0.44|g' \
-i ${DESTDIR}/usr/lib/pkgconfig/vapigen-0.44.pc
}
libvala_package() {