From b6fc19e51a333c2a69cc40fcd5f24998b87dbc83f71dcb8e7bc384ebcf070188 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 25 Mar 2013 19:40:38 +0000 Subject: [PATCH] Accepting request 160805 from GNOME:Apps with slow translations (forwarded request 160803 from Zaitor) OBS-URL: https://build.opensuse.org/request/show/160805 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pidgin?expand=0&rev=97 --- pidgin-gstreamer1.patch | 330 ++++++++++++++++++++++++++++++++++++++++ pidgin.changes | 8 + pidgin.spec | 11 +- 3 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 pidgin-gstreamer1.patch diff --git a/pidgin-gstreamer1.patch b/pidgin-gstreamer1.patch new file mode 100644 index 0000000..9235a9f --- /dev/null +++ b/pidgin-gstreamer1.patch @@ -0,0 +1,330 @@ +Index: pidgin-2.10.7/libpurple/media/backend-fs2.c +=================================================================== +--- pidgin-2.10.7.orig/libpurple/media/backend-fs2.c ++++ pidgin-2.10.7/libpurple/media/backend-fs2.c +@@ -189,8 +189,13 @@ event_probe_cb(GstPad *srcpad, GstEvent + + gst_pad_unlink(srcpad, gst_pad_get_peer(srcpad)); + ++#if GST_CHECK_VERSION(1,0,0) ++ gst_pad_remove_probe(srcpad, ++ g_value_get_ulong(gst_structure_get_value(s, "handler-id"))); ++#else + gst_pad_remove_event_probe(srcpad, + g_value_get_uint(gst_structure_get_value(s, "handler-id"))); ++#endif + + if (g_value_get_boolean(gst_structure_get_value(s, "release-pad"))) + gst_element_release_request_pad(GST_ELEMENT_PARENT(srcpad), srcpad); +@@ -204,7 +209,12 @@ event_probe_cb(GstPad *srcpad, GstEvent + static void + unlink_teepad_dynamic(GstPad *srcpad, gboolean release_pad) + { ++#if GST_CHECK_VERSION(1,0,0) ++ gulong id = gst_pad_add_probe(srcpad, GST_PAD_PROBE_TYPE_EVENT_BOTH, ++ G_CALLBACK(event_probe_cb), NULL, NULL); ++#else + guint id = gst_pad_add_event_probe(srcpad, G_CALLBACK(event_probe_cb), NULL); ++#endif + + if (GST_IS_GHOST_PAD(srcpad)) + srcpad = gst_ghost_pad_get_target(GST_GHOST_PAD(srcpad)); +@@ -213,7 +223,11 @@ unlink_teepad_dynamic(GstPad *srcpad, gb + gst_event_new_custom(GST_EVENT_CUSTOM_DOWNSTREAM, + gst_structure_new("purple-unlink-tee", + "release-pad", G_TYPE_BOOLEAN, release_pad, ++#if GST_CHECK_VERSION(1,0,0) ++ "handler-id", G_TYPE_ULONG, id, ++#else + "handler-id", G_TYPE_UINT, id, ++#endif + NULL))); + } + +@@ -808,12 +822,15 @@ gst_handle_message_element(GstBus *bus, + PurpleMediaBackendFs2Private *priv = + PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(self); + GstElement *src = GST_ELEMENT(GST_MESSAGE_SRC(msg)); ++ GstStructure *gst_struct; + static guint level_id = 0; + + if (level_id == 0) + level_id = g_signal_lookup("level", PURPLE_TYPE_MEDIA); + +- if (gst_structure_has_name(msg->structure, "level")) { ++ gst_struct = gst_message_get_structure(msg); ++ ++ if (gst_structure_has_name(gst_struct, "level")) { + GstElement *src = GST_ELEMENT(GST_MESSAGE_SRC(msg)); + gchar *name; + gchar *participant = NULL; +@@ -868,12 +885,12 @@ gst_handle_message_element(GstBus *bus, + return; + + #ifdef HAVE_FARSIGHT +- if (gst_structure_has_name(msg->structure, "farsight-error")) { ++ if (gst_structure_has_name(gst_struct, "farsight-error")) { + #else +- if (gst_structure_has_name(msg->structure, "farstream-error")) { ++ if (gst_structure_has_name(gst_struct, "farstream-error")) { + #endif + FsError error_no; +- gst_structure_get_enum(msg->structure, "error-no", ++ gst_structure_get_enum(gst_struct, "error-no", + FS_TYPE_ERROR, (gint*)&error_no); + switch (error_no) { + case FS_ERROR_NO_CODECS: +@@ -910,7 +927,7 @@ gst_handle_message_element(GstBus *bus, + #endif + error_no, + gst_structure_get_string( +- msg->structure, "error-msg")); ++ gst_struct, "error-msg")); + break; + } + +@@ -924,7 +941,7 @@ gst_handle_message_element(GstBus *bus, + #endif + purple_media_end(priv->media, NULL, NULL); + } +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-new-local-candidate")) { + #else +@@ -939,9 +956,9 @@ gst_handle_message_element(GstBus *bus, + PurpleMediaBackendFs2Stream *media_stream; + gchar *name; + +- value = gst_structure_get_value(msg->structure, "stream"); ++ value = gst_structure_get_value(gst_struct, "stream"); + stream = g_value_get_object(value); +- value = gst_structure_get_value(msg->structure, "candidate"); ++ value = gst_structure_get_value(gst_struct, "candidate"); + local_candidate = g_value_get_boxed(value); + + session = get_session_from_fs_stream(self, stream); +@@ -963,7 +980,7 @@ gst_handle_message_element(GstBus *bus, + g_signal_emit_by_name(self, "new-candidate", + session->id, name, candidate); + g_object_unref(candidate); +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-local-candidates-prepared")) { + #else +@@ -975,7 +992,7 @@ gst_handle_message_element(GstBus *bus, + PurpleMediaBackendFs2Session *session; + gchar *name; + +- value = gst_structure_get_value(msg->structure, "stream"); ++ value = gst_structure_get_value(gst_struct, "stream"); + stream = g_value_get_object(value); + session = get_session_from_fs_stream(self, stream); + +@@ -985,7 +1002,7 @@ gst_handle_message_element(GstBus *bus, + + g_signal_emit_by_name(self, "candidates-prepared", + session->id, name); +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-new-active-candidate-pair")) { + #else +@@ -1000,12 +1017,12 @@ gst_handle_message_element(GstBus *bus, + PurpleMediaCandidate *lcandidate, *rcandidate; + gchar *name; + +- value = gst_structure_get_value(msg->structure, "stream"); ++ value = gst_structure_get_value(gst_struct, "stream"); + stream = g_value_get_object(value); +- value = gst_structure_get_value(msg->structure, ++ value = gst_structure_get_value(gst_struct, + "local-candidate"); + local_candidate = g_value_get_boxed(value); +- value = gst_structure_get_value(msg->structure, ++ value = gst_structure_get_value(gst_struct, + "remote-candidate"); + remote_candidate = g_value_get_boxed(value); + +@@ -1023,7 +1040,7 @@ gst_handle_message_element(GstBus *bus, + + g_object_unref(lcandidate); + g_object_unref(rcandidate); +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-recv-codecs-changed")) { + #else +@@ -1033,7 +1050,7 @@ gst_handle_message_element(GstBus *bus, + GList *codecs; + FsCodec *codec; + +- value = gst_structure_get_value(msg->structure, "codecs"); ++ value = gst_structure_get_value(gst_struct, "codecs"); + codecs = g_value_get_boxed(value); + codec = codecs->data; + +@@ -1044,7 +1061,7 @@ gst_handle_message_element(GstBus *bus, + "farstream-recv-codecs-changed: %s\n", + #endif + codec->encoding_name); +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-component-state-changed")) { + #else +@@ -1055,9 +1072,9 @@ gst_handle_message_element(GstBus *bus, + guint component; + const gchar *state; + +- value = gst_structure_get_value(msg->structure, "state"); ++ value = gst_structure_get_value(gst_struct, "state"); + fsstate = g_value_get_enum(value); +- value = gst_structure_get_value(msg->structure, "component"); ++ value = gst_structure_get_value(gst_struct, "component"); + component = g_value_get_uint(value); + + switch (fsstate) { +@@ -1092,7 +1109,7 @@ gst_handle_message_element(GstBus *bus, + #endif + "component: %u state: %s\n", + component, state); +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-send-codec-changed")) { + #else +@@ -1102,7 +1119,7 @@ gst_handle_message_element(GstBus *bus, + FsCodec *codec; + gchar *codec_str; + +- value = gst_structure_get_value(msg->structure, "codec"); ++ value = gst_structure_get_value(gst_struct, "codec"); + codec = g_value_get_boxed(value); + codec_str = fs_codec_to_string(codec); + +@@ -1115,7 +1132,7 @@ gst_handle_message_element(GstBus *bus, + codec_str); + + g_free(codec_str); +- } else if (gst_structure_has_name(msg->structure, ++ } else if (gst_structure_has_name(gst_struct, + #ifdef HAVE_FARSIGHT + "farsight-codecs-changed")) { + #else +@@ -1125,7 +1142,7 @@ gst_handle_message_element(GstBus *bus, + FsSession *fssession; + GList *sessions; + +- value = gst_structure_get_value(msg->structure, "session"); ++ value = gst_structure_get_value(gst_struct, "session"); + fssession = g_value_get_object(value); + sessions = g_hash_table_get_values(priv->sessions); + +Index: pidgin-2.10.7/libpurple/mediamanager.c +=================================================================== +--- pidgin-2.10.7.orig/libpurple/mediamanager.c ++++ pidgin-2.10.7/libpurple/mediamanager.c +@@ -44,7 +44,12 @@ + #else + #include + #endif ++ ++#if GST_CHECK_VERSION(1,0,0) ++#include ++#else + #include ++#endif + + /** @copydoc _PurpleMediaManagerPrivate */ + typedef struct _PurpleMediaManagerPrivate PurpleMediaManagerPrivate; +@@ -270,8 +275,13 @@ purple_media_manager_get_pipeline(Purple + gst_bus_add_signal_watch(GST_BUS(bus)); + g_signal_connect(G_OBJECT(bus), "message", + G_CALLBACK(pipeline_bus_call), manager); ++#if GST_CHECK_VERSION(1,0,0) ++ gst_bus_set_sync_handler(bus, ++ gst_bus_sync_signal_handler, NULL, NULL); ++#else + gst_bus_set_sync_handler(bus, + gst_bus_sync_signal_handler, NULL); ++#endif + gst_object_unref(bus); + + filename = g_build_filename(purple_user_dir(), +@@ -727,7 +737,7 @@ window_id_cb(GstBus *bus, GstMessage *ms + GstElement *sink; + + if (GST_MESSAGE_TYPE(msg) != GST_MESSAGE_ELEMENT || +- !gst_structure_has_name(msg->structure, ++ !gst_structure_has_name(gst_message_get_structure(msg), + "prepare-xwindow-id")) + return; + +@@ -742,8 +752,13 @@ window_id_cb(GstBus *bus, GstMessage *ms + | G_SIGNAL_MATCH_DATA, 0, 0, NULL, + window_id_cb, ow); + ++#if GST_CHECK_VERSION(1,0,0) ++ gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(GST_MESSAGE_SRC(msg)), ++ ow->window_id); ++#else + gst_x_overlay_set_xwindow_id(GST_X_OVERLAY( + GST_MESSAGE_SRC(msg)), ow->window_id); ++#endif + } + #endif + +Index: pidgin-2.10.7/configure.ac +=================================================================== +--- pidgin-2.10.7.orig/configure.ac ++++ pidgin-2.10.7/configure.ac +@@ -740,17 +740,17 @@ dnl #################################### + dnl # Check for GStreamer + dnl ####################################################################### + dnl +-dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of ++dnl TODO: Depend on gstreamer >= 1.0.0, and remove the conditional use of + dnl gst_registry_fork_set_enabled. + AC_ARG_ENABLE(gstreamer, + [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], + enable_gst="$enableval", enable_gst="yes") + if test "x$enable_gst" != "xno"; then +- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [ ++ PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [ + AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds]) + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) +- AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled, ++ AC_CHECK_LIB(gstreamer-1.0, gst_registry_fork_set_enabled, + [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [], + [Define if gst_registry_fork_set_enabled exists])], + [], [$GSTREAMER_LIBS]) +@@ -766,26 +766,6 @@ Use --disable-gstreamer if you do not ne + fi + + dnl ####################################################################### +-dnl # Check for GStreamer Interfaces +-dnl ####################################################################### +-if test "x$enable_gst" != "xno"; then +- AC_ARG_ENABLE(gstreamer-interfaces, +- [AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])], +- enable_gstinterfaces="$enableval", enable_gstinterfaces="yes") +- if test "x$enable_gstinterfaces" != "xno"; then +- PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [ +- AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support]) +- AC_SUBST(GSTINTERFACES_CFLAGS) +- AC_SUBST(GSTINTERFACES_LIBS) +- ], [ +- enable_gstinterfaces="no" +- ]) +- fi +-else +- enable_gstinterfaces="no" +-fi +- +-dnl ####################################################################### + dnl # Check for Farstream + dnl ####################################################################### + AC_ARG_ENABLE(farstream, diff --git a/pidgin.changes b/pidgin.changes index 91c0fff..e1598a6 100644 --- a/pidgin.changes +++ b/pidgin.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Mar 24 17:07:27 UTC 2013 - dimstar@opensuse.org + +- Add pidgin-gstreamer1.patch: Port to GStreamer 1.0. Only enabled + on openSUSE 13.1 and newer. +- On openSUSE 13.1 and newer, use gstreamer-devel and + gstreamer-plugins-base-devel BuildRequires. + ------------------------------------------------------------------- Sun Mar 10 13:57:49 UTC 2013 - dimstar@opensuse.org diff --git a/pidgin.spec b/pidgin.spec index 2f3a2c8..8996669 100644 --- a/pidgin.spec +++ b/pidgin.spec @@ -40,13 +40,14 @@ Patch1: pidgin-gnome-keyring.patch Patch3: pidgin-nonblock-common.patch Patch4: pidgin-nonblock-gwim.patch Patch5: pidgin-nonblock-common2.patch - # PATCH-FIX-UPSTREAM pidgin-mono-buildfix.patch http://developer.pidgin.im/ticket/12506 dimstar@opensuse.org -- Fix build with mono plugin loader; missing include statements. Patch14: pidgin-mono-buildfix.patch # PATCH-FIX-OPENSUSE pidgin-fix-perl-build.patch vuntz@opensuse.org -- Revert http://developer.pidgin.im/viewmtn/revision/info/f32151852a00fb5abd3fdccdd8df2419031666de as it breaks the build Patch15: pidgin-fix-perl-build.patch # PATCH-FIX-UPSTREAM pidgin-irc-sasl.patch https://developer.pidgin.im/ticket/15517 bnc#806975 dimstar@opensuse.org -- Link IRC module to sasl Patch16: pidgin-irc-sasl.patch +# PATCH-FEATURE-UPSTREAM pidgin-gstreamer1.patch https://developer.pidgin.im/ticket/15386 dimstar@opensuse.org -- Port to GStreamer 1.0 +Patch17: pidgin-gstreamer1.patch # Can use external libzephyr BuildRequires: cyrus-sasl-devel BuildRequires: dbus-1-devel @@ -125,6 +126,10 @@ BuildRequires: translation-update-upstream %endif BuildRequires: NetworkManager-devel BuildRequires: update-desktop-files +%if %suse_version > 1230 +BuildRequires: gstreamer-devel +BuildRequires: gstreamer-plugins-base-devel +%else %if %suse_version > 1030 BuildRequires: gstreamer-0_10-devel BuildRequires: gstreamer-0_10-plugins-base-devel @@ -132,6 +137,7 @@ BuildRequires: gstreamer-0_10-plugins-base-devel BuildRequires: gstreamer010-devel BuildRequires: gstreamer010-plugins-base-devel %endif +%endif %if %suse_version > 1020 BuildRequires: dbus-1-glib-devel BuildRequires: silc-toolkit-devel @@ -392,6 +398,9 @@ translation-update-upstream %patch14 -p1 %patch15 -p1 %patch16 -p1 +%if 0%{?suse_version} >= 1310 +%patch17 -p1 +%endif # Change Myanmar/Myanmar to Myanmar: rename my_MM my po/my_MM.*