]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
drivers: Drop compatibility for older unstable valac releases
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Jan 2014 17:55:34 +0000 (18:55 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Jan 2014 17:55:34 +0000 (18:55 +0100)
configure.ac
src/driver/0.16.x/Makefile.am
src/driver/0.16.x/driver.vala
src/driver/0.16.x/girwriter.vala
src/driver/0.16.x/treebuilder.vala
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 a4e7ad14bbbd6d943786ccadc17c5b4a1e37a7f7..de36a9016b0a5f52257b837e35ccf38ddbe73e0e 100644 (file)
@@ -95,18 +95,9 @@ AM_CONDITIONAL(HAVE_LIBVALA_0_20_X, test "$have_libvala_0_20_x" = "yes")
 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")
 
-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")
-
-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")
-
 PKG_CHECK_MODULES(LIBVALA_0_16_X, libvala-0.16 >= 0.15.1, have_libvala_0_16_x="yes", have_libvala_0_16_x="no")
 AM_CONDITIONAL(HAVE_LIBVALA_0_16_X, test "$have_libvala_0_16_x" = "yes")
 
-PKG_CHECK_MODULES(LIBVALA_0_15_0, libvala-0.16 = 0.15.0, have_libvala_0_15_0="yes", have_libvala_0_15_0="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_15_0, test "$have_libvala_0_15_0" = "yes")
-
 
 AC_CONFIG_FILES([
 Makefile
index 378b676cb3a6684f3aad177b2c14972d0ed10b0d..0d1b8b731e5dca63263a22d073579df599e65f9c 100644 (file)
@@ -2,17 +2,12 @@ NULL =
 
 VERSIONED_VAPI_DIR=`pkg-config libvala-0.16 --variable vapidir`
 
-if HAVE_LIBVALA_0_15_0
-VALAFLAGS = -D VALA_0_15_0
-endif
-
 AM_CFLAGS = \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
        -I $(top_builddir)/src/libvaladoc/ \
        $(GLIB_CFLAGS) \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
-       $(LIBVALA_0_15_0_CFLAGS) \
        $(LIBVALA_0_16_X_CFLAGS) \
        -g \
        -w \
@@ -61,7 +56,6 @@ libdriver.vala.stamp: $(libdriver_la_VALASOURCES) Makefile
 libdriver_la_LIBADD = \
        $(top_builddir)/src/libvaladoc/libvaladoc.la \
        $(GLIB_LIBS) \
-       $(LIBVALA_0_15_0_LIBS) \
        $(LIBVALA_0_16_X_LIBS) \
        $(LIBGEE_LIBS) \
        $(LIBGVC_LIBS) \
index 799ac77d78275557343a4e98e89cf71d258af190..6bed3b94253aecda9d3488c0312e21773ab8201a 100644 (file)
@@ -33,11 +33,7 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
        private Api.Tree? tree;
 
        public void write_gir (Settings settings, ErrorReporter reporter) {
-#if VALA_0_15_0
-               var gir_writer = new Vala.GIRWriter ();
-#else
                var gir_writer = new Drivers.GirWriter (resolver);
-#endif
 
                // put .gir file in current directory unless -d has been explicitly specified
                string gir_directory = ".";
@@ -45,7 +41,7 @@ public class Valadoc.Drivers.Driver : Object, Valadoc.Driver {
                        gir_directory = settings.gir_directory;
                }
 
-               gir_writer.write_file ((Vala.CodeContext) tree.data, 
+               gir_writer.write_file ((Vala.CodeContext) tree.data,
                                                           gir_directory,
                                                           settings.gir_namespace,
                                                           settings.gir_version,
index 4128409b9007aae364942abf0e6ed39e361f5d11..c250854d64b8c4a97763044fbc422136ef60aa0d 100644 (file)
@@ -24,8 +24,6 @@
 using Valadoc.Api;
 
 
-#if ! VALA_0_15_0
-
 /**
  * Code visitor generating .gir file for the public interface.
  */
@@ -204,5 +202,3 @@ public class Valadoc.Drivers.GirWriter : Vala.GIRWriter {
 }
 
 
-#endif
-
index ef689c36df6be06e64fa701a106f40e7fb4938bf..b993a64c7bfbf09c758be5fbd444d5d725b72c83 100644 (file)
@@ -85,7 +85,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                                 && ((Vala.SourceFile) file.data).file_type == Vala.SourceFileType.SOURCE)
                                        ) {
                                                Vala.SourceReference pos = c.source_reference;
-#if ! VALA_0_15_0
                                                if (c is Vala.GirComment) {
                                                        comment = new GirSourceComment (c.content,
                                                                                                                        file,
@@ -101,14 +100,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                                                                                                 pos.last_line,
                                                                                                                 pos.last_column);
                                                }
-#else
-                                               comment = new SourceComment (c.content,
-                                                                                                        file,
-                                                                                                        pos.first_line,
-                                                                                                        pos.first_column,
-                                                                                                        pos.last_line,
-                                                                                                        pos.last_column);
-#endif
                                                break;
                                        }
                                }
@@ -429,18 +420,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
        }
 
        private SourceComment? create_comment (Vala.Comment? comment) {
-#if VALA_0_15_0
-               if (comment != null) {
-                       Vala.SourceReference pos = comment.source_reference;
-                       SourceFile file = files.get (pos.file);
-                       return new SourceComment (comment.content,
-                                                                         file,
-                                                                         pos.first_line,
-                                                                         pos.first_column,
-                                                                         pos.last_line,
-                                                                         pos.last_column);
-               }
-#else
                if (comment != null) {
                        Vala.SourceReference pos = comment.source_reference;
                        SourceFile file = files.get (pos.file);
@@ -483,7 +462,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                                                                  pos.last_column);
                        }
                }
-#endif
                return null;
        }
 
index 4fec9b10568fcb6dc4785efcdddfa16727acdcd0..bd5016c1f50435d26361b3005b7a4851322cbec6 100644 (file)
@@ -2,14 +2,6 @@ NULL =
 
 VERSIONED_VAPI_DIR=`pkg-config libvala-0.18 --variable vapidir`
 
-if HAVE_LIBVALA_0_17_0
-VALAFLAGS = -D VALA_0_17_0
-endif
-
-if HAVE_LIBVALA_0_17__1_3
-VALAFLAGS = -D VALA_0_17__1_3
-endif
-
 AM_CFLAGS = \
        -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
        -I $(top_builddir)/src/libvaladoc/ \
@@ -17,9 +9,6 @@ AM_CFLAGS = \
        $(LIBGEE_CFLAGS) \
        $(LIBGVC_CFLAGS) \
        $(LIBVALA_0_18_X_CFLAGS) \
-       $(LIBVALA_0_17__1_3_CFLAGS) \
-       $(LIBVALA_0_17_1_CFLAGS) \
-       $(LIBVALA_0_17_0_CFLAGS) \
        -g \
        -w \
        $(NULL)
@@ -68,9 +57,6 @@ libdriver_la_LIBADD = \
        $(top_builddir)/src/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) \
        $(LIBGVC_LIBS) \
        $(NULL)
