From 932af8013d186a2b3ece32a95e4dc84026bb2469 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 14 Jan 2008 14:34:00 +0000 Subject: [PATCH] Updated patch for xulrunner support --- totem-xul-2.patch => totem-xul-3.patch | 110 ++++++++++++++++++++----- totem.spec | 2 +- 2 files changed, 90 insertions(+), 22 deletions(-) rename totem-xul-2.patch => totem-xul-3.patch (76%) diff --git a/totem-xul-2.patch b/totem-xul-3.patch similarity index 76% rename from totem-xul-2.patch rename to totem-xul-3.patch index 0319833..91b218a 100644 --- a/totem-xul-2.patch +++ b/totem-xul-3.patch @@ -1,6 +1,6 @@ Index: browser-plugin/totemStringGlue.h =================================================================== ---- browser-plugin/totemStringGlue.h (revision 5015) +--- browser-plugin/totemStringGlue.h (revision 5020) +++ browser-plugin/totemStringGlue.h (working copy) @@ -1,58 +0,0 @@ -/* Totem browser plugin @@ -63,7 +63,7 @@ Index: browser-plugin/totemStringGlue.h - Index: browser-plugin/totemPlugin.h =================================================================== ---- browser-plugin/totemPlugin.h (revision 5015) +--- browser-plugin/totemPlugin.h (revision 5020) +++ browser-plugin/totemPlugin.h (working copy) @@ -29,9 +29,8 @@ @@ -79,7 +79,7 @@ Index: browser-plugin/totemPlugin.h #include Index: browser-plugin/Makefile.am =================================================================== ---- browser-plugin/Makefile.am (revision 5015) +--- browser-plugin/Makefile.am (revision 5020) +++ browser-plugin/Makefile.am (working copy) @@ -144,7 +144,6 @@ totemPluginGlue.h \ @@ -131,9 +131,17 @@ Index: browser-plugin/Makefile.am totemClassInfo.h \ Index: configure.in =================================================================== ---- configure.in (revision 5015) +--- configure.in (revision 5020) +++ configure.in (working copy) -@@ -560,61 +560,23 @@ +@@ -40,6 +40,7 @@ + GNOMEICON_REQS=2.15.90 + DBUS_REQS=0.61 + VALA_REQS=0.1.5 ++XULRUNNER_REQS=1.9 + + TOTEM_VERSION_MAJOR=totem_version_major + TOTEM_VERSION_MINOR=totem_version_minor +@@ -560,61 +561,23 @@ [AS_HELP_STRING([--enable-browser-plugins],[compile the totem browser plugins])], [],[enable_browser_plugins=autodetect]) @@ -146,7 +154,7 @@ Index: configure.in if test "$enable_browser_plugins" != "no" ; then - AC_MSG_CHECKING([which gecko to use]) -+ PKG_CHECK_MODULES([GECKO], [libxul >= 1.8], [gecko=xulrunner], [gecko=""]) ++ PKG_CHECK_MODULES([GECKO], [libxul >= $XULRUNNER_REQS], [gecko=xulrunner], [gecko=""]) - AC_ARG_WITH([gecko], - [AS_HELP_STRING([--with-gecko],[Which gecko engine to use (default: autodetect)])]) @@ -170,7 +178,7 @@ Index: configure.in - fi - - if test -z "$gecko" -a "$enable_browser_plugins" = "autodetect"; then -+ if "$enable_browser_plugins" = "autodetect"; then ++ if "x$enable_browser_plugins" = "xautodetect"; then dnl No gecko found, disable plugin AC_MSG_WARN([No gecko found, disabling plugin]) enable_browser_plugins=no @@ -198,17 +206,44 @@ Index: configure.in if test "$enable_cxx_warnings" != "no" -a "$GXX" = "yes"; then PLUGIN_EXTRA_WARN_CXXFLAGS="-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Woverloaded-virtual" else -@@ -627,8 +589,7 @@ +@@ -625,15 +588,14 @@ + + # Check for mozilla modules, but keep the CFLAGS and LIBS in # separate vars - if test "$enable_browser_plugins" = "yes" ; then +-if test "$enable_browser_plugins" = "yes" ; then ++if test "x$enable_browser_plugins" = "xyes" ; then PKG_CHECK_MODULES([MOZILLA_NOT_LINKED], - [$MOZILLA-xpcom >= $MOZILLA_VERSION_MIN \ - $MOZILLA-plugin],, -+ [libxul >= 1.9],, ++ [libxul >= $XULRUNNER_REQS],, [enable_browser_plugins=no]) fi # Check for other required modules, and merge CFLAGS, but not link -@@ -675,24 +636,28 @@ + # flags to avoid linking against -lxpcom -lplds4 -lplc4 -lnspr4 +-if test "$enable_browser_plugins" = "yes" ; then ++if test "x$enable_browser_plugins" = "xyes" ; then + PKG_CHECK_MODULES([BROWSER_PLUGIN], + [glib-2.0 + gnome-vfs-2.0 >= $GNOMEVFS_REQS +@@ -654,7 +616,7 @@ + >= 0.22 to function.])]) + fi + +-if test "$enable_browser_plugins" = "yes" ; then ++if test "x$enable_browser_plugins" = "xyes" ; then + PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_REQS],, + [enable_browser_plugins=no]) + DBUSLIBDIR="`$PKG_CONFIG dbus-glib-1 --variable=libdir`" +@@ -667,7 +629,7 @@ + fi + + if test "$enable_browser_plugins" = "yes" ; then +- PKG_CHECK_MODULES([SN], [ libstartup-notification-1.0 >= 0.8 ], [enable_browser_plugins = yes], [enable_browser_plugins=no]) ++ PKG_CHECK_MODULES([SN], [ libstartup-notification-1.0 >= 0.8 ], enable_browser_plugins=yes, enable_browser_plugins=no) + if test "x$enable_browser_plugins" != "xyes" ; then + AC_MSG_WARN([libstartup-notification not found, necessary to build the plugin viewer]) + fi +@@ -675,56 +637,46 @@ # Sets some variables, and check for xpidl if test "$enable_browser_plugins" = "yes" ; then @@ -222,6 +257,7 @@ Index: configure.in + MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir libxul`" + MOZILLA_XPCOM_CFLAGS="`$PKG_CONFIG --cflags libxul-unstable`" + MOZILLA_LIBS="`$PKG_CONFIG --libs libxul`" ++ MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir libxul`" + MOZILLA_PLUGINDIR="${MOZILLA_PLUGINDIR:-"\${libdir}/mozilla/plugins"}" @@ -242,11 +278,13 @@ Index: configure.in + AC_SUBST([MOZILLA_LIBS]) AC_SUBST([MOZILLA_XPCOM_CFLAGS]) AC_SUBST([MOZILLA_INCLUDE_ROOT]) ++ AC_SUBST([MOZILLA_IDLDIR]) AC_ARG_VAR([MOZILLA_PLUGINDIR],[Where to install the plugin to]) -@@ -701,15 +666,7 @@ - # Search for the idl include directory - if test "$enable_browser_plugins" = "yes" ; then - dnl This only works on gecko 1.8 + fi + +-# Search for the idl include directory +-if test "$enable_browser_plugins" = "yes" ; then +- dnl This only works on gecko 1.8 - MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir $MOZILLA-xpcom`" - dnl Fallback for older versions - if test "x$MOZILLA_IDLDIR" = "x"; then @@ -256,11 +294,37 @@ Index: configure.in - if test "x$MOZILLA_IDLDIR" = "x"; then - MOZILLA_IDLDIR="$MOZILLA_INCLUDE_ROOT/idl" - fi -+ MOZILLA_IDLDIR="`$PKG_CONFIG --variable=idldir libxul`" - - AC_SUBST([MOZILLA_IDLDIR]) +- +- AC_SUBST([MOZILLA_IDLDIR]) +-fi +- +-if test "$enable_browser_plugins" = "yes" ; then ++if test "x$enable_browser_plugins" = "xyes" ; then + AC_DEFINE([ENABLE_BROWSER_PLUGINS],[1],[Define if you build the mozilla plugin]) fi -@@ -782,32 +739,6 @@ + +-AM_CONDITIONAL([ENABLE_BROWSER_PLUGINS], [test "$enable_browser_plugins" = "yes"]) ++AM_CONDITIONAL([ENABLE_BROWSER_PLUGINS], [test "x$enable_browser_plugins" = "xyes"]) + + # check for libxpcomglue_s + + LIBXPCOMGLUE_S= + +-if test "$enable_browser_plugins" = "yes"; then ++if test "x$enable_browser_plugins" = "xyes"; then + AC_LANG_PUSH([C++]) + __SAVE_CPPFLAGS=$CPPFLAGS + __SAVE_CXXFLAGS=$CXXFLAGS +@@ -765,7 +717,7 @@ + + # check for -fno-rtti flag + +-if test "$enable_browser_plugins" = "yes"; then ++if test "x$enable_browser_plugins" = "xyes"; then + AC_LANG_PUSH([C++]) + __SAVE_CXXFLAGS=$CXXFLAGS + CXXFLAGS="-fno-rtti $CXXFLAGS" +@@ -782,35 +734,9 @@ fi fi @@ -292,8 +356,12 @@ Index: configure.in - # check which plugins to enable - if test "$enable_browser_plugins" = "yes"; then -@@ -1097,7 +1028,7 @@ +-if test "$enable_browser_plugins" = "yes"; then ++if test "x$enable_browser_plugins" = "xyes"; then + + AC_MSG_CHECKING([whether to enable the basic browser plugin]) + AC_ARG_ENABLE([basic-plugin], +@@ -1097,7 +1023,7 @@ AC_MSG_NOTICE([ No Totem plugins enabled]) fi if test x$enable_browser_plugins = xyes ; then diff --git a/totem.spec b/totem.spec index 17d9fe0..567a381 100644 --- a/totem.spec +++ b/totem.spec @@ -61,7 +61,7 @@ BuildRequires: intltool autoconf automake libtool gettext check-devel Obsoletes: nautilus-media # http://bugzilla.gnome.org/show_bug.cgi?id=458324 -Patch0: totem-xul-2.patch +Patch0: totem-xul-3.patch %description Totem is simple movie player for the Gnome desktop. It features a