[totem/introspection: 7/17] Bug 602753 — Make it possible to build plugins out-of-tree



commit 567558c62a5df85795bbcb2ceb79604e58cb20fb
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sat Jun 26 23:39:13 2010 +0100

    Bug 602753 â?? Make it possible to build plugins out-of-tree
    
    Install a limited set of headers for plugins to use, plus a pkg-config file.
    Closes: bgo#602753

 configure.in     |   12 ++++++++++++
 data/Makefile.am |    4 ++++
 data/totem.pc.in |   11 +++++++++++
 src/Makefile.am  |    4 ++++
 4 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index c3bdd6d..6efdbe2 100644
--- a/configure.in
+++ b/configure.in
@@ -4,6 +4,10 @@ m4_define(totem_version_major, 2)
 m4_define(totem_version_minor, 90)
 m4_define(totem_version_micro, 0)
 
+# The version of the API exposed to plugins
+m4_define(totem_api_version_major, 1)
+m4_define(totem_api_version_minor, 0)
+
 AC_INIT([totem],
         [totem_version_major.totem_version_minor.totem_version_micro],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=totem])
@@ -45,6 +49,10 @@ GNOMEICON_REQS=2.15.90
 DBUS_REQS=0.61
 VALA_REQS=0.7.5
 
+AC_SUBST(GLIB_REQS)
+AC_SUBST(GTK_REQS)
+AC_SUBST(TOTEM_PLPARSER_REQS)
+
 TOTEM_VERSION_MAJOR=totem_version_major
 TOTEM_VERSION_MINOR=totem_version_minor
 TOTEM_VERSION_MICRO=totem_version_micro
@@ -52,6 +60,9 @@ AC_SUBST(TOTEM_VERSION_MAJOR)
 AC_SUBST(TOTEM_VERSION_MINOR)
 AC_SUBST(TOTEM_VERSION_MICRO)
 
+TOTEM_API_VERSION=totem_api_version_major.totem_api_version_minor
+AC_SUBST(TOTEM_API_VERSION)
+
 # The full list of plugins
 allowed_plugins="thumbnail screensaver ontop galago gromit lirc media-player-keys mythtv properties sidebar-test skipto sample-python sample-vala bemused youtube publish tracker pythonconsole jamendo opensubtitles screenshot brasero-disc-recorder coherence_upnp dbus-service iplayer"
 
@@ -838,6 +849,7 @@ src/backend/Makefile
 browser-plugin/Makefile
 data/Makefile
 data/totem.desktop.in.in
+data/totem.pc
 data/icons/Makefile
 data/icons/16x16/Makefile
 data/icons/22x22/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 0677ae7..7fdcd37 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -83,6 +83,10 @@ if GCONF_SCHEMAS_INSTALL
 	fi
 endif
 
+# pkg-config file for the plugin API
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = totem.pc
+
 EXTRA_DIST = \
 	$(man_MANS)			\
 	$(stuff_DATA)			\
diff --git a/data/totem.pc.in b/data/totem.pc.in
new file mode 100644
index 0000000..f53a39c
--- /dev/null
+++ b/data/totem.pc.in
@@ -0,0 +1,11 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@/totem/@TOTEM_API_VERSION@
+pluginsdir= PLUGINDIR@
+
+Name: Totem
+Description: Totem Movie Player plugin API
+Requires: gio-2.0 >= @GLIB_REQS@ gtk+-2.0 >= @GTK_REQS@ totem-plparser >= @TOTEM_PLPARSER_REQS@
+Version: @VERSION@
+Cflags: -I${includedir}
diff --git a/src/Makefile.am b/src/Makefile.am
index 467f972..ec8cf62 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,6 +29,9 @@ INST_H_FILES = \
 	plugins/totem-plugin.h		\
 	plugins/totem-dirs.h
 
+headerdir = $(includedir)/totem/$(TOTEM_API_VERSION)
+header_DATA = $(INST_H_FILES)
+
 # Totem UI ltlibrary (used by browser plugins)
 
 libtotem_player_la_SOURCES = \
@@ -394,6 +397,7 @@ if HAVE_INTROSPECTION
 
 introspection_sources = $(INST_H_FILES) $(filter %.c,$(libtotem_player_la_SOURCES) $(libtotem_la_SOURCES))
 
+# NOTE: This should change with $(TOTEM_API_VERSION)
 Totem-1.0.gir: libtotem.la
 Totem_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gtk-3.0 TotemPlParser-1.0
 Totem_1_0_gir_CFLAGS = $(DEPENDENCY_CFLAGS)		\



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