diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2014-01-17 18:55:34 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2014-01-17 18:55:34 +0100 |
commit | 911d0b5649bb15718baa3cfc8b409ab635f451a9 (patch) | |
tree | f287c5f418aba649a1e249120ce59ff81c217c55 | |
parent | 42cfa796f254aeb6cafc9f260dcb07ca8db7bf82 (diff) | |
download | vala-911d0b5649bb15718baa3cfc8b409ab635f451a9.tar.gz |
drivers: Drop compatibility for older unstable valac releases
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/driver/0.16.x/Makefile.am | 6 | ||||
-rw-r--r-- | src/driver/0.16.x/driver.vala | 6 | ||||
-rw-r--r-- | src/driver/0.16.x/girwriter.vala | 4 | ||||
-rw-r--r-- | src/driver/0.16.x/treebuilder.vala | 22 | ||||
-rw-r--r-- | src/driver/0.18.x/Makefile.am | 14 | ||||
-rw-r--r-- | src/driver/0.18.x/initializerbuilder.vala | 9 | ||||
-rw-r--r-- | src/driver/0.18.x/treebuilder.vala | 68 | ||||
-rw-r--r-- | src/driver/Makefile.am | 12 |
9 files changed, 1 insertions, 149 deletions
diff --git a/configure.ac b/configure.ac index a4e7ad14b..de36a9016 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/driver/0.16.x/Makefile.am b/src/driver/0.16.x/Makefile.am index 378b676cb..0d1b8b731 100644 --- a/src/driver/0.16.x/Makefile.am +++ b/src/driver/0.16.x/Makefile.am @@ -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) \ diff --git a/src/driver/0.16.x/driver.vala b/src/driver/0.16.x/driver.vala index 799ac77d7..6bed3b942 100644 --- a/src/driver/0.16.x/driver.vala +++ b/src/driver/0.16.x/driver.vala @@ -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, diff --git a/src/driver/0.16.x/girwriter.vala b/src/driver/0.16.x/girwriter.vala index 4128409b9..c250854d6 100644 --- a/src/driver/0.16.x/girwriter.vala +++ b/src/driver/0.16.x/girwriter.vala @@ -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 - diff --git a/src/driver/0.16.x/treebuilder.vala b/src/driver/0.16.x/treebuilder.vala index ef689c36d..b993a64c7 100644 --- a/src/driver/0.16.x/treebuilder.vala +++ b/src/driver/0.16.x/treebuilder.vala @@ -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; } diff --git a/src/driver/0.18.x/Makefile.am b/src/driver/0.18.x/Makefile.am index 4fec9b105..bd5016c1f 100644 --- a/src/driver/0.18.x/Makefile.am +++ b/src/driver/0.18.x/Makefile.am @@ -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) diff --git a/src/driver/0.18.x/initializerbuilder.vala b/src/driver/0.18.x/initializerbuilder.vala index 737de3ee8..7b26ab51f 100644 --- a/src/driver/0.18.x/initializerbuilder.vala +++ b/src/driver/0.18.x/initializerbuilder.vala @@ -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} */ diff --git a/src/driver/0.18.x/treebuilder.vala b/src/driver/0.18.x/treebuilder.vala index d36f71bd5..a7d7b449b 100644 --- a/src/driver/0.18.x/treebuilder.vala +++ b/src/driver/0.18.x/treebuilder.vala @@ -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: diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 440d0c42a..114448b30 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -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 |