From 773d30e0e0bfce53cc1c8eeabf5a48f56a190ab9 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Thu, 17 Nov 2011 12:53:08 -0600 Subject: [PATCH] rebuild for libquvi.so.7 --- totem-pl-parser-glib-2.31.patch | 138 ++++++++++++++++++++++++++++++++ totem-pl-parser-quvi-0.4.patch | 38 +++++++++ totem-pl-parser.spec | 13 ++- 3 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 totem-pl-parser-glib-2.31.patch create mode 100644 totem-pl-parser-quvi-0.4.patch diff --git a/totem-pl-parser-glib-2.31.patch b/totem-pl-parser-glib-2.31.patch new file mode 100644 index 0000000..05f5614 --- /dev/null +++ b/totem-pl-parser-glib-2.31.patch @@ -0,0 +1,138 @@ +From c3701d43da1dcb3ce53e1d2cb3a0fb157c22df00 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Fri, 07 Oct 2011 19:08:58 +0000 +Subject: Adapt to API changes and deprecations in GLib 2.31 + +The threading api got renovated. + +https://bugzilla.gnome.org/show_bug.cgi?id=661219 +--- +diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c +index 0e99536..ea1e9c3 100644 +--- a/plparse/totem-pl-parser.c ++++ b/plparse/totem-pl-parser.c +@@ -256,7 +256,7 @@ static void totem_pl_parser_get_property (GObject *object, + struct TotemPlParserPrivate { + GList *ignore_schemes; + GList *ignore_mimetypes; +- GMutex *ignore_mutex; ++ GMutex ignore_mutex; + GThread *main_thread; /* see CALL_ASYNC() in *-private.h */ + + guint recurse : 1; +@@ -325,8 +325,6 @@ totem_pl_parser_class_init (TotemPlParserClass *klass) + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + totem_pl_parser_parent_class = g_type_class_peek_parent (klass); +- if (!g_thread_supported ()) +- g_thread_init (NULL); + + g_type_class_add_private (klass, sizeof (TotemPlParserPrivate)); + +@@ -1274,7 +1272,6 @@ static void + totem_pl_parser_init (TotemPlParser *parser) + { + parser->priv = G_TYPE_INSTANCE_GET_PRIVATE (parser, TOTEM_TYPE_PL_PARSER, TotemPlParserPrivate); +- parser->priv->ignore_mutex = g_mutex_new (); + parser->priv->main_thread = g_thread_self (); + } + +@@ -1292,7 +1289,7 @@ totem_pl_parser_finalize (GObject *object) + g_list_foreach (priv->ignore_mimetypes, (GFunc) g_free, NULL); + g_list_free (priv->ignore_mimetypes); + +- g_mutex_free (priv->ignore_mutex); ++ g_mutex_clear (&priv->ignore_mutex); + + G_OBJECT_CLASS (totem_pl_parser_parent_class)->finalize (object); + } +@@ -1523,22 +1520,22 @@ totem_pl_parser_scheme_is_ignored (TotemPlParser *parser, GFile *uri) + { + GList *l; + +- g_mutex_lock (parser->priv->ignore_mutex); ++ g_mutex_lock (&parser->priv->ignore_mutex); + + if (parser->priv->ignore_schemes == NULL) { +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + return FALSE; + } + + for (l = parser->priv->ignore_schemes; l != NULL; l = l->next) { + const char *scheme = l->data; + if (g_file_has_uri_scheme (uri, scheme) != FALSE) { +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + return TRUE; + } + } + +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + + return FALSE; + } +@@ -1549,10 +1546,10 @@ totem_pl_parser_mimetype_is_ignored (TotemPlParser *parser, + { + GList *l; + +- g_mutex_lock (parser->priv->ignore_mutex); ++ g_mutex_lock (&parser->priv->ignore_mutex); + + if (parser->priv->ignore_mimetypes == NULL) { +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + return FALSE; + } + +@@ -1560,12 +1557,12 @@ totem_pl_parser_mimetype_is_ignored (TotemPlParser *parser, + { + const char *item = l->data; + if (strcmp (mimetype, item) == 0) { +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + return TRUE; + } + } + +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + + return FALSE; + } +@@ -2191,7 +2188,7 @@ totem_pl_parser_add_ignored_scheme (TotemPlParser *parser, + + g_return_if_fail (TOTEM_IS_PL_PARSER (parser)); + +- g_mutex_lock (parser->priv->ignore_mutex); ++ g_mutex_lock (&parser->priv->ignore_mutex); + + s = g_strdup (scheme); + if (s[strlen (s) - 1] == ':') +@@ -2199,7 +2196,7 @@ totem_pl_parser_add_ignored_scheme (TotemPlParser *parser, + parser->priv->ignore_schemes = g_list_prepend + (parser->priv->ignore_schemes, s); + +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + } + + /** +@@ -2216,12 +2213,12 @@ totem_pl_parser_add_ignored_mimetype (TotemPlParser *parser, + { + g_return_if_fail (TOTEM_IS_PL_PARSER (parser)); + +- g_mutex_lock (parser->priv->ignore_mutex); ++ g_mutex_lock (&parser->priv->ignore_mutex); + + parser->priv->ignore_mimetypes = g_list_prepend + (parser->priv->ignore_mimetypes, g_strdup (mimetype)); + +- g_mutex_unlock (parser->priv->ignore_mutex); ++ g_mutex_unlock (&parser->priv->ignore_mutex); + } + + /** +-- +cgit v0.9.0.2 diff --git a/totem-pl-parser-quvi-0.4.patch b/totem-pl-parser-quvi-0.4.patch new file mode 100644 index 0000000..4f98aa2 --- /dev/null +++ b/totem-pl-parser-quvi-0.4.patch @@ -0,0 +1,38 @@ +From 4e15c57a438ee900f6ce601810a59a316b039fa1 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 21 Oct 2011 15:36:26 +0000 +Subject: lib: Require quvi 0.4.0 + +And adapt API usage. + +Original patch by Marien Zwart in: +https://bugs.gentoo.org/show_bug.cgi?id=386651 + +https://bugzilla.gnome.org/show_bug.cgi?id=661451 +--- +diff --git a/plparse/totem-pl-parser-videosite.c b/plparse/totem-pl-parser-videosite.c +index 9706d5a..b1645d6 100644 +--- a/plparse/totem-pl-parser-videosite.c ++++ b/plparse/totem-pl-parser-videosite.c +@@ -75,7 +75,7 @@ totem_pl_parser_add_videosite (TotemPlParser *parser, + #ifdef HAVE_QUVI + QUVIcode rc; + quvi_t handle; +- quvi_video_t v; ++ quvi_media_t v; + char *uri; + /* properties */ + const char *video_uri; +@@ -104,8 +104,8 @@ totem_pl_parser_add_videosite (TotemPlParser *parser, + return TOTEM_PL_PARSER_RESULT_ERROR; + } + +- getprop (QUVIPROP_VIDEOURL, video_uri); +- if (quvi_getprop (v, QUVIPROP_VIDEOFILELENGTH, &length) == QUVI_OK) ++ getprop (QUVIPROP_MEDIAURL, video_uri); ++ if (quvi_getprop (v, QUVIPROP_MEDIACONTENTLENGTH, &length) == QUVI_OK) + length_str = g_strdup_printf ("%f", length); + else + length_str = NULL; +-- +cgit v0.9.0.2 diff --git a/totem-pl-parser.spec b/totem-pl-parser.spec index c256810..59eba9d 100644 --- a/totem-pl-parser.spec +++ b/totem-pl-parser.spec @@ -1,6 +1,6 @@ Name: totem-pl-parser Version: 2.32.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Totem Playlist Parser library Group: System Environment/Libraries @@ -9,13 +9,16 @@ Url: http://www.gnome.org/projects/totem/ Source0: http://download.gnome.org/sources/%{name}/2.31/%{name}-%{version}.tar.bz2 Obsoletes: totem-plparser +Patch0: totem-pl-parser-quvi-0.4.patch +Patch1: totem-pl-parser-glib-2.31.patch + BuildRequires: glib2-devel BuildRequires: gmime-devel BuildRequires: libxml2-devel BuildRequires: libsoup-devel BuildRequires: gobject-introspection-devel BuildRequires: gettext -BuildRequires: quvi-devel +BuildRequires: libquvi-devel BuildRequires: libarchive-devel BuildRequires: perl(XML::Parser) intltool @@ -38,6 +41,8 @@ developing applications that use %{name}. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build %configure --enable-static=no @@ -68,6 +73,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_datadir}/gir-1.0/*.gir %changelog +* Thu Nov 17 2011 Daniel Drake 2.32.6-3 +- Add upstream compile fix for libquvi.so.7 (and rebuild for this version) +- Add upstream compile fix for glib-2.31 + * Wed Nov 16 2011 Peter Robinson 2.32.6-2 - Rebuild for new libarchive and quvi