summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gjc@src.gnome.org>2005-01-04 00:27:45 +0000
committerGustavo J. A. M. Carneiro <gjc@src.gnome.org>2005-01-04 00:27:45 +0000
commit1d3f9067870b849f30fa00bf9514e74b457a8ffd (patch)
treec355a522a1a32d3024b9d742a415a43167d82268
parent7d0d0d2fd1ff043e2c5b61205a9314f435c59a2e (diff)
downloadtotem-1d3f9067870b849f30fa00bf9514e74b457a8ffd.tar.gz
Install totem-plparser library; Fixes #162741
-rw-r--r--.cvsignore1
-rw-r--r--ChangeLog21
-rw-r--r--Makefile.am5
-rw-r--r--configure.in19
-rw-r--r--src/.cvsignore4
-rw-r--r--src/Makefile.am55
-rw-r--r--totem-plparser.pc.in13
7 files changed, 114 insertions, 4 deletions
diff --git a/.cvsignore b/.cvsignore
index ed3308fb2..14785b4eb 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -21,4 +21,5 @@ libtool
config.sub
config.guess
mkinstalldirs
+totem-plparser.pc
diff --git a/ChangeLog b/ChangeLog
index fc69284d3..bab6ee3b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2005-01-04 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * totem-plparser.pc.in: Add .pc file for totem-plparser library.
+
+ * Makefile.am: Install totem-plparser.pc.
+
+ * configure.in: Define PLPARSER_LT_VERSION, to specify libtool
+ version for libtotem-plparser.la. Look for packages required for
+ plparser, define TOTEM_PLPARSER_(CFLAGS|LIBS). Write
+ totem-plparser.pc.
+
+ * src/Makefile.am: Generate totem-pl-parser-builtins.[ch], for
+ registering enums. Build and install a library,
+ libtotem-plparser.la, which includes the totem playlist parser.
+ Also install the corresponding header files to
+ $(includedir)/totem/1/plparser. Make the main binary, totem, link
+ to this library and remove the duplicate sources.
+ PS: Changes based on the work of Tiago Cogumbreiro.
+
+ Fixes #162741. Reviewed by Bastien Nocera.
+
2005-01-03 Bastien Nocera <hadess@hadess.net>
* configure.in:
diff --git a/Makefile.am b/Makefile.am
index 02ebd7475..1092b612d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,7 +12,10 @@ EXTRA_DIST = \
totem.spec.in \
totem.spec \
omf.make \
+ totem-plparser.pc.in \
xmldocs.make
-CLEANFILES = totem.spec
+CLEANFILES = totem.spec totem-plparser.pc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = totem-plparser.pc
diff --git a/configure.in b/configure.in
index c1bf4cde7..8645a1881 100644
--- a/configure.in
+++ b/configure.in
@@ -15,6 +15,17 @@ AC_PROG_CXX
AC_PROG_LIBTOOL()
AC_PROG_INTLTOOL([0.20])
+# Before making a release, the PLPARSER_LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+# been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+# change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+PLPARSER_LT_VERSION=0:0:0
+AC_SUBST(PLPARSER_LT_VERSION)
+
+
AC_ARG_ENABLE(nvtv, AC_HELP_STRING([--enable-nvtv],[Enable support for TV-output with nvtv]), enable_nvtv="$enableval", enable_nvtv=yes)
if test x$enable_nvtv = xyes; then
@@ -289,6 +300,13 @@ AM_CONDITIONAL(HAVE_X86, `test "x$_system_is_x86" = "xyes" && test "x$CURL_CONFI
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
+dnl check for glib (defines GLIB_MKENUMS)
+AM_PATH_GLIB_2_0
+dnl Check for packages for building libtotem-plparser.la
+PKG_CHECK_MODULES(TOTEM_PLPARSER, [gtk+-2.0 libxml-2.0 gnome-vfs-2.0
+ gnome-vfs-module-2.0])
+
+
dnl debug
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--disable-debug],[disables compilation of debugging messages]),
@@ -319,6 +337,7 @@ AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
totem.spec
+totem-plparser.pc
src/Makefile
data/Makefile
data/totem.desktop.in.in
diff --git a/src/.cvsignore b/src/.cvsignore
index c748fafb6..3df588f5c 100644
--- a/src/.cvsignore
+++ b/src/.cvsignore
@@ -16,3 +16,7 @@ totem-properties-page
totem-video-thumbnailer
totem
vanity
+stamp-totem-pl-parser-builtins.h
+totem-pl-parser-builtins.c
+totem-pl-parser-builtins.h
+
diff --git a/src/Makefile.am b/src/Makefile.am
index 9738775b2..c24de33c9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,7 +91,6 @@ totem_SOURCES = \
bacon-video-widget-properties.h \
scrsaver.c scrsaver.h \
totem-options.c totem-options.h \
- totem-pl-parser.c totem-pl-parser.h \
totem-playlist.c totem-playlist.h \
totem-screenshot.c \
totem-screenshot.h \
@@ -103,10 +102,9 @@ totem_SOURCES = \
debug.h \
totem-statusbar.c \
totem-statusbar.h \
- totem-disc.c totem-disc.h \
totem-gromit.c totem-gromit.h
-totem_LDADD = $(X_LIBS) $(EXTRA_GNOME_LIBS) $(XTEST_LIBS) $(REMOTE_LIBS) $(XVIDMODE_LIBS) $(NVTV_LIBS)
+totem_LDADD = $(X_LIBS) $(EXTRA_GNOME_LIBS) $(XTEST_LIBS) $(REMOTE_LIBS) $(XVIDMODE_LIBS) $(NVTV_LIBS) libtotem-plparser.la
totem_video_thumbnailer_SOURCES = $(VIDEOWIDGET) totem-video-thumbnailer.c
totem_video_thumbnailer_LDADD = $(X_LIBS) $(GTK_LIBS) $(XTEST_LIBS) $(XVIDMODE_LIBS) $(NVTV_LIBS) $(EXTRA_GNOME_LIBS)
@@ -175,3 +173,54 @@ EXTRA_DIST = bacon-video-widget-xine.c \
totem-mozilla-viewer.c \
totem-mozilla-plugin.c
+## libtotem-plparser.la
+
+lib_LTLIBRARIES = libtotem-plparser.la
+
+libtotem_plparser_la_SOURCES = \
+ totem-pl-parser-builtins.c \
+ totemplparser-marshal.c \
+ totemplparser-marshal.h \
+ totem-disc.c \
+ totem-pl-parser.c
+
+plparserincludedir = $(includedir)/totem/1/plparser
+plparserinclude_HEADERS = \
+ totem-pl-parser-builtins.h \
+ totem-disc.h \
+ totem-pl-parser.h
+
+libtotem_plparser_la_LDFLAGS = \
+ -version-info $(PLPARSER_LT_VERSION) \
+ -no-undefined \
+ $(TOTEM_PLPARSER_LIBS)
+
+
+totem-pl-parser-builtins.h: stamp-totem-pl-parser-builtins.h
+ @true
+
+stamp-totem-pl-parser-builtins.h: totem-pl-parser.h Makefile
+ (cd $(srcdir) && $(GLIB_MKENUMS) \
+ --fhead "#ifndef __TOTEM_PL_PARSER_BUILTINS_H__\n#define __TOTEM_PL_PARSER_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define TOTEM_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __TOTEM_PL_PARSER_BUILTINS_H__ */" totem-pl-parser.h) >> xgen-gtbh \
+ && (cmp -s xgen-gtbh totem-pl-parser-builtins.h || cp xgen-gtbh totem-pl-parser-builtins.h ) \
+ && rm -f xgen-gtbh \
+ && echo timestamp > $(@F)
+
+totem-pl-parser-builtins.c: totem-pl-parser.h Makefile totem-pl-parser-builtins.h
+ (cd $(srcdir) && $(GLIB_MKENUMS) \
+ --fhead "#include \"totem-pl-parser.h\"" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ totem-pl-parser.h ) > xgen-gtbc \
+ && cp xgen-gtbc totem-pl-parser-builtins.c \
+ && rm -f xgen-gtbc
+
+CLEANFILES += \
+ totem-pl-parser-builtins.h \
+ totem-pl-parser-builtins.c \
+ stamp-totem-pl-parser-builtins.h
diff --git a/totem-plparser.pc.in b/totem-plparser.pc.in
new file mode 100644
index 000000000..743be1391
--- /dev/null
+++ b/totem-plparser.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+gconf_serverdir=@libexecdir@
+
+
+Name: totem-plparser
+Description: Totem Playlist Parser library
+Version: @VERSION@
+Requires: gtk+-2.0 libxml-2.0 gnome-vfs-2.0 gnome-vfs-module-2.0
+Libs: -L${libdir} -ltotem-plparser
+Cflags: -I${includedir}/totem/1/plparser