[valadoc] Use vala-0.10 or vala-0.12 package instead of vala-1.0.



commit c8e2dcbc0173138339bc9f8a656da1b00aab5fe2
Author: Evan Nemerson <evan coeus-group com>
Date:   Fri Aug 20 11:17:45 2010 +0200

    Use vala-0.10 or vala-0.12 package instead of vala-1.0.

 .gitignore                          |    1 +
 configure.in                        |   11 ++++++++++-
 src/doclets/devhelp/Makefile.am     |    2 +-
 src/doclets/gtkdoc/Makefile.am      |    2 +-
 src/doclets/htm/Makefile.am         |    2 +-
 src/doclets/valadoc.org/Makefile.am |    2 +-
 src/libvaladoc/Makefile.am          |    8 ++++++--
 src/libvaladoc/valadoc-1.0.deps     |    2 --
 src/libvaladoc/valadoc-1.0.deps.in  |    1 +
 src/valadoc/Makefile.am             |    2 +-
 10 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 246a866..221b5ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ Makefile
 *.stamp
 *.gir
 *.vapi
+*.deps
 .deps
 .libs
 
diff --git a/configure.in b/configure.in
index fe6dc82..2400705 100644
--- a/configure.in
+++ b/configure.in
@@ -46,9 +46,17 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
 AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 
-PKG_CHECK_MODULES(LIBVALA, vala-1.0 >= $LIBVALA_REQUIRED)
+PKG_CHECK_EXISTS(vala-0.12,
+  [
+    PKG_CHECK_MODULES(LIBVALA, vala-0.12 >= $LIBVALA_REQUIRED)
+    VALA_PACKAGE=vala-0.12
+  ], [
+    PKG_CHECK_MODULES(LIBVALA, vala-0.10 >= $LIBVALA_REQUIRED)
+    VALA_PACKAGE=vala-0.10
+  ])
 AC_SUBST(LIBVALA_CFLAGS)
 AC_SUBST(LIBVALA_LIBS)
+AC_SUBST(VALA_PACKAGE)
 
 PKG_CHECK_MODULES(LIBGEE, gee-1.0 >= $LIBGEE_REQUIRED)
 AC_SUBST(LIBGEE_CFLAGS)
