]> git.pld-linux.org Git - packages/anjuta.git/blob - anjuta-vala-0.12.patch
- real fix for building with vala 0.12 + install fix
[packages/anjuta.git] / anjuta-vala-0.12.patch
1 diff -urN anjuta-2.32.1.1.orig//configure.in anjuta-2.32.1.1/configure.in
2 --- anjuta-2.32.1.1.orig//configure.in  2010-12-29 17:33:54.000000000 +0000
3 +++ anjuta-2.32.1.1/configure.in        2012-04-14 13:35:43.086850543 +0000
4 @@ -46,7 +46,7 @@
5  GLADEUI_REQUIRED=3.6.7
6  
7  dnl Vala
8 -VALA_REQUIRED=0.9.5
9 +VALA_REQUIRED=0.11.2
10  
11  dnl Introspection
12  GI_REQUIRED=0.6.6
13 @@ -282,11 +282,11 @@
14         AC_MSG_RESULT(no)
15         enable_vala="yes"
16         PKG_CHECK_MODULES(VALA,
17 -               [vala-0.10 >= $VALA_REQUIRED])
18 +               [libvala-0.12 >= $VALA_REQUIRED])
19  fi
20  
21  if test x$enable_vala = xyes; then
22 -       AC_PATH_PROG(VALAC, valac, valac)
23 +       AC_PATH_PROG(VALAC, [valac-0.12 valac], valac)
24         AC_SUBST(VALAC)
25  fi
26  
27 diff -urN anjuta-2.32.1.1.orig//plugins/language-support-vala/Makefile.am anjuta-2.32.1.1/plugins/language-support-vala/Makefile.am
28 --- anjuta-2.32.1.1.orig//plugins/language-support-vala/Makefile.am     2010-12-29 17:23:51.000000000 +0000
29 +++ anjuta-2.32.1.1/plugins/language-support-vala/Makefile.am   2012-04-14 13:35:43.086850543 +0000
30 @@ -31,7 +31,7 @@
31         -DG_LOG_DOMAIN=\"language-support-vala\" \
32         --no-warn
33  
34 -VALAFLAGS = --vapidir $(srcdir) --pkg vala-0.10 --pkg libanjuta-1.0
35 +VALAFLAGS = --vapidir $(srcdir) --pkg libvala-0.12 --pkg libanjuta-1.0
36  
37  # The plugin
38  plugindir = $(anjuta_plugin_dir)
39 diff -urN anjuta-2.32.1.1.orig//plugins/language-support-vala/Makefile.in anjuta-2.32.1.1/plugins/language-support-vala/Makefile.in
40 --- anjuta-2.32.1.1.orig//plugins/language-support-vala/Makefile.in     2010-12-29 17:44:42.000000000 +0000
41 +++ anjuta-2.32.1.1/plugins/language-support-vala/Makefile.in   2012-04-14 13:35:43.086850543 +0000
42 @@ -390,7 +390,7 @@
43  @ENABLE_VALA_TRUE@     -DG_LOG_DOMAIN=\"language-support-vala\" \
44  @ENABLE_VALA_TRUE@     --no-warn
45  
46 -@ENABLE_VALA_TRUE@VALAFLAGS = --vapidir $(srcdir) --pkg vala-0.10 --pkg libanjuta-1.0
47 +@ENABLE_VALA_TRUE@VALAFLAGS = --vapidir $(srcdir) --pkg libvala-0.12 --pkg libanjuta-1.0
48  
49  # The plugin
50  @ENABLE_VALA_TRUE@plugindir = $(anjuta_plugin_dir)
51 diff -urN anjuta-2.32.1.1.orig//plugins/language-support-vala/plugin.vala anjuta-2.32.1.1/plugins/language-support-vala/plugin.vala
52 --- anjuta-2.32.1.1.orig//plugins/language-support-vala/plugin.vala     2010-12-29 17:22:49.000000000 +0000
53 +++ anjuta-2.32.1.1/plugins/language-support-vala/plugin.vala   2012-04-14 14:30:29.722671707 +0000
54 @@ -35,6 +35,9 @@
55         Vala.SymbolResolver resolver;
56         Vala.SemanticAnalyzer analyzer;
57  
58 +       ValaPlugin () {
59 +               Object ();
60 +       }
61         public override bool activate () {
62                 //debug("Activating ValaPlugin");
63                 context = new Vala.CodeContext();
64 @@ -46,14 +49,12 @@
65                 prefs = shell.get_preferences ();
66                 var project = (IAnjuta.ProjectManager) shell.get_object("IAnjutaProjectManager");
67                 weak List<string> packages = project.get_packages();
68 -               add_package(context, "glib-2.0");
69 -               add_package(context, "gobject-2.0");
70 +               context.add_package("glib-2.0");
71 +               context.add_package("gobject-2.0");
72  
73                 var status = shell.get_status ();
74 -               foreach(var pkg in packages) {
75 -                       if (!add_package(context, pkg))
76 -                               status.set("Package %s not found", pkg);
77 -               }
78 +               foreach (var pkg in packages)
79 +                       context.add_package(pkg);
80  
81                 source_files = new Vala.HashMap<string, Vala.SourceFile>(str_hash, str_equal, direct_equal);
82  
83 @@ -61,20 +62,20 @@
84                 foreach (var src in sources) {
85                         if (src.get_path() != null && !source_files.contains(src.get_path())) {
86                                 if (src.get_basename().has_suffix("vala") || src.get_basename().has_suffix("gs")) {
87 -                                       var vsrc = new Vala.SourceFile(context, src.get_path());
88 +                                       var vsrc = new Vala.SourceFile(context, Vala.SourceFileType.SOURCE, src.get_path());
89                                         context.add_source_file(vsrc);
90                                         var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
91                                         vsrc.add_using_directive (ns_ref);
92                                         context.root.add_using_directive (ns_ref);
93                                         source_files[src.get_path()] = vsrc;
94                                 } else if (src.get_basename().has_suffix("vapi")) {
95 -                                       var vsrc = new Vala.SourceFile (context, src.get_path(), true);
96 +                                       var vsrc = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, src.get_path());
97                                         context.add_source_file(vsrc);
98                                         source_files[src.get_path()] = vsrc;
99                                 }
100                         }
101                 }
102 -               ThreadFunc parse = () => {
103 +               ThreadFunc<void*> parse = () => {
104                         lock (context) {
105                                 Vala.CodeContext.push(context);
106                                 var report = context.report as AnjutaReport;
107 @@ -102,10 +103,11 @@
108  
109                                 Vala.CodeContext.pop();
110                         }
111 +                       return null;
112                 };
113  
114                 try {
115 -                       Thread.create(parse, false);
116 +                       Thread.create<void*>(parse, false);
117                         debug("Using threads");
118                 } catch (ThreadError err) {
119                         parse();
120 @@ -195,7 +197,10 @@
121                 var path = file.get_file().get_path();
122                 lock (context) {
123                         if (!(path in source_files)) {
124 -                               var src = new Vala.SourceFile(context, path, path.has_suffix("vapi"));
125 +                               var src = new Vala.SourceFile(context,
126 +                                                             path.has_suffix("vapi") ? Vala.SourceFileType.PACKAGE:
127 +                                                                                           Vala.SourceFileType.SOURCE,
128 +                                                             path);
129                                 context.add_source_file(src);
130                                 source_files[path] = src;
131                                 update_file(src);
132 @@ -276,8 +281,8 @@
133                 } else if (sym is Vala.Property) {
134                         var prop = (Vala.Property) sym;
135                         result.concat (symbol_lookup_inherited (prop.property_type.data_type, name, prefix_match));
136 -               } else if (sym is Vala.FormalParameter) {
137 -                       var fp = (Vala.FormalParameter) sym;
138 +               } else if (sym is Vala.Parameter) {
139 +                       var fp = (Vala.Parameter) sym;
140                         result.concat (symbol_lookup_inherited (fp.variable_type.data_type, name, prefix_match));
141                 }
142  
143 @@ -327,44 +332,6 @@
144         }
145  }
146  
147 -
148 -/* Copied from valac */
149 -public bool add_package (Vala.CodeContext context, string pkg) {
150 -       if (context.has_package (pkg)) {
151 -               // ignore multiple occurences of the same package
152 -               return true;
153 -       }
154 -       var package_path = context.get_package_path (pkg, new string[]{});
155 -
156 -       if (package_path == null) {
157 -               return false;
158 -       }
159 -
160 -       context.add_package (pkg);
161 -
162 -       context.add_source_file (new Vala.SourceFile (context, package_path, true));
163 -
164 -       var deps_filename = Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg));
165 -       if (FileUtils.test (deps_filename, FileTest.EXISTS)) {
166 -               try {
167 -                       string deps_content;
168 -                       ulong deps_len;
169 -                       FileUtils.get_contents (deps_filename, out deps_content, out deps_len);
170 -                       foreach (string dep in deps_content.split ("\n")) {
171 -                               if (dep != "") {
172 -                                       if (!add_package (context, dep)) {
173 -                                               context.report.err (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg));
174 -                                       }
175 -                               }
176 -                       }
177 -               } catch (FileError e) {
178 -                       context.report.err (null, "Unable to read dependency file: %s".printf (e.message));
179 -               }
180 -       }
181 -
182 -       return true;
183 -}
184 -
185  [ModuleInit]
186  public Type anjuta_glue_register_components (TypeModule module) {
187      return typeof (ValaPlugin);
188 diff -urN anjuta-2.32.1.1.orig//plugins/language-support-vala/provider.vala anjuta-2.32.1.1/plugins/language-support-vala/provider.vala
189 --- anjuta-2.32.1.1.orig//plugins/language-support-vala/provider.vala   2010-12-29 17:22:49.000000000 +0000
190 +++ anjuta-2.32.1.1/plugins/language-support-vala/provider.vala 2012-04-14 13:35:43.087854800 +0000
191 @@ -26,7 +26,7 @@
192         const string PREF_AUTOCOMPLETE_ENABLE = "language.cpp.code.completion.enable";
193         const string PREF_SPACE_AFTER_FUNC = "language.cpp.code.completion.space.after.func";
194         const string PREF_BRACE_AFTER_FUNC = "language.cpp.code.completion.brace.after.func";
195 -       const string PREF_CALLTIP_ENABLE = "language.cpp.code.calltip.enable";
196 +       internal const string PREF_CALLTIP_ENABLE = "cpp-calltip-enable";
197  
198         static construct {
199                 try {
200 @@ -137,7 +137,7 @@
201                                                  false, plugin.get_current_block (editor));
202  
203                 foreach (var sym in syms) {
204 -                       Vala.List<Vala.FormalParameter> parameters = null;
205 +                       Vala.List<Vala.Parameter> parameters = null;
206                         if (sym is Vala.Method) {
207                                 parameters = ((Vala.Method) sym).get_parameters ();
208                         } else if (sym is Vala.Signal) {
209 diff -urN anjuta-2.32.1.1.orig//plugins/symbol-db/anjuta-tags/Makefile.am anjuta-2.32.1.1/plugins/symbol-db/anjuta-tags/Makefile.am
210 --- anjuta-2.32.1.1.orig//plugins/symbol-db/anjuta-tags/Makefile.am     2010-12-29 17:22:49.000000000 +0000
211 +++ anjuta-2.32.1.1/plugins/symbol-db/anjuta-tags/Makefile.am   2012-04-14 13:35:43.088662959 +0000
212 @@ -31,7 +31,7 @@
213         ${LEXER} ${LEXCCFLAGS} ${LEXFILE}
214  
215  ctags-visitor.c: ctags-visitor.vala
216 -       $(VALAC) -g -h ctags-vala.h -C --pkg vala-0.10 $^
217 +       $(VALAC) -g -h ctags-vala.h -C --pkg libvala-0.12 $^
218  
219  anjuta_tags_SOURCES = \
220         main.c        \
221 diff -urN anjuta-2.32.1.1.orig//plugins/symbol-db/anjuta-tags/Makefile.in anjuta-2.32.1.1/plugins/symbol-db/anjuta-tags/Makefile.in
222 --- anjuta-2.32.1.1.orig//plugins/symbol-db/anjuta-tags/Makefile.in     2010-12-29 17:45:07.000000000 +0000
223 +++ anjuta-2.32.1.1/plugins/symbol-db/anjuta-tags/Makefile.in   2012-04-14 13:35:43.088662959 +0000
224 @@ -865,7 +865,7 @@
225         ${LEXER} ${LEXCCFLAGS} ${LEXFILE}
226  
227  ctags-visitor.c: ctags-visitor.vala
228 -       $(VALAC) -g -h ctags-vala.h -C --pkg vala-0.10 $^
229 +       $(VALAC) -g -h ctags-vala.h -C --pkg libvala-0.12 $^
230  
231  # Tell versions [3.59,3.63) of GNU make to not export all variables.
232  # Otherwise a system limit (for SysV at least) may be exceeded.
233 diff -urN anjuta-2.32.1.1.orig//plugins/symbol-db/anjuta-tags/ctags-visitor.vala anjuta-2.32.1.1/plugins/symbol-db/anjuta-tags/ctags-visitor.vala
234 --- anjuta-2.32.1.1.orig//plugins/symbol-db/anjuta-tags/ctags-visitor.vala      2010-12-29 17:22:49.000000000 +0000
235 +++ anjuta-2.32.1.1/plugins/symbol-db/anjuta-tags/ctags-visitor.vala    2012-04-14 13:36:34.591850544 +0000
236 @@ -112,7 +112,7 @@
237                 }
238                 return ret.str;
239         }
240 -       static string signature (Vala.List<Vala.FormalParameter> parameter) {
241 +       static string signature (Vala.List<Vala.Parameter> parameter) {
242                 var ret = new StringBuilder("(");
243                 var first = true;
244                 foreach (var p in parameter) {
245 @@ -367,7 +367,7 @@
246                  * assumes that Parser.context is the same as source_file.context anyway */
247                 var context = new CodeContext();
248                 context.report = new DummyReport();
249 -               var source_file = new SourceFile(context, filename, filename.has_suffix("vapi"));
250 +               var source_file = new SourceFile(context, filename.has_suffix("vapi") ? SourceFileType.PACKAGE : SourceFileType.SOURCE, filename);
251  
252                 CodeContext.push(context);
253                 context.add_source_file(source_file);
254 @@ -383,7 +383,7 @@
255                 taglist = new GLib.List<CTagsEntry?>();
256                 var context = new CodeContext();
257                 context.report = new DummyReport();
258 -               var source_file = new SourceFile(context, filename);
259 +               var source_file = new SourceFile(context, SourceFileType.SOURCE, filename);
260                 context.add_source_file(source_file);
261  
262                 CodeContext.push(context);
This page took 0.086988 seconds and 3 git commands to generate.