1 From b6097f3007fe29545d44ef4def120261b36fdac9 Mon Sep 17 00:00:00 2001
2 From: Jesse van den Kieboom <jkieboom@esri.com>
3 Date: Sat, 5 Nov 2016 13:33:16 +0100
4 Subject: [PATCH 1/3] Add libvala-0.36 support
8 1 file changed, 1 insertion(+), 1 deletion(-)
10 diff --git a/configure.ac b/configure.ac
11 index 40b7c96..008c2ac 100644
14 @@ -410,7 +410,7 @@ AC_ARG_ENABLE([vala],
15 [enable_vala=$enableval],
18 -BACKEND_VALA_LIBVALA_VERSIONS="libvala-0.34 libvala-0.32 libvala-0.30 libvala-0.28 libvala-0.26 libvala-0.24 libvala-0.22 libvala-0.20"
19 +BACKEND_VALA_LIBVALA_VERSIONS="libvala-0.38 libvala-0.36 libvala-0.34 libvala-0.32 libvala-0.30 libvala-0.28 libvala-0.26 libvala-0.24 libvala-0.22 libvala-0.20"
20 BACKEND_VALA_MODULES="gobject-2.0 >= 2.36 glib-2.0 >= 2.36 gio-2.0 >= 2.36 gee-0.8 gio-unix-2.0 >= 2.36"
27 From 1e0041458b00a1d2cd91c21c322e46153ba69bdc Mon Sep 17 00:00:00 2001
28 From: Jesse van den Kieboom <jessevdk@gnome.org>
29 Date: Sun, 6 Nov 2016 01:28:12 -0800
30 Subject: [PATCH 2/3] Small code style cleanup
33 backends/vala/valaoptionparser.vala | 4 ++++
34 1 file changed, 4 insertions(+)
36 diff --git a/backends/vala/valaoptionparser.vala b/backends/vala/valaoptionparser.vala
37 index 03766a2..0aaad79 100644
38 --- a/backends/vala/valaoptionparser.vala
39 +++ b/backends/vala/valaoptionparser.vala
40 @@ -187,6 +187,7 @@ class OptionParser {
41 context.thread = thread;
42 context.mem_profiler = mem_profiler;
43 context.save_temps = save_temps;
45 if (profile == "gobject-2.0" || profile == "gobject" || profile == null) {
47 context.profile = Profile.GOBJECT;
48 @@ -194,6 +195,7 @@ class OptionParser {
50 Report.error (null, "Unknown profile %s".printf (profile));
53 nostdpkg |= fast_vapi_filename != null;
54 context.nostdpkg = nostdpkg;
56 @@ -213,12 +215,14 @@ class OptionParser {
61 if (target_glib != null && target_glib.scanf ("%d.%d", out glib_major, out glib_minor) != 2) {
62 Report.error (null, "Invalid format for --target-glib");
65 context.target_glib_major = glib_major;
66 context.target_glib_minor = glib_minor;
68 if (context.target_glib_major != 2) {
69 Report.error (null, "This version of valac only supports GLib 2");
75 From 508e157a08eda979683d130bd779792ee4d90d58 Mon Sep 17 00:00:00 2001
76 From: Jesse van den Kieboom <jessevdk@gnome.org>
77 Date: Sun, 6 Nov 2016 01:27:49 -0800
78 Subject: [PATCH 3/3] Fix compilation with vala 0.36
80 https://bugzilla.gnome.org/show_bug.cgi?id=772861
82 backends/vala/Makefile.am | 4 ++++
83 backends/vala/valaoptionparser.vala | 4 ++++
84 configure.ac | 25 +++++++++++++++++++++----
85 3 files changed, 29 insertions(+), 4 deletions(-)
87 diff --git a/backends/vala/Makefile.am b/backends/vala/Makefile.am
88 index dc3d5e0..4799429 100644
89 --- a/backends/vala/Makefile.am
90 +++ b/backends/vala/Makefile.am
91 @@ -34,6 +34,10 @@ if ENABLE_DEBUG
92 backends_vala_common_valaflags += --debug -X -O0
95 +if BACKENDS_VALA_ENABLE_VALA_CODE_CONTEXT_SET_THREAD
96 +backends_vala_common_valaflags += -D ENABLE_VALA_CODE_CONTEXT_SET_THREAD
99 backends_vala_libvalashared_la_VALAFLAGS = \
100 $(backends_vala_common_valaflags) \
101 --library libvalashared \
102 diff --git a/backends/vala/valaoptionparser.vala b/backends/vala/valaoptionparser.vala
103 index 0aaad79..5ca5643 100644
104 --- a/backends/vala/valaoptionparser.vala
105 +++ b/backends/vala/valaoptionparser.vala
106 @@ -184,7 +184,11 @@ class OptionParser {
107 context.gir_directories = realpaths(wd, gir_directories);
108 context.metadata_directories = realpaths(wd, metadata_directories);
109 context.debug = debug;
111 +#if ENABLE_VALA_CODE_CONTEXT_SET_THREAD
112 context.thread = thread;
115 context.mem_profiler = mem_profiler;
116 context.save_temps = save_temps;
118 diff --git a/configure.ac b/configure.ac
119 index 008c2ac..00bfc45 100644
122 @@ -414,6 +414,7 @@ BACKEND_VALA_LIBVALA_VERSIONS="libvala-0.36 libvala-0.34 libvala-0.32 libvala-0.
123 BACKEND_VALA_MODULES="gobject-2.0 >= 2.36 glib-2.0 >= 2.36 gio-2.0 >= 2.36 gee-0.8 gio-unix-2.0 >= 2.36"
125 BACKEND_VALA_LIBVALA=
127 for i in $BACKEND_VALA_LIBVALA_VERSIONS; do
128 if test "x$BACKEND_VALA_LIBVALA" = "x"; then
129 BACKEND_VALA_LIBVALA="$i"
130 @@ -428,10 +429,6 @@ for i in $BACKEND_VALA_LIBVALA_VERSIONS; do
134 -if test "x$libvala_found" != "xyes"; then
135 - BACKEND_VALA_MODULES="$BACKEND_VALA_MODULES $BACKEND_VALA_LIBVALA"
138 AC_SUBST(BACKEND_VALA_LIBVALA)
140 if test "x$enable_vala" != "xno"; then
141 @@ -467,9 +464,29 @@ if test "x$enable_vala" != "xno"; then
145 +# Check for deprecated threading support
146 +AS_IF([test x$enable_vala = xyes],[
147 + cflags_save="${CFLAGS}"
148 + libs_save="${LIBS}"
149 + CFLAGS="${CFLAGS} ${BACKEND_VALA_CFLAGS}"
150 + LIBS="${LIBS} ${BACKEND_VALA_LIBS}"
152 + AC_MSG_CHECKING([if vala CodeContext supports thread property])
154 + AC_TRY_LINK([#include <vala.h>],[
155 + vala_code_context_set_thread (NULL, TRUE);
156 + ], [have_vala_code_context_set_thread=yes], [have_vala_code_context_set_thread=no])
158 + CFLAGS="${cflags_save}"
159 + LIBS="${libs_save}"
161 +AC_MSG_RESULT([$have_vala_code_context_set_thread])
163 color_enable_var("$enable_vala", [enable_vala_msg])
165 AM_CONDITIONAL(BACKENDS_VALA_ENABLE, test "x$enable_vala" = "xyes")
166 +AM_CONDITIONAL(BACKENDS_VALA_ENABLE_VALA_CODE_CONTEXT_SET_THREAD, test x$have_vala_code_context_set_thread = xyes)
168 AC_SUBST(BACKEND_VALA_LIBVALA)