@@ -62,6 +70,7 @@ AC_SUBST(LIBGDKPIXBUF_LIBS)
 
 AC_CONFIG_FILES([Makefile
                  src/libvaladoc/valadoc-1.0.pc
+                 src/libvaladoc/valadoc-1.0.deps
                  src/Makefile
                  icons/Makefile
                  doc/Makefile
diff --git a/src/doclets/devhelp/Makefile.am b/src/doclets/devhelp/Makefile.am
index 8527e11..701fc17 100644
--- a/src/doclets/devhelp/Makefile.am
+++ b/src/doclets/devhelp/Makefile.am
@@ -37,7 +37,7 @@ libdoclet_la_SOURCES =      \
 
 
 libdoclet.vala.stamp: $(libdoclet_la_VALASOURCES)
-	$(VALAC) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(top_srcdir)/src/libvaladoc --pkg vala-1.0 --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
+	$(VALAC) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(top_srcdir)/src/libvaladoc --pkg $(VALA_PACKAGE) --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
 	touch $@
 
 
diff --git a/src/doclets/gtkdoc/Makefile.am b/src/doclets/gtkdoc/Makefile.am
index 6a1c76c..c985357 100644
--- a/src/doclets/gtkdoc/Makefile.am
+++ b/src/doclets/gtkdoc/Makefile.am
@@ -42,7 +42,7 @@ libdoclet_la_SOURCES =  \
 
 
 libdoclet.vala.stamp: $(libdoclet_la_VALASOURCES)
-	$(VALAC) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(top_srcdir)/src/libvaladoc  --pkg vala-1.0 --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
+	$(VALAC) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(top_srcdir)/src/libvaladoc  --pkg $(VALA_PACKAGE) --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
 	touch $@
 
 
diff --git a/src/doclets/htm/Makefile.am b/src/doclets/htm/Makefile.am
index 4177352..12612a2 100644
--- a/src/doclets/htm/Makefile.am
+++ b/src/doclets/htm/Makefile.am
@@ -37,7 +37,7 @@ libdoclet_la_SOURCES =  \
 
 
 libdoclet.vala.stamp: $(libdoclet_la_VALASOURCES)
-	$(VALAC) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(top_srcdir)/src/libvaladoc  --pkg vala-1.0 --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
+	$(VALAC) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(top_srcdir)/src/libvaladoc  --pkg $(VALA_PACKAGE) --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
 	touch $@
 
 
diff --git a/src/doclets/valadoc.org/Makefile.am b/src/doclets/valadoc.org/Makefile.am
index a2e7d1c..2313124 100755
--- a/src/doclets/valadoc.org/Makefile.am
+++ b/src/doclets/valadoc.org/Makefile.am
@@ -11,7 +11,7 @@ BUILT_SOURCES = libdoclet.vala.stamp
 
 
 libdoclet.vala.stamp: $(libdoclet_VALASOURCES)
-	$(VALAC) -C --vapidir $(top_srcdir)/src/libvaladoc/ --vapidir $(top_srcdir)/src/vapi/ --pkg vala-1.0 --pkg gee-1.0 --pkg valadoc-1.0 --basedir . --save-temps $^
+	$(VALAC) -C --vapidir $(top_srcdir)/src/libvaladoc/ --vapidir $(top_srcdir)/src/vapi/ --pkg $(VALA_PACKAGE) --pkg gee-1.0 --pkg valadoc-1.0 --basedir . --save-temps $^
 	touch $@
 
 
diff --git a/src/libvaladoc/Makefile.am b/src/libvaladoc/Makefile.am
index d95cd94..cde4500 100644
--- a/src/libvaladoc/Makefile.am
+++ b/src/libvaladoc/Makefile.am
@@ -1,6 +1,6 @@
 NULL =
 
-globalvapidir = `pkg-config vala-1.0 --variable vapidir`
+globalvapidir = `pkg-config $(VALA_PACKAGE) --variable vapidir`
 
 
 AM_CFLAGS = \
@@ -147,7 +147,7 @@ libvaladocincludedir = $(includedir)/
 
 
 libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
-	$(VALAC) $(VALAFLAGS) -C -H valadoc-1.0.h --pkg gee-1.0 --pkg vala-1.0 --pkg libgvc --pkg gmodule-2.0 --pkg libgvc --vapidir $(top_srcdir)/src/vapi --pkg config --library valadoc-1.0 --basedir $(top_srcdir)/src/libvaladoc/ --save-temps $^
+	$(VALAC) $(VALAFLAGS) -C -H valadoc-1.0.h --pkg gee-1.0 --pkg $(VALA_PACKAGE) --pkg libgvc --pkg gmodule-2.0 --pkg libgvc --vapidir $(top_srcdir)/src/vapi --pkg config --library valadoc-1.0 --basedir $(top_srcdir)/src/libvaladoc/ --save-temps $^
 	touch $@
 
 
@@ -181,6 +181,10 @@ MAINTAINERCLEANFILES =                        \
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = valadoc-1.0.pc
 
+valadoc-1.0.deps: valadoc-1.0.deps.in
+	cat $^ > $@
+	echo $(VALA_PACKAGE) >> $@
+
 vapidir = $(datadir)/vala/vapi
 vapi_DATA =     \
 	valadoc-1.0.vapi \
diff --git a/src/libvaladoc/valadoc-1.0.deps.in b/src/libvaladoc/valadoc-1.0.deps.in
new file mode 100644
index 0000000..1745f3d
--- /dev/null
+++ b/src/libvaladoc/valadoc-1.0.deps.in
@@ -0,0 +1 @@
+libgvc
diff --git a/src/valadoc/Makefile.am b/src/valadoc/Makefile.am
index c6c0519..67bae8b 100644
--- a/src/valadoc/Makefile.am
+++ b/src/valadoc/Makefile.am
@@ -40,7 +40,7 @@ valadoc_LDADD =                 \
 
 
 valadoc.vala.stamp: $(valadoc_VALASOURCES)
-	$(VALAC) -C --pkg config --pkg vala-1.0 --pkg gee-1.0 --pkg gmodule-2.0 --vapidir $(top_srcdir)/src/vapi/ --vapidir ../libvaladoc/ --pkg valadoc-1.0 $^
+	$(VALAC) -C --pkg config --pkg $(VALA_PACKAGE) --pkg gee-1.0 --pkg gmodule-2.0 --vapidir $(top_srcdir)/src/vapi/ --vapidir ../libvaladoc/ --pkg valadoc-1.0 $^
 	touch $@
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]