]> git.pld-linux.org Git - packages/gnome-code-assistance.git/blame - vala-0.36.patch
- adjusted vala-0.36 patch to cover libvala-0.38; release 5
[packages/gnome-code-assistance.git] / vala-0.36.patch
CommitLineData
03064d58
JR
1From b6097f3007fe29545d44ef4def120261b36fdac9 Mon Sep 17 00:00:00 2001
2From: Jesse van den Kieboom <jkieboom@esri.com>
3Date: Sat, 5 Nov 2016 13:33:16 +0100
4Subject: [PATCH 1/3] Add libvala-0.36 support
5
6---
7 configure.ac | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10diff --git a/configure.ac b/configure.ac
11index 40b7c96..008c2ac 100644
12--- a/configure.ac
13+++ b/configure.ac
14@@ -410,7 +410,7 @@ AC_ARG_ENABLE([vala],
15 [enable_vala=$enableval],
16 [enable_vala=auto])
17
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"
0d518d43 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"
03064d58
JR
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"
21
22 BACKEND_VALA_LIBVALA=
23--
241.8.3.1
25
26
27From 1e0041458b00a1d2cd91c21c322e46153ba69bdc Mon Sep 17 00:00:00 2001
28From: Jesse van den Kieboom <jessevdk@gnome.org>
29Date: Sun, 6 Nov 2016 01:28:12 -0800
30Subject: [PATCH 2/3] Small code style cleanup
31
32---
33 backends/vala/valaoptionparser.vala | 4 ++++
34 1 file changed, 4 insertions(+)
35
36diff --git a/backends/vala/valaoptionparser.vala b/backends/vala/valaoptionparser.vala
37index 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;
44+
45 if (profile == "gobject-2.0" || profile == "gobject" || profile == null) {
46 // default profile
47 context.profile = Profile.GOBJECT;
48@@ -194,6 +195,7 @@ class OptionParser {
49 } else {
50 Report.error (null, "Unknown profile %s".printf (profile));
51 }
52+
53 nostdpkg |= fast_vapi_filename != null;
54 context.nostdpkg = nostdpkg;
55
56@@ -213,12 +215,14 @@ class OptionParser {
57
58 int glib_major = 2;
59 int glib_minor = 18;
60+
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");
63 }
64
65 context.target_glib_major = glib_major;
66 context.target_glib_minor = glib_minor;
67+
68 if (context.target_glib_major != 2) {
69 Report.error (null, "This version of valac only supports GLib 2");
70 }
71--
721.8.3.1
73
74
75From 508e157a08eda979683d130bd779792ee4d90d58 Mon Sep 17 00:00:00 2001
76From: Jesse van den Kieboom <jessevdk@gnome.org>
77Date: Sun, 6 Nov 2016 01:27:49 -0800
78Subject: [PATCH 3/3] Fix compilation with vala 0.36
79
80https://bugzilla.gnome.org/show_bug.cgi?id=772861
81---
82 backends/vala/Makefile.am | 4 ++++
83 backends/vala/valaoptionparser.vala | 4 ++++
84 configure.ac | 25 +++++++++++++++++++++----
85 3 files changed, 29 insertions(+), 4 deletions(-)
86
87diff --git a/backends/vala/Makefile.am b/backends/vala/Makefile.am
88index 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
93 endif
94
95+if BACKENDS_VALA_ENABLE_VALA_CODE_CONTEXT_SET_THREAD
96+backends_vala_common_valaflags += -D ENABLE_VALA_CODE_CONTEXT_SET_THREAD
97+endif
98+
99 backends_vala_libvalashared_la_VALAFLAGS = \
100 $(backends_vala_common_valaflags) \
101 --library libvalashared \
102diff --git a/backends/vala/valaoptionparser.vala b/backends/vala/valaoptionparser.vala
103index 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;
110+
111+#if ENABLE_VALA_CODE_CONTEXT_SET_THREAD
112 context.thread = thread;
113+#endif
114+
115 context.mem_profiler = mem_profiler;
116 context.save_temps = save_temps;
117
118diff --git a/configure.ac b/configure.ac
119index 008c2ac..00bfc45 100644
120--- a/configure.ac
121+++ b/configure.ac
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"
124
125 BACKEND_VALA_LIBVALA=
126+
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
131 fi
132 done
133
134-if test "x$libvala_found" != "xyes"; then
135- BACKEND_VALA_MODULES="$BACKEND_VALA_MODULES $BACKEND_VALA_LIBVALA"
136-fi
137-
138 AC_SUBST(BACKEND_VALA_LIBVALA)
139
140 if test "x$enable_vala" != "xno"; then
141@@ -467,9 +464,29 @@ if test "x$enable_vala" != "xno"; then
142 fi
143 fi
144
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}"
151+
152+ AC_MSG_CHECKING([if vala CodeContext supports thread property])
153+
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])
157+
158+ CFLAGS="${cflags_save}"
159+ LIBS="${libs_save}"
160+])
161+AC_MSG_RESULT([$have_vala_code_context_set_thread])
162+
163 color_enable_var("$enable_vala", [enable_vala_msg])
164
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)
167+
168 AC_SUBST(BACKEND_VALA_LIBVALA)
169
170
171--
1721.8.3.1
173
This page took 0.093056 seconds and 4 git commands to generate.