index 737de3ee85c4697278ec46bd92f7c11c84f1504f..7b26ab51f567ee0cb23c141b63d437d858ca62f2 100644 (file)
@@ -559,15 +559,6 @@ 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 d36f71bd57201cfe749627aaccf295ad6c1fa716..a7d7b449b3a71834bacec249e6a6b141a18e08d7 100644 (file)
@@ -86,37 +86,19 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                        ) {
                                                Vala.SourceReference pos = c.source_reference;
                                                if (c is Vala.GirComment) {
-#if VALA_0_17_0
-                                                       comment = new GirSourceComment (c.content,
-                                                                                                                       file,
-                                                                                                                       pos.first_line,
-                                                                                                                       pos.first_column,
-                                                                                                                       pos.last_line,
-                                                                                                                       pos.last_column);
-#else
                                                        comment = new GirSourceComment (c.content,
                                                                                                                        file,
                                                                                                                        pos.begin.line,
                                                                                                                        pos.begin.column,
                                                                                                                        pos.end.line,
                                                                                                                        pos.end.column);
-#endif
                                                } else {
-#if VALA_0_17_0
-                                                       comment = new SourceComment (c.content,
-                                                                                                                file,
-                                                                                                                pos.first_line,
-                                                                                                                pos.first_column,
-                                                                                                                pos.last_line,
-                                                                                                                pos.last_column);
-#else
                                                        comment = new SourceComment (c.content,
                                                                                                                 file,
                                                                                                                 pos.begin.line,
                                                                                                                 pos.begin.column,
                                                                                                                 pos.end.line,
                                                                                                                 pos.end.column);
-#endif
                                                }
                                                break;
                                        }
