]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
driver/0.18.x: Add support for vala-0.17.4
authorFlorian Brosch <flo.brosch@gmail.com>
Mon, 6 Aug 2012 23:23:38 +0000 (01:23 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Mon, 6 Aug 2012 23:23:38 +0000 (01:23 +0200)
configure.in
src/driver/0.18.x/Makefile.am
src/driver/0.18.x/initializerbuilder.vala
src/driver/0.18.x/treebuilder.vala
src/driver/Makefile.am

index 38bb5f9b65c29ea1a0a61575dc5faa9acc7a8006..5260732724cf1eadf990bba56e4607598876b750 100644 (file)
@@ -62,12 +62,20 @@ AC_SUBST(LIBGDKPIXBUF_LIBS)
 ## Drivers:
 ##
 
-PKG_CHECK_MODULES(LIBVALA_0_18_X, libvala-0.18 >= 0.17.1, have_libvala_0_18_x="yes", have_libvala_0_18_x="no")
+PKG_CHECK_MODULES(LIBVALA_0_18_X, libvala-0.18 >= 0.17.4, have_libvala_0_18_x="yes", have_libvala_0_18_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_18_X, test "$have_libvala_0_18_x" = "yes")
 AC_SUBST(LIBVALA_0_18_X_CFLAGS)
 AC_SUBST(LIBVALA_0_18_X_LIBS)
 
 
+
+PKG_CHECK_MODULES(LIBVALA_0_17__1_3, libvala-0.18 >= 0.17.1   libvala-0.18 <= 0.17.3, have_libvala_0_17__1_3="yes", have_libvala_0_17__1_3="no")
+AM_CONDITIONAL(HAVE_LIBVALA_0_17__1_3, test "$have_libvala_0_17__1_3" = "yes")
+AC_SUBST(HAVE_LIBVALA_0_17__1_3_CFLAGS)
+AC_SUBST(HAVE_LIBVALA_0_17__1_3_LIBS)
+
+
+
 PKG_CHECK_MODULES(LIBVALA_0_17_0, libvala-0.18 = 0.17.0, have_libvala_0_17_0="yes", have_libvala_0_17_0="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_17_0, test "$have_libvala_0_17_0" = "yes")
 AC_SUBST(LIBVALA_0_17_0_CFLAGS)
@@ -153,7 +161,7 @@ AC_CONFIG_FILES([Makefile
                  src/doclets/gtkdoc/Makefile
                  src/valadoc/Makefile
                  tests/Makefile
-                                ])
+       ])
 
 
 AC_OUTPUT
index 9958cf36c82064ca88bd8ab1753707919432461b..ad64d182081d67d50311ce6a7b13e16e96c66af1 100644 (file)
@@ -9,6 +9,9 @@ if HAVE_LIBVALA_0_17_0
 VALA_FLAGS = -D VALA_0_17_0
 endif
 
+if HAVE_LIBVALA_0_17__1_3
+VALA_FLAGS = -D VALA_0_17__1_3
+endif
 
 
 AM_CFLAGS =  -g \
@@ -17,6 +20,7 @@ AM_CFLAGS =  -g \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBVALA_0_18_X_CFLAGS) \
+       $(LIBVALA_0_17__1_3_CFLAGS) \
        $(LIBVALA_0_17_1_CFLAGS) \
        $(LIBVALA_0_17_0_CFLAGS) \
        $(NULL)
@@ -61,6 +65,7 @@ libdriver_la_LIBADD = \
        ../../libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
        $(LIBVALA_0_18_X_LIBS) \
+       $(LIBVALA_0_17__1_3_LIBS) \
        $(LIBVALA_0_17_1_LIBS) \
        $(LIBVALA_0_17_0_LIBS) \
        $(LIBGEE_LIBS) \
index 70fd1d6bb9fc9bc2b23dc1e4bb941e17bafc3c3f..737de3ee85c4697278ec46bd92f7c11c84f1504f 100644 (file)
@@ -559,12 +559,14 @@ private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
                signature.append_literal (lit.to_string (), false);
        }
 
+#if VALA_0_17__1_3 || VALA_0_17_0
        /**
         * {@inheritDoc}
         */
        public override void visit_list_literal (Vala.ListLiteral lit) {
                signature.append_literal (lit.to_string (), false);
        }
+#endif
 
        /**
         * {@inheritDoc}
index dcfae0bd0602041628b9c676e3de44496426f3f1..68e0f057cb27ac90ddb4e79fc7e21d28f398dd83 100644 (file)
@@ -671,16 +671,18 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
 
                                        register_source_file (source_package, source_file);
 
-                                       if (context.profile == Vala.Profile.POSIX) {
-                                               // import the Posix namespace by default (namespace of backend-specific standard library)
-                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "Posix", null));
-                                               source_file.add_using_directive (ns_ref);
-                                               context.root.add_using_directive (ns_ref);
-                                       } else if (context.profile == Vala.Profile.GOBJECT) {
+                                       if (context.profile == Vala.Profile.GOBJECT) {
                                                // import the GLib namespace by default (namespace of backend-specific standard library)
                                                var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
                                                source_file.add_using_directive (ns_ref);
                                                context.root.add_using_directive (ns_ref);
+#if VALA_0_17__1_3|| VALA_0_17_0
+                                       } else if (context.profile == Vala.Profile.POSIX) {
+                                               // import the Posix namespace by default (namespace of backend-specific standard library)
+                                               var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "Posix", null));
+                                               source_file.add_using_directive (ns_ref);
+                                               context.root.add_using_directive (ns_ref);
+#endif
                                        }
 
                                        context.add_source_file (source_file);
@@ -749,12 +751,7 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                        }
                }
 
-               if (context.profile == Vala.Profile.POSIX) {
-                       // default package
-                       if (!add_package (context, "posix")) {
-                               Vala.Report.error (null, "posix not found in specified Vala API directories");
-                       }
-               } else if (context.profile == Vala.Profile.GOBJECT) {
+               if (context.profile == Vala.Profile.GOBJECT) {
                        int glib_major = 2;
                        int glib_minor = 12;
 
@@ -786,9 +783,15 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                        if (!this.add_package (context, "gobject-2.0")) { //
                                Vala.Report.error (null, "gobject-2.0 not found in specified Vala API directories");
                        }
+#if VALA_0_17__1_3 || VALA_0_17_0
+               } else if (context.profile == Vala.Profile.POSIX) {
+                       // default package
+                       if (!add_package (context, "posix")) {
+                               Vala.Report.error (null, "posix not found in specified Vala API directories");
+                       }
+#endif
                }
 
-
                // add user defined files:
                add_depencies (context, settings.packages);
                if (reporter.errors > 0) {
index 34f992dfeff95f553844913971ac2bd234de292b..4ed5eef0ae9a7dc286e57dcb6ad406b1900fa848 100644 (file)
@@ -38,6 +38,10 @@ if HAVE_LIBVALA_0_17_0
 DRIVER_0_18_X_DIR = 0.18.x
 endif
 
+if HAVE_LIBVALA_0_17__1_3
+DRIVER_0_18_X_DIR = 0.18.x
+endif
+
 if HAVE_LIBVALA_0_18_X
 DRIVER_0_18_X_DIR = 0.18.x
 endif