[valadoc] driver/0.18.x: Add support for vala-0.17.4
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] driver/0.18.x: Add support for vala-0.17.4
- Date: Mon, 6 Aug 2012 23:34:15 +0000 (UTC)
commit 93c84a28089a7d8e96b2c22b2b0201a49b7c7aff
Author: Florian Brosch <flo brosch gmail com>
Date: Tue Aug 7 01:23:38 2012 +0200
driver/0.18.x: Add support for vala-0.17.4
configure.in | 12 ++++++++++--
src/driver/0.18.x/Makefile.am | 5 +++++
src/driver/0.18.x/initializerbuilder.vala | 2 ++
src/driver/0.18.x/treebuilder.vala | 29 ++++++++++++++++-------------
src/driver/Makefile.am | 4 ++++
5 files changed, 37 insertions(+), 15 deletions(-)
---
diff --git a/configure.in b/configure.in
index 38bb5f9..5260732 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/src/driver/0.18.x/Makefile.am b/src/driver/0.18.x/Makefile.am
index 9958cf3..ad64d18 100644
--- a/src/driver/0.18.x/Makefile.am
+++ b/src/driver/0.18.x/Makefile.am
@@ -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) \
diff --git a/src/driver/0.18.x/initializerbuilder.vala b/src/driver/0.18.x/initializerbuilder.vala
index 70fd1d6..737de3e 100644
--- a/src/driver/0.18.x/initializerbuilder.vala
+++ b/src/driver/0.18.x/initializerbuilder.vala
@@ -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}
diff --git a/src/driver/0.18.x/treebuilder.vala b/src/driver/0.18.x/treebuilder.vala
index dcfae0b..68e0f05 100644
--- a/src/driver/0.18.x/treebuilder.vala
+++ b/src/driver/0.18.x/treebuilder.vala
@@ -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) {
diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am
index 34f992d..4ed5eef 100644
--- a/src/driver/Makefile.am
+++ b/src/driver/Makefile.am
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]