@@ -365,78 +347,42 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                        Vala.SourceReference pos = comment.source_reference;
                        SourceFile file = files.get (pos.file);
                        if (comment is Vala.GirComment) {
-#if VALA_0_17_0
-                               var tmp = new GirSourceComment (comment.content,
-                                                                                               file,
-                                                                                               pos.first_line,
-                                                                                               pos.first_column,
-                                                                                               pos.last_line,
-                                                                                               pos.last_column);
-#else
                                var tmp = new GirSourceComment (comment.content,
                                                                                                file,
                                                                                                pos.begin.line,
                                                                                                pos.begin.column,
                                                                                                pos.end.line,
                                                                                                pos.end.column);
-#endif
                                if (((Vala.GirComment) comment).return_content != null) {
                                        Vala.SourceReference return_pos = ((Vala.GirComment) comment).return_content.source_reference;
-#if VALA_0_17_0
-                                       tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
-                                                                                                                       file,
-                                                                                                                       return_pos.first_line,
-                                                                                                                       return_pos.first_column,
-                                                                                                                       return_pos.last_line,
-                                                                                                                       return_pos.last_column);
-#else
                                        tmp.return_comment = new SourceComment (((Vala.GirComment) comment).return_content.content,
                                                                                                                        file,
                                                                                                                        return_pos.begin.line,
                                                                                                                        return_pos.begin.column,
                                                                                                                        return_pos.end.line,
                                                                                                                        return_pos.end.column);
-#endif
                                }
 
                                Vala.MapIterator<string, Vala.Comment> it = ((Vala.GirComment) comment).parameter_iterator ();
                                while (it.next ()) {
                                        Vala.Comment vala_param = it.get_value ();
                                        Vala.SourceReference param_pos = vala_param.source_reference;
-#if VALA_0_17_0
-                                       var param_comment = new SourceComment (vala_param.content,
-                                                                                                                  file,
-                                                                                                                  param_pos.first_line,
-                                                                                                                  param_pos.first_column,
-                                                                                                                  param_pos.last_line,
-                                                                                                                  param_pos.last_column);
-#else
                                        var param_comment = new SourceComment (vala_param.content,
                                                                                                                   file,
                                                                                                                   param_pos.begin.line,
                                                                                                                   param_pos.begin.column,
                                                                                                                   param_pos.end.line,
                                                                                                                   param_pos.end.column);
-#endif
                                        tmp.add_parameter_content (it.get_key (), param_comment);
                                }
                                return tmp;
                        } else {
-#if VALA_0_17_0
-                               return new SourceComment (comment.content,
-                                                                                 file,
-                                                                                 pos.first_line,
-                                                                                 pos.first_column,
-                                                                                 pos.last_line,
-                                                                                 pos.last_column);
-#else
                                return new SourceComment (comment.content,
                                                                                  file,
                                                                                  pos.begin.line,
                                                                                  pos.begin.column,
                                                                                  pos.end.line,
                                                                                  pos.end.column);
-#endif
                        }
                }
 
@@ -862,13 +808,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                                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);
@@ -978,13 +917,6 @@ 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:
index 440d0c42a38e6bda7bc5f8da0f1d45d949ab93b5..114448b3077dee6f5bcc048418bed349fde921b9 100644 (file)
@@ -1,21 +1,9 @@
 NULL =
 
-if HAVE_LIBVALA_0_15_0
-DRIVER_0_16_X_DIR = 0.16.x
-endif
-
 if HAVE_LIBVALA_0_16_X
 DRIVER_0_16_X_DIR = 0.16.x
 endif
 
-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