rpms/rhythmbox/devel 0001-Use-C-only-for-the-browser-plugin.patch, NONE, 1.1 rhythmbox.spec, 1.265, 1.266
Bastien Nocera
hadess at fedoraproject.org
Mon Sep 28 17:50:51 UTC 2009
- Previous message (by thread): comps comps-f12.xml.in,1.131,1.132 comps-f13.xml.in,1.21,1.22
- Next message (by thread): rpms/plplot/devel .cvsignore, 1.17, 1.18 plplot.spec, 1.87, 1.88 sources, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: hadess
Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27872
Modified Files:
rhythmbox.spec
Added Files:
0001-Use-C-only-for-the-browser-plugin.patch
Log Message:
* Mon Sep 28 2009 Bastien Nocera <bnocera at redhat.com> 0.12.5-3
- Fix the symbols for the browser plugin being mangled (#525826)
0001-Use-C-only-for-the-browser-plugin.patch:
b/configure.ac | 1
b/podcast/Makefile.am | 4
b/podcast/rhythmbox-itms-plugin.c | 215 ++++++++++++++++++++++++++++++++++++++
podcast/rhythmbox-itms-plugin.cpp | 215 --------------------------------------
4 files changed, 217 insertions(+), 218 deletions(-)
--- NEW FILE 0001-Use-C-only-for-the-browser-plugin.patch ---
>From 3e162c21ccf892a02a81f5b737862d0eb82c2b15 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Mon, 28 Sep 2009 18:46:12 +0100
Subject: [PATCH] Use C-only for the browser plugin
Because C++ sucks, and mangles our nice symbol names, which
means the browsers can't find them.
I'm not debugging C++ linkers.
---
configure.ac | 1 -
podcast/Makefile.am | 4 +-
podcast/rhythmbox-itms-plugin.c | 215 +++++++++++++++++++++++++++++++++++++
podcast/rhythmbox-itms-plugin.cpp | 214 ------------------------------------
4 files changed, 217 insertions(+), 217 deletions(-)
create mode 100644 podcast/rhythmbox-itms-plugin.c
delete mode 100644 podcast/rhythmbox-itms-plugin.cpp
diff --git a/configure.ac b/configure.ac
index e92aa3a..db6ed1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,6 @@ IT_PROG_INTLTOOL([0.35.0])
AC_ISC_POSIX
AC_PROG_CC
-AC_PROG_CXX
AC_STDC_HEADERS
AM_PROG_LIBTOOL
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
diff --git a/podcast/Makefile.am b/podcast/Makefile.am
index f944c58..2c0801a 100644
--- a/podcast/Makefile.am
+++ b/podcast/Makefile.am
@@ -41,13 +41,13 @@ AM_CFLAGS = \
librbpodcast_la_LDFLAGS = -export-dynamic
-PLUGIN_FILES = rhythmbox-itms-plugin.cpp npapi.h npupp.h npruntime.h
+PLUGIN_FILES = rhythmbox-itms-plugin.c npapi.h npupp.h npruntime.h
if ENABLE_BROWSER_PLUGIN
plugindir = $(MOZILLA_PLUGINDIR)
plugin_LTLIBRARIES = librhythmbox-itms-detection-plugin.la
librhythmbox_itms_detection_plugin_la_SOURCES = $(PLUGIN_FILES)
-librhythmbox_itms_detection_plugin_la_CXXFLAGS = -I$(top_srcdir)/podcast
+librhythmbox_itms_detection_plugin_la_CFLAGS = -I$(top_srcdir)/podcast
librhythmbox_itms_detection_plugin_la_LDFLAGS = \
-avoid-version \
diff --git a/podcast/rhythmbox-itms-plugin.c b/podcast/rhythmbox-itms-plugin.c
new file mode 100644
index 0000000..a4be72a
--- /dev/null
+++ b/podcast/rhythmbox-itms-plugin.c
@@ -0,0 +1,215 @@
+/*
+ * Copyright © 2007 Bastien Nocera <hadess at hadess.net>
+ * Copyright © 2005 Jorn Baayen <jbaayen at gnome.org>
+ * Copyright © 2005 Christian Persch
+ *
+ * Based on the work of:
+ *
+ * Copyright © 2004 Bastien Nocera <hadess at hadess.net>
+ * Copyright © 2002 David A. Schleef <ds at schleef.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#define bool int
+#include <string.h>
+#include <npupp.h>
+
+static NPNetscapeFuncs mozilla_functions;
+
+static NPError
+plugin_new_instance (NPMIMEType mime_type,
+ NPP instance,
+ uint16 mode,
+ int16 argc,
+ char **argn,
+ char **argv,
+ NPSavedData *saved)
+{
+ return NPERR_INVALID_INSTANCE_ERROR;
+}
+
+static NPError
+plugin_destroy_instance (NPP instance,
+ NPSavedData **save)
+{
+ return NPERR_NO_ERROR;
+}
+
+static NPError
+plugin_new_stream (NPP instance,
+ NPMIMEType type,
+ NPStream *stream_ptr,
+ NPBool seekable,
+ uint16 *stype)
+{
+ return NPERR_INVALID_PARAM;
+}
+
+static NPError
+plugin_stream_as_file (NPP instance,
+ NPStream* stream,
+ const char *filename)
+{
+ return NPERR_INVALID_PARAM;
+}
+
+static NPError
+plugin_destroy_stream (NPP instance,
+ NPStream *stream,
+ NPError reason)
+{
+ return NPERR_NO_ERROR;
+}
+
+static int32
+plugin_write_ready (NPP instance,
+ NPStream *stream)
+{
+ return 0;
+}
+
+static int32
+plugin_write (NPP instance,
+ NPStream *stream,
+ int32 offset,
+ int32 len,
+ void *buffer)
+{
+ return -1;
+}
+
+static NPError
+plugin_get_value (NPP instance,
+ NPPVariable variable,
+ void *value)
+{
+ NPError err = NPERR_NO_ERROR;
+
+ switch (variable) {
+ case NPPVpluginNameString:
+ *((char **) value) = "iTunes Application Detector";
+ break;
+
+ case NPPVpluginDescriptionString:
+ *((char **) value) = "This plug-in detects the presence of iTunes when opening iTunes Store URLs in a web page with Firefox.";
+ break;
+
+ case NPPVpluginNeedsXEmbed:
+ *((NPBool *) value) = FALSE;
+ break;
+
+ default:
+ err = NPERR_INVALID_PARAM;
+ break;
+ }
+
+ return err;
+}
+
+NPError
+NP_GetValue (void *future,
+ NPPVariable variable,
+ void *value)
+{
+ return plugin_get_value (NULL, variable, value);
+}
+
+char *
+NP_GetMIMEDescription (void)
+{
+ return "application/itunes-plugin::;";
+}
+
+NPError
+NP_Initialize (NPNetscapeFuncs *moz_funcs,
+ NPPluginFuncs *plugin_funcs)
+{
+ if (moz_funcs == NULL || plugin_funcs == NULL)
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ if ((moz_funcs->version >> 8) > NP_VERSION_MAJOR)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+ if (moz_funcs->size < sizeof (NPNetscapeFuncs))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+ if (plugin_funcs->size < sizeof (NPPluginFuncs))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ /*
+ * Copy all of the fields of the Mozilla function table into our
+ * copy so we can call back into Mozilla later. Note that we need
+ * to copy the fields one by one, rather than assigning the whole
+ * structure, because the Mozilla function table could actually be
+ * bigger than what we expect.
+ */
+ mozilla_functions.size = moz_funcs->size;
+ mozilla_functions.version = moz_funcs->version;
+ mozilla_functions.geturl = moz_funcs->geturl;
+ mozilla_functions.posturl = moz_funcs->posturl;
+ mozilla_functions.requestread = moz_funcs->requestread;
+ mozilla_functions.newstream = moz_funcs->newstream;
+ mozilla_functions.write = moz_funcs->write;
+ mozilla_functions.destroystream = moz_funcs->destroystream;
+ mozilla_functions.status = moz_funcs->status;
+ mozilla_functions.uagent = moz_funcs->uagent;
+ mozilla_functions.memalloc = moz_funcs->memalloc;
+ mozilla_functions.memfree = moz_funcs->memfree;
+ mozilla_functions.memflush = moz_funcs->memflush;
+ mozilla_functions.reloadplugins = moz_funcs->reloadplugins;
+ mozilla_functions.getJavaEnv = moz_funcs->getJavaEnv;
+ mozilla_functions.getJavaPeer = moz_funcs->getJavaPeer;
+ mozilla_functions.geturlnotify = moz_funcs->geturlnotify;
+ mozilla_functions.posturlnotify = moz_funcs->posturlnotify;
+ mozilla_functions.getvalue = moz_funcs->getvalue;
+ mozilla_functions.setvalue = moz_funcs->setvalue;
+ mozilla_functions.invalidaterect = moz_funcs->invalidaterect;
+ mozilla_functions.invalidateregion = moz_funcs->invalidateregion;
+ mozilla_functions.forceredraw = moz_funcs->forceredraw;
+ mozilla_functions.geturl = moz_funcs->geturl;
+
+ /*
+ * Set up a plugin function table that Mozilla will use to call
+ * into us. Mozilla needs to know about our version and size and
+ * have a UniversalProcPointer for every function we implement.
+ */
+
+ plugin_funcs->size = sizeof (NPPluginFuncs);
+ plugin_funcs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
+ plugin_funcs->newp = NewNPP_NewProc (plugin_new_instance);
+ plugin_funcs->destroy = NewNPP_DestroyProc (plugin_destroy_instance);
+ plugin_funcs->setwindow = NewNPP_SetWindowProc (NULL);
+ plugin_funcs->newstream = NewNPP_NewStreamProc (plugin_new_stream);
+ plugin_funcs->destroystream = NewNPP_DestroyStreamProc (plugin_destroy_stream);
+ plugin_funcs->asfile = NewNPP_StreamAsFileProc (plugin_stream_as_file);
+ plugin_funcs->writeready = NewNPP_WriteReadyProc (plugin_write_ready);
+ plugin_funcs->write = NewNPP_WriteProc (plugin_write);
+ plugin_funcs->print = NewNPP_PrintProc (NULL);
+ plugin_funcs->event = NewNPP_HandleEventProc (NULL);
+ plugin_funcs->urlnotify = NewNPP_URLNotifyProc (NULL);
+ plugin_funcs->javaClass = NULL;
+ plugin_funcs->getvalue = NewNPP_GetValueProc (plugin_get_value);
+ plugin_funcs->setvalue = NewNPP_SetValueProc (NULL);
+
+ return NPERR_NO_ERROR;
+}
+
+NPError
+NP_Shutdown (void)
+{
+ return NPERR_NO_ERROR;
+}
diff --git a/podcast/rhythmbox-itms-plugin.cpp b/podcast/rhythmbox-itms-plugin.cpp
deleted file mode 100644
index fbe0de1..0000000
--- a/podcast/rhythmbox-itms-plugin.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright © 2007 Bastien Nocera <hadess at hadess.net>
- * Copyright © 2005 Jorn Baayen <jbaayen at gnome.org>
- * Copyright © 2005 Christian Persch
- *
- * Based on the work of:
- *
- * Copyright © 2004 Bastien Nocera <hadess at hadess.net>
- * Copyright © 2002 David A. Schleef <ds at schleef.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#include <string.h>
-#include <npupp.h>
-
-static NPNetscapeFuncs mozilla_functions;
-
-static NPError
-plugin_new_instance (NPMIMEType mime_type,
- NPP instance,
- uint16 mode,
- int16 argc,
- char **argn,
- char **argv,
- NPSavedData *saved)
-{
- return NPERR_INVALID_INSTANCE_ERROR;
-}
-
-static NPError
-plugin_destroy_instance (NPP instance,
- NPSavedData **save)
-{
- return NPERR_NO_ERROR;
-}
-
-static NPError
-plugin_new_stream (NPP instance,
- NPMIMEType type,
- NPStream *stream_ptr,
- NPBool seekable,
- uint16 *stype)
-{
- return NPERR_INVALID_PARAM;
-}
-
-static NPError
-plugin_stream_as_file (NPP instance,
- NPStream* stream,
- const char *filename)
-{
- return NPERR_INVALID_PARAM;
-}
-
-static NPError
-plugin_destroy_stream (NPP instance,
- NPStream *stream,
- NPError reason)
-{
- return NPERR_NO_ERROR;
-}
-
-static int32
-plugin_write_ready (NPP instance,
- NPStream *stream)
-{
- return 0;
-}
-
-static int32
-plugin_write (NPP instance,
- NPStream *stream,
- int32 offset,
- int32 len,
- void *buffer)
-{
- return -1;
-}
-
-static NPError
-plugin_get_value (NPP instance,
- NPPVariable variable,
- void *value)
-{
- NPError err = NPERR_NO_ERROR;
-
- switch (variable) {
- case NPPVpluginNameString:
- *((char **) value) = "iTunes Application Detector";
- break;
-
- case NPPVpluginDescriptionString:
- *((char **) value) = "This plug-in detects the presence of iTunes when opening iTunes Store URLs in a web page with Firefox.";
- break;
-
- case NPPVpluginNeedsXEmbed:
- *((NPBool *) value) = FALSE;
- break;
-
- default:
- err = NPERR_INVALID_PARAM;
- break;
- }
-
- return err;
-}
-
-NPError
-NP_GetValue (void *future,
- NPPVariable variable,
- void *value)
-{
- return plugin_get_value (NULL, variable, value);
-}
-
-char *
-NP_GetMIMEDescription (void)
-{
- return "application/itunes-plugin::;";
-}
-
-NPError
-NP_Initialize (NPNetscapeFuncs *moz_funcs,
- NPPluginFuncs *plugin_funcs)
-{
- if (moz_funcs == NULL || plugin_funcs == NULL)
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- if ((moz_funcs->version >> 8) > NP_VERSION_MAJOR)
- return NPERR_INCOMPATIBLE_VERSION_ERROR;
- if (moz_funcs->size < sizeof (NPNetscapeFuncs))
- return NPERR_INVALID_FUNCTABLE_ERROR;
- if (plugin_funcs->size < sizeof (NPPluginFuncs))
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- /*
- * Copy all of the fields of the Mozilla function table into our
- * copy so we can call back into Mozilla later. Note that we need
- * to copy the fields one by one, rather than assigning the whole
- * structure, because the Mozilla function table could actually be
- * bigger than what we expect.
- */
- mozilla_functions.size = moz_funcs->size;
- mozilla_functions.version = moz_funcs->version;
- mozilla_functions.geturl = moz_funcs->geturl;
- mozilla_functions.posturl = moz_funcs->posturl;
- mozilla_functions.requestread = moz_funcs->requestread;
- mozilla_functions.newstream = moz_funcs->newstream;
- mozilla_functions.write = moz_funcs->write;
- mozilla_functions.destroystream = moz_funcs->destroystream;
- mozilla_functions.status = moz_funcs->status;
- mozilla_functions.uagent = moz_funcs->uagent;
- mozilla_functions.memalloc = moz_funcs->memalloc;
- mozilla_functions.memfree = moz_funcs->memfree;
- mozilla_functions.memflush = moz_funcs->memflush;
- mozilla_functions.reloadplugins = moz_funcs->reloadplugins;
- mozilla_functions.getJavaEnv = moz_funcs->getJavaEnv;
- mozilla_functions.getJavaPeer = moz_funcs->getJavaPeer;
- mozilla_functions.geturlnotify = moz_funcs->geturlnotify;
- mozilla_functions.posturlnotify = moz_funcs->posturlnotify;
- mozilla_functions.getvalue = moz_funcs->getvalue;
- mozilla_functions.setvalue = moz_funcs->setvalue;
- mozilla_functions.invalidaterect = moz_funcs->invalidaterect;
- mozilla_functions.invalidateregion = moz_funcs->invalidateregion;
- mozilla_functions.forceredraw = moz_funcs->forceredraw;
- mozilla_functions.geturl = moz_funcs->geturl;
-
- /*
- * Set up a plugin function table that Mozilla will use to call
- * into us. Mozilla needs to know about our version and size and
- * have a UniversalProcPointer for every function we implement.
- */
-
- plugin_funcs->size = sizeof (NPPluginFuncs);
- plugin_funcs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
- plugin_funcs->newp = NewNPP_NewProc (plugin_new_instance);
- plugin_funcs->destroy = NewNPP_DestroyProc (plugin_destroy_instance);
- plugin_funcs->setwindow = NewNPP_SetWindowProc (NULL);
- plugin_funcs->newstream = NewNPP_NewStreamProc (plugin_new_stream);
- plugin_funcs->destroystream = NewNPP_DestroyStreamProc (plugin_destroy_stream);
- plugin_funcs->asfile = NewNPP_StreamAsFileProc (plugin_stream_as_file);
- plugin_funcs->writeready = NewNPP_WriteReadyProc (plugin_write_ready);
- plugin_funcs->write = NewNPP_WriteProc (plugin_write);
- plugin_funcs->print = NewNPP_PrintProc (NULL);
- plugin_funcs->event = NewNPP_HandleEventProc (NULL);
- plugin_funcs->urlnotify = NewNPP_URLNotifyProc (NULL);
- plugin_funcs->javaClass = NULL;
- plugin_funcs->getvalue = NewNPP_GetValueProc (plugin_get_value);
- plugin_funcs->setvalue = NewNPP_SetValueProc (NULL);
-
- return NPERR_NO_ERROR;
-}
-
-NPError
-NP_Shutdown (void)
-{
- return NPERR_NO_ERROR;
-}
--
1.6.4.4
Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -p -r1.265 -r1.266
--- rhythmbox.spec 28 Sep 2009 14:46:19 -0000 1.265
+++ rhythmbox.spec 28 Sep 2009 17:50:51 -0000 1.266
@@ -3,7 +3,7 @@
Name: rhythmbox
Summary: Music Management Application
Version: 0.12.5
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ with exceptions and GFDL
Group: Applications/Multimedia
URL: http://projects.gnome.org/rhythmbox/
@@ -45,10 +45,14 @@ BuildRequires: gstreamer-python-devel
BuildRequires: libgudev-devel
BuildRequires: perl(XML::Parser) intltool
+
ExcludeArch: s390 s390x
# https://bugzilla.gnome.org/show_bug.cgi?id=596573
Patch0: rhythmbox-0.12.5-use-gnome-session-to-inhibit.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=525826
+BuildRequires: automake autoconf
+Patch1: 0001-Use-C-only-for-the-browser-plugin.patch
%description
Rhythmbox is an integrated music management application based on the powerful
@@ -83,6 +87,9 @@ from, and sending media to UPnP/DLNA net
%setup -q
%patch0 -p1 -b .inhibit-gnome-session
+%patch1 -p1 -b .itms
+autoreconf -i
+
# Use the installed louie, not the one in Coherence
find plugins/coherence/upnp_coherence/ -type f -exec sed -i 's/coherence.extern.louie as louie/louie/' '{}' ';'
@@ -212,6 +219,9 @@ fi
%{_libdir}/rhythmbox/plugins/upnp_coherence
%changelog
+* Mon Sep 28 2009 Bastien Nocera <bnocera at redhat.com> 0.12.5-3
+- Fix the symbols for the browser plugin being mangled (#525826)
+
* Mon Sep 28 2009 Richard Hughes <rhughes at redhat.com> - 0.12.5-2
- Apply a patch from upstream to inhibit gnome-session, rather than
gnome-power-manager. This fixes a warning on rawhide.
- Previous message (by thread): comps comps-f12.xml.in,1.131,1.132 comps-f13.xml.in,1.21,1.22
- Next message (by thread): rpms/plplot/devel .cvsignore, 1.17, 1.18 plplot.spec, 1.87, 1.88 sources, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list