[libpeas] Ensure the .pc files dependencies are up to date.



commit 3078aaea1671e35a59cc4c57c5ae1a2a40e82db9
Author: Steve Frécinaux <code istique net>
Date:   Sun Dec 19 12:25:06 2010 +0100

    Ensure the .pc files dependencies are up to date.
    
    To do so, we define all the requirements in configure.ac and use
    substitutions to set them in the .pc files.

 configure.ac               |   26 +++++++++++++++-----------
 data/libpeas-1.0.pc.in     |    2 +-
 data/libpeas-gtk-1.0.pc.in |    2 +-
 3 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9ab1ece..1f0020c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,18 +64,28 @@ AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
 
 dnl ================================================================
-dnl Start of pkg-config checks
+dnl Minimum libpeas requirements (GObject and Introspection)
 dnl ================================================================
 
 PKG_PROG_PKG_CONFIG
 
+GLIB_REQUIRED=2.18.0
+GOBJECT_REQUIRED=2.23.6
+INTROSPECTION_REQUIRED=0.9.0
+
 PKG_CHECK_MODULES(PEAS, [
-	glib-2.0 >= 2.18.0
-	gobject-2.0 >= 2.23.6
-	gmodule-2.0 >= 2.18.0
-	gobject-introspection-1.0 >= 0.9.6
+	glib-2.0 >= $GLIB_REQUIRED
+	gobject-2.0 >= $GOBJECT_REQUIRED
+	gmodule-2.0 >= $GLIB_REQUIRED
+	gobject-introspection-1.0 >= $INTROSPECTION_REQUIRED
 ])
 
+GOBJECT_INTROSPECTION_REQUIRE($INTROSPECTION_REQUIRED)
+
+AC_SUBST(GLIB_REQUIRED)
+AC_SUBST(GOBJECT_REQUIRED)
+AC_SUBST(INTROSPECTION_REQUIRED)
+
 dnl ================================================================
 dnl Build libpeas-gtk
 dnl ================================================================
@@ -132,12 +142,6 @@ if test "$os_osx" = "yes"; then
 fi
 
 dnl ================================================================
-dnl GObject Introspection
-dnl ================================================================
-
-GOBJECT_INTROSPECTION_REQUIRE([0.9.0])
-
-dnl ================================================================
 dnl Seed Javascript Engine
 dnl ================================================================
 
diff --git a/data/libpeas-1.0.pc.in b/data/libpeas-1.0.pc.in
index 3f3347e..d1ef76e 100644
--- a/data/libpeas-1.0.pc.in
+++ b/data/libpeas-1.0.pc.in
@@ -5,7 +5,7 @@ includedir= includedir@
 
 Name: libpeas
 Description: libpeas, a GObject plugins library
-Requires: glib-2.0 >= 2.18, gobject-2.0 >= 2.23.6, gmodule-2.0 >= 2.18, gobject-introspection-1.0 >= 0.6.7
+Requires: glib-2.0 >= @GLIB_REQUIRED@, gobject-2.0 >= @GOBJECT_REQUIRED@, gmodule-2.0 >= @GLIB_REQUIRED@, gobject-introspection-1.0 >= @INTROSPECTION_REQUIRED@
 Version: @VERSION@
 Cflags: -I${includedir}/libpeas-1.0
 Libs: -L${libdir} -lpeas-1.0
diff --git a/data/libpeas-gtk-1.0.pc.in b/data/libpeas-gtk-1.0.pc.in
index b86415d..61d2ac8 100644
--- a/data/libpeas-gtk-1.0.pc.in
+++ b/data/libpeas-gtk-1.0.pc.in
@@ -5,7 +5,7 @@ includedir= includedir@
 
 Name: libpeas-gtk
 Description: libpeas-gtk, a GObject plugins library (Gtk widgets)
-Requires: glib-2.0 >= 2.14, @GTK_PKG_REQUIREMENT@, libpeas-1.0 >= @VERSION@
+Requires: glib-2.0 >= @GLIB_REQUIRED@, @GTK_PKG_REQUIREMENT@, libpeas-1.0 >= @VERSION@
 Version: @VERSION@
 Cflags: -I${includedir}/libpeas-1.0
 Libs: -L${libdir} -lpeas-gtk-1.0



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