]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix building with Vala 0.12 branch
authorEvan Nemerson <evan@coeus-group.com>
Fri, 29 Oct 2010 15:20:35 +0000 (17:20 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Fri, 29 Oct 2010 15:22:10 +0000 (17:22 +0200)
configure.in
src/doclets/gtkdoc/doclet.vala
src/libvaladoc/api/field.vala
src/libvaladoc/api/method.vala
src/libvaladoc/api/tree.vala
src/libvaladoc/html/htmlmarkupwriter.vala
src/libvaladoc/importer/girdocumentationimporter.vala

index 9776d437e3f1c140b9502f7ffe489bd9fa48dc11..2d606cc1ac351937f884e52665dfd7176ca12ce0 100644 (file)
@@ -25,8 +25,8 @@ AM_CONDITIONAL(ENABLE_VALADOCORG, test x$enable_valadocorg = xyes)
 
 
 
-VALA_PACKAGE=vala-0.10
-LIBVALA_REQUIRED=0.10.0
+VALA_PACKAGE=libvala-0.12
+LIBVALA_REQUIRED=0.11.0
 LIBGEE_REQUIRED=0.5
 LIBGVC_REQUIRED=2.16
 GLIB_REQUIRED=2.12.0
index 9d2c1f6b2c09732d85669d11ce844d4e26b7ab73..c0b273a624639adc9f6a3c64cd5480b34d868f68 100644 (file)
@@ -51,7 +51,8 @@ namespace Gtkdoc.Config {
                        var opt_context = new OptionContext ("- Vala GTK-Doc");
                        opt_context.set_help_enabled (true);
                        opt_context.add_main_entries (options, null);
-                       opt_context.parse (ref args);
+                       unowned string[] gtkdoc_args = args;
+                       opt_context.parse (ref gtkdoc_args);
                } catch (OptionError e) {
                        warning ("GtkDoc: Error: %s", e.message);
                        warning ("GtkDoc: Run '-X --help' to see a full list of available command line options.\n");
index 3203603c63ee19aa4e6118ad9f79f1366f0a9f04..d94d26e1dd466c66bf3fe2c02b4206de69034530 100644 (file)
@@ -41,7 +41,7 @@ public class Valadoc.Api.Field : Member {
                                return false;
                        }
 
-                       return ((Vala.Field) symbol).binding == MemberBinding.STATIC;
+                       return ((Vala.Field) symbol).binding == Vala.MemberBinding.STATIC;
                }
        }
 
index cca66862f6e8b72c7900c39d6787d258f326a281..a62bd41ff8c92da4d52a645cd60994917878cc1a 100644 (file)
@@ -78,7 +78,7 @@ public class Valadoc.Api.Method : Member {
                        if (is_constructor) {
                                return false;
                        }
-                       return ((Vala.Method) symbol).binding == MemberBinding.STATIC;
+                       return ((Vala.Method) symbol).binding == Vala.MemberBinding.STATIC;
                }
        }
 
index 639cfc6586df54c9073b9b868111ba108a6ef96c..cb305c4097892835d24c8706f24ce2ea92f67c28 100644 (file)
@@ -163,7 +163,7 @@ public class Valadoc.Api.Tree {
                this.context.experimental = settings.experimental;
                this.context.experimental_non_null = settings.experimental || settings.experimental_non_null;
                this.context.dbus_transformation = !settings.disable_dbus_transformation;
-
+               this.context.vapi_directories = settings.vapi_directories;
 
                if (settings.basedir == null) {
                        context.basedir = realpath (".");
@@ -241,15 +241,15 @@ public class Valadoc.Api.Tree {
                        return true;
                }
 
-               var package_path = context.get_package_path (pkg, settings.vapi_directories);
+               var package_path = context.get_vapi_path (pkg) ?? context.get_gir_path (pkg);
                if (package_path == null) {
+                       Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (pkg));
                        return false;
                }
 
                context.add_package (pkg);
 
-
-               var vfile = new Vala.SourceFile (context, package_path, true);
+               var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, package_path);
                context.add_source_file (vfile);
 
                Package vdpkg = new Package (vfile, pkg, true);
@@ -285,7 +285,7 @@ public class Valadoc.Api.Tree {
        public void add_depencies (string[] packages) {
                foreach (string package in packages) {
                        if (!add_package (package)) {
-                               Vala.Report.error (null, "%s not found in specified Vala API directories".printf (package));
+                               Vala.Report.error (null, "Package `%s' not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
                        }
                }
        }
@@ -299,7 +299,7 @@ public class Valadoc.Api.Tree {
                        if (FileUtils.test (source, FileTest.EXISTS)) {
                                var rpath = realpath (source);
                                if (source.has_suffix (".vala") || source.has_suffix (".gs")) {
-                                       var source_file = new Vala.SourceFile (context, rpath);
+                                       var source_file = new Vala.SourceFile (context, Vala.SourceFileType.SOURCE, rpath);
 
 
                                        if (this.sourcefiles == null) {
@@ -324,9 +324,9 @@ public class Valadoc.Api.Tree {
                                        context.add_source_file (source_file);
                                } else if (source.has_suffix (".vapi")) {
                                        string file_name = Path.get_basename (source);
-                                       file_name = file_name.ndup (file_name.size() - ".vapi".size());
+                                       file_name = file_name.ndup (file_name.length - ".vapi".length);
 
-                                       var vfile = new Vala.SourceFile (context, rpath, true);
+                                       var vfile = new Vala.SourceFile (context, Vala.SourceFileType.PACKAGE, rpath);
                                        Package vdpkg = new Package (vfile, file_name);
                                        context.add_source_file (vfile);
                                        this.packages.add (vdpkg);
index 7fbf6e16f1aa9cf173cea7002bde579827820884..7599d18510afed7bce62ccd3b30a7c743552082b 100755 (executable)
@@ -67,7 +67,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
                return this;
        }
 
-       private override bool inline_element (string name) {
+       protected override bool inline_element (string name) {
                return name != "html"
                        && name != "head"
                        && name != "title"
@@ -90,7 +90,7 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
                        && name != "img";
        }
 
-       private override bool content_inline_element (string name) {
+       protected override bool content_inline_element (string name) {
                return name == "title"
                        || name == "p"
                        || name == "a"
index a76215ba5c1f4197095feb64fff4d6b06e8cdd45..19c59993f32c5f2e9432ac1dac87d293ee825d86 100644 (file)
@@ -53,7 +53,7 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
 
        void parse_file (string gir_file) {
                reader = new Vala.MarkupReader (gir_file);
-               this.current_source_file = new Vala.SourceFile (tree.context, GLib.Path. get_basename (gir_file));
+               this.current_source_file = new Vala.SourceFile (tree.context, Vala.SourceFileType.PACKAGE, GLib.Path.get_basename (gir_file));
 
                // xml prolog
                next ();