[gnome-build-meta/mcatanzaro/3.31.2: 5/20] Fix vala build



commit c2f41acaac0cb2ae3441bac87259304c8c34e185
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Nov 14 21:46:40 2018 -0600

    Fix vala build
    
    It's been a long time since I've seen vala build successfully... should
    finally be fixed in the next vala release.

 elements/sdk/vala.bst                              |  23 +--
 ...uild-Allow-disabling-the-build-of-valadoc.patch | 185 +++++++++++++++++++++
 2 files changed, 197 insertions(+), 11 deletions(-)
---
diff --git a/elements/sdk/vala.bst b/elements/sdk/vala.bst
index 666965a..d52ee76 100644
--- a/elements/sdk/vala.bst
+++ b/elements/sdk/vala.bst
@@ -1,23 +1,24 @@
 kind: autotools
 sources:
-- kind: git
-  url: gitlab_gnome_org:GNOME/vala
-  track: master
+- kind: tar
+  url: https://download.gnome.org/sources/vala/0.42/vala-0.42.2.tar.xz
+  ref: 9e89aa42152b1cef551568f827aa2deea2a9b5487d78c91474c8617b618e5f07
+- kind: patch
+  path: files/vala/0001-build-Allow-disabling-the-build-of-valadoc.patch
 depends:
 - sdk/glib.bst
 - filename: sdk/vala-tarball.bst
   type: build
-- filename: base/bison.bst
-  junction: freedesktop-sdk.bst
-  type: build
-- filename: base/git-minimal.bst
-  junction: freedesktop-sdk.bst
-  type: build
-- filename: base/buildsystem-autotools.bst
+- filename: base.bst
   junction: freedesktop-sdk.bst
   type: build
 - filename: base-platform.bst
   junction: freedesktop-sdk.bst
+  type: runtime
 variables:
   conf-local: --enable-unversioned --disable-valadoc
-  make: make bootstrap
+config:
+  configure-commands:
+    (<):
+    # force autogen
+    - rm -f configure
diff --git a/files/vala/0001-build-Allow-disabling-the-build-of-valadoc.patch 
b/files/vala/0001-build-Allow-disabling-the-build-of-valadoc.patch
new file mode 100644
index 0000000..e4f4b60
--- /dev/null
+++ b/files/vala/0001-build-Allow-disabling-the-build-of-valadoc.patch
@@ -0,0 +1,185 @@
+From 1dae711f17473e12c822a657ffca02abee27b3a2 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz ubuntu com>
+Date: Sun, 27 Aug 2017 16:03:03 +0200
+Subject: [PATCH] build: Allow disabling the build of valadoc
+
+Allow disabling build of valadoc with configure option --disable-valadoc
+
+Fixes https://gitlab.gnome.org/GNOME/vala/issues/596
+---
+ Makefile.am     | 10 +++++++++
+ configure.ac    | 59 ++++++++++++++++++++++++++-----------------------
+ doc/Makefile.am | 17 +++++++++++++-
+ 3 files changed, 57 insertions(+), 29 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 88bef90ed..e4d46741f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,9 +13,19 @@ SUBDIRS = \
+       doc \
+       gobject-introspection \
+       vapigen \
++      $(NULL)
++
++if ENABLE_VALADOC
++SUBDIRS += \
+       libvaladoc \
+       valadoc \
+       $(NULL)
++endif
++
++DISTCHECK_CONFIGURE_FLAGS = \
++      --enable-valadoc \
++      --enable-unversioned \
++      $(NULL)
+ 
+ if ENABLE_UNVERSIONED
+ aclocaldir = $(datadir)/aclocal
+diff --git a/configure.ac b/configure.ac
+index 88ca0f94b..9d1c97417 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -119,35 +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(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, 
enable_valadoc=yes)
++if test x$enable_valadoc = xyes; then
++      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"
++fi
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
++AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
+ 
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+ AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index 758ad733a..b79f229c4 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -6,11 +6,16 @@ SUBDIRS = \
+ 
+ dist_man_MANS = \
+       valac.1 \
+-      valadoc.1 \
+       vala-gen-introspect.1 \
+       vapigen.1 \
+       $(NULL)
+ 
++if ENABLE_VALADOC
++dist_man_MANS += \
++      valadoc.1 \
++      $(NULL)
++endif
++
+ EXTRA_DIST = \
+       valac.h2m \
+       valadoc.h2m \
+@@ -19,7 +24,11 @@ EXTRA_DIST = \
+       $(NULL)
+ 
+ if HAVE_HELP2MAN
++if ENABLE_VALADOC
+ manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1
++else
++manpages: valac.1 vala-gen-introspect.1 vapigen.1
++endif
+       @rm $^
+       $(MAKE) $(AM_MAKEFLAGS) $^
+ 
+@@ -28,11 +37,13 @@ valac.1:
+               --include $(srcdir)/valac.h2m \
+               --libtool --no-info \
+               --output=$@
++if ENABLE_VALADOC
+ valadoc.1:
+       $(HELP2MAN) $(top_builddir)/valadoc/valadoc \
+               --include $(srcdir)/valadoc.h2m \
+               --libtool --no-info \
+               --output=$@
++endif
+ vala-gen-introspect.1:
+       $(HELP2MAN) $(top_builddir)/gobject-introspection/gen-introspect \
+               --include $(srcdir)/vala-gen-introspect.h2m \
+@@ -49,12 +60,15 @@ endif
+ if ENABLE_UNVERSIONED
+ install-data-hook:
+       cd $(DESTDIR)$(man1dir) && $(LN_S) -f valac@PACKAGE_SUFFIX@.1 valac.1
++if ENABLE_VALADOC
+       cd $(DESTDIR)$(man1dir) && $(LN_S) -f valadoc@PACKAGE_SUFFIX@.1 valadoc.1
++endif
+       cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1
+       cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1
+ endif
+ 
+ 
++if ENABLE_VALADOC
+ COMMON_VALADOCFLAGS = \
+       --force \
+       --verbose \
+@@ -130,6 +144,7 @@ internal-apis/valadoc: $(valadoc_VALASOURCES) internal-apis/codegen
+       @touch $@
+ 
+ internal-api-docs: internal-apis/gee internal-apis/vala internal-apis/ccode internal-apis/codegen 
internal-apis/valadoc
++endif
+ 
+ clean-local:
+       rm -rf $(builddir)/internal-apis
+-- 
+2.19.0
+
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]