From 1770b0c25d5900307c63914d5a25b6d2690e17cd Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 19 Feb 2014 09:48:25 +0100 Subject: [PATCH] Update to 0.2.9 --- .gitignore | 1 + ...rl_registry_add_config_from_resource.patch | 87 ----------- grilo-0.2.7-icon_grlsource.patch | 139 ------------------ grilo-0.2.7-split_keyfile_processing.patch | 96 ------------ grilo-0.2.7-vala_gio.patch | 21 --- grilo.spec | 16 +- sources | 2 +- 7 files changed, 7 insertions(+), 355 deletions(-) delete mode 100644 grilo-0.2.7-add_grl_registry_add_config_from_resource.patch delete mode 100644 grilo-0.2.7-icon_grlsource.patch delete mode 100644 grilo-0.2.7-split_keyfile_processing.patch delete mode 100644 grilo-0.2.7-vala_gio.patch diff --git a/.gitignore b/.gitignore index 4f1b62b..1d664da 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /grilo-0.2.5.tar.xz /grilo-0.2.6.tar.xz /grilo-0.2.7.tar.xz +/grilo-0.2.9.tar.xz diff --git a/grilo-0.2.7-add_grl_registry_add_config_from_resource.patch b/grilo-0.2.7-add_grl_registry_add_config_from_resource.patch deleted file mode 100644 index eac267e..0000000 --- a/grilo-0.2.7-add_grl_registry_add_config_from_resource.patch +++ /dev/null @@ -1,87 +0,0 @@ -From f58647687b15766c60c7d1f22134316c0a9ac874 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 16 Jan 2014 17:08:55 +0000 -Subject: core: Add grl_registry_add_config_from_resource() - -https://bugzilla.gnome.org/show_bug.cgi?id=722358 ---- -diff --git a/src/grl-registry.c b/src/grl-registry.c -index 58073ba..5a203ea 100644 ---- a/src/grl-registry.c -+++ b/src/grl-registry.c -@@ -1678,3 +1678,57 @@ grl_registry_add_config_from_file (GrlRegistry *registry, - return FALSE; - } - } -+ -+/** -+ * grl_registry_add_config_from_resource: -+ * @registry: the registry instance -+ * @config_file: a key-value file containing the configuration -+ * @error: error return location or @NULL to ignore -+ * -+ * Load plugin configurations from a .ini-like resource file. -+ * -+ * Returns: %TRUE on success -+ * -+ * Since: 0.2.0 -+ **/ -+gboolean -+grl_registry_add_config_from_resource (GrlRegistry *registry, -+ const gchar *resource_path, -+ GError **error) -+{ -+ GError *load_error = NULL; -+ GKeyFile *keyfile = NULL; -+ GBytes *bytes; -+ gboolean ret = FALSE; -+ -+ g_return_val_if_fail (GRL_IS_REGISTRY (registry), FALSE); -+ g_return_val_if_fail (resource_path, FALSE); -+ -+ bytes = g_resources_lookup_data (resource_path, 0, error); -+ if (bytes == NULL) -+ goto bail; -+ -+ keyfile = g_key_file_new (); -+ -+ if (g_key_file_load_from_data (keyfile, -+ g_bytes_get_data (bytes, NULL), -+ g_bytes_get_size (bytes), -+ G_KEY_FILE_NONE, -+ &load_error)) { -+ add_config_from_keyfile (keyfile, registry); -+ ret = TRUE; -+ } else { -+ GRL_WARNING ("Unable to load configuration. %s", load_error->message); -+ g_set_error_literal (error, -+ GRL_CORE_ERROR, -+ GRL_CORE_ERROR_CONFIG_LOAD_FAILED, -+ load_error->message); -+ g_error_free (load_error); -+ } -+ -+bail: -+ g_clear_pointer (&keyfile, g_key_file_free); -+ g_clear_pointer (&bytes, g_bytes_unref); -+ -+ return ret; -+} -diff --git a/src/grl-registry.h b/src/grl-registry.h -index db2e5cd..5a12335 100644 ---- a/src/grl-registry.h -+++ b/src/grl-registry.h -@@ -269,6 +269,10 @@ gboolean grl_registry_add_config_from_file (GrlRegistry *registry, - const gchar *config_file, - GError **error); - -+gboolean grl_registry_add_config_from_resource (GrlRegistry *registry, -+ const gchar *resource_path, -+ GError **error); -+ - G_END_DECLS - - #endif /* _GRL_REGISTRY_H_ */ --- -cgit v0.9.2 - diff --git a/grilo-0.2.7-icon_grlsource.patch b/grilo-0.2.7-icon_grlsource.patch deleted file mode 100644 index 83e872e..0000000 --- a/grilo-0.2.7-icon_grlsource.patch +++ /dev/null @@ -1,139 +0,0 @@ -From c8423dac910f41670754b0c18041854bcd64551d Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 19 Dec 2013 21:44:09 +0000 -Subject: core: Add Icon property to GrlSource - -https://bugzilla.gnome.org/show_bug.cgi?id=657926 - -Signed-off-by: Bastien Nocera -Signed-off-by: Juan A. Suarez Romero ---- -diff --git a/doc/grilo/grilo-sections.txt b/doc/grilo/grilo-sections.txt -index 7438fc7..b5cbe29 100644 ---- a/doc/grilo/grilo-sections.txt -+++ b/doc/grilo/grilo-sections.txt -@@ -76,6 +76,7 @@ grl_source_browse_sync - grl_source_get_auto_split_threshold - grl_source_get_caps - grl_source_get_description -+grl_source_get_icon - grl_source_get_id - grl_source_get_media_from_uri - grl_source_get_media_from_uri_sync -diff --git a/src/grl-source.c b/src/grl-source.c -index 60a1f4a..f85b565 100644 ---- a/src/grl-source.c -+++ b/src/grl-source.c -@@ -64,6 +64,7 @@ enum { - PROP_ID, - PROP_NAME, - PROP_DESC, -+ PROP_ICON, - PROP_PLUGIN, - PROP_RANK, - PROP_AUTO_SPLIT_THRESHOLD, -@@ -89,6 +90,7 @@ struct _GrlSourcePrivate { - GrlMediaType supported_media; - guint auto_split_threshold; - GrlPlugin *plugin; -+ GIcon *icon; - }; - - typedef struct { -@@ -321,6 +323,22 @@ grl_source_class_init (GrlSourceClass *source_class) - G_PARAM_CONSTRUCT | - G_PARAM_STATIC_STRINGS)); - /** -+ * GrlSource:source-icon: -+ * -+ * #GIcon representing the source -+ * -+ * Since: 0.2.0 -+ */ -+ g_object_class_install_property (gobject_class, -+ PROP_ICON, -+ g_param_spec_object ("source-icon", -+ "Source icon", -+ "Icon representing the source", -+ G_TYPE_ICON, -+ G_PARAM_READWRITE | -+ G_PARAM_CONSTRUCT | -+ G_PARAM_STATIC_STRINGS)); -+ /** - * GrlSource:plugin: - * - * Plugin the source belongs to -@@ -453,6 +471,7 @@ grl_source_finalize (GObject *object) - { - GrlSource *source = GRL_SOURCE (object); - -+ g_clear_object (&source->priv->icon); - g_free (source->priv->id); - g_free (source->priv->name); - g_free (source->priv->desc); -@@ -487,6 +506,10 @@ grl_source_set_property (GObject *object, - case PROP_DESC: - set_string_property (&source->priv->desc, value); - break; -+ case PROP_ICON: -+ g_clear_object (&source->priv->icon); -+ source->priv->icon = g_value_dup_object (value); -+ break; - case PROP_PLUGIN: - g_clear_object (&source->priv->plugin); - source->priv->plugin = g_value_dup_object (value); -@@ -526,6 +549,9 @@ grl_source_get_property (GObject *object, - case PROP_DESC: - g_value_set_string (value, source->priv->desc); - break; -+ case PROP_ICON: -+ g_value_set_object (value, source->priv->icon); -+ break; - case PROP_PLUGIN: - g_value_set_object (value, source->priv->plugin); - break; -@@ -2855,6 +2881,20 @@ grl_source_get_name (GrlSource *source) - } - - /** -+ * grl_source_get_icon: -+ * @source: a source -+ * -+ * Returns: (transfer none): a #GIcon -+ */ -+GIcon * -+grl_source_get_icon (GrlSource *source) -+{ -+ g_return_val_if_fail (GRL_IS_SOURCE (source), NULL); -+ -+ return source->priv->icon; -+} -+ -+/** - * grl_source_get_description: - * @source: a source - * -diff --git a/src/grl-source.h b/src/grl-source.h -index 621e2d2..c0f9141 100644 ---- a/src/grl-source.h -+++ b/src/grl-source.h -@@ -36,6 +36,7 @@ - - #include - #include -+#include - - /* Macros */ - -@@ -622,6 +623,8 @@ const gchar *grl_source_get_id (GrlSource *source); - - const gchar *grl_source_get_name (GrlSource *source); - -+GIcon *grl_source_get_icon (GrlSource *source); -+ - const gchar *grl_source_get_description (GrlSource *source); - - GrlPlugin *grl_source_get_plugin (GrlSource *source); --- -cgit v0.9.2 - diff --git a/grilo-0.2.7-split_keyfile_processing.patch b/grilo-0.2.7-split_keyfile_processing.patch deleted file mode 100644 index c192ef5..0000000 --- a/grilo-0.2.7-split_keyfile_processing.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 8eb5dac7799d6507ec62e4f694da892b169374b4 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 16 Jan 2014 16:30:35 +0000 -Subject: core: Split up keyfile processing for config - -Into a separate function, so it can be used to load from data instead. - -https://bugzilla.gnome.org/show_bug.cgi?id=722358 ---- -(limited to 'src/grl-registry.c') - -diff --git a/src/grl-registry.c b/src/grl-registry.c -index f846111..58073ba 100644 ---- a/src/grl-registry.c -+++ b/src/grl-registry.c -@@ -1604,6 +1604,37 @@ grl_registry_add_config (GrlRegistry *registry, - return TRUE; - } - -+static void -+add_config_from_keyfile (GKeyFile *keyfile, -+ GrlRegistry *registry) -+{ -+ GrlConfig *config; -+ gchar **key; -+ gchar **keys; -+ gchar **plugin; -+ gchar **plugins; -+ gchar *value; -+ -+ /* Look up for defined plugins */ -+ plugins = g_key_file_get_groups (keyfile, NULL); -+ for (plugin = plugins; *plugin; plugin++) { -+ config = grl_config_new (*plugin, NULL); -+ -+ /* Look up configuration keys for this plugin */ -+ keys = g_key_file_get_keys (keyfile, *plugin, NULL, NULL); -+ for (key = keys; *key; key++) { -+ value = g_key_file_get_string (keyfile, *plugin, *key, NULL); -+ if (value) { -+ grl_config_set_string (config, *key, value); -+ g_free (value); -+ } -+ } -+ grl_registry_add_config (registry, config, NULL); -+ g_strfreev (keys); -+ } -+ g_strfreev (plugins); -+} -+ - /** - * grl_registry_add_config_from_file: - * @registry: the registry instance -@@ -1623,12 +1654,6 @@ grl_registry_add_config_from_file (GrlRegistry *registry, - { - GError *load_error = NULL; - GKeyFile *keyfile; -- GrlConfig *config; -- gchar **key; -- gchar **keys; -- gchar **plugin; -- gchar **plugins; -- gchar *value; - - g_return_val_if_fail (GRL_IS_REGISTRY (registry), FALSE); - g_return_val_if_fail (config_file, FALSE); -@@ -1639,25 +1664,7 @@ grl_registry_add_config_from_file (GrlRegistry *registry, - config_file, - G_KEY_FILE_NONE, - &load_error)) { -- -- /* Look up for defined plugins */ -- plugins = g_key_file_get_groups (keyfile, NULL); -- for (plugin = plugins; *plugin; plugin++) { -- config = grl_config_new (*plugin, NULL); -- -- /* Look up configuration keys for this plugin */ -- keys = g_key_file_get_keys (keyfile, *plugin, NULL, NULL); -- for (key = keys; *key; key++) { -- value = g_key_file_get_string (keyfile, *plugin, *key, NULL); -- if (value) { -- grl_config_set_string (config, *key, value); -- g_free (value); -- } -- } -- grl_registry_add_config (registry, config, NULL); -- g_strfreev (keys); -- } -- g_strfreev (plugins); -+ add_config_from_keyfile (keyfile, registry); - g_key_file_free (keyfile); - return TRUE; - } else { --- -cgit v0.9.2 - diff --git a/grilo-0.2.7-vala_gio.patch b/grilo-0.2.7-vala_gio.patch deleted file mode 100644 index 0eb0efe..0000000 --- a/grilo-0.2.7-vala_gio.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 5b0671d47f634b0dbb5dc9516a12a1fa6f7713d6 Mon Sep 17 00:00:00 2001 -From: Victor Manuel Jaquez Leal -Date: Fri, 17 Jan 2014 10:17:25 +0000 -Subject: vala: add gio dependency - -GIcon is provided in GIO module. - -This fixes the Vala break introduced by previous commit. - -https://bugzilla.gnome.org/show_bug.cgi?id=722407 ---- -diff --git a/bindings/vala/grilo-0.2.deps b/bindings/vala/grilo-0.2.deps -index 13f9b50..d03a373 100644 ---- a/bindings/vala/grilo-0.2.deps -+++ b/bindings/vala/grilo-0.2.deps -@@ -1 +1,2 @@ - gmodule-2.0 -+gio-2.0 --- -cgit v0.9.2 - diff --git a/grilo.spec b/grilo.spec index 50e3045..dcfc484 100644 --- a/grilo.spec +++ b/grilo.spec @@ -2,18 +2,13 @@ %define release_version %(echo %{version} | awk -F. '{print $1"."$2}') Name: grilo -Version: 0.2.7 -Release: 2%{?dist} +Version: 0.2.9 +Release: 1%{?dist} Summary: Content discovery framework Group: Applications/Multimedia License: LGPLv2+ Source0: http://ftp.gnome.org/pub/GNOME/sources/grilo/%{release_version}/grilo-%{version}.tar.xz -# All these are upstream backports, needed for totem 3.11.5 -Patch0: grilo-0.2.7-icon_grlsource.patch -Patch1: grilo-0.2.7-vala_gio.patch -Patch2: grilo-0.2.7-split_keyfile_processing.patch -Patch3: grilo-0.2.7-add_grl_registry_add_config_from_resource.patch Url: http://live.gnome.org/Grilo BuildRequires: chrpath @@ -62,10 +57,6 @@ This package contains the Vala language bindings. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 # Fix vala detection for version 0.24 sed -i 's/libvala-0.20/libvala-0.24/g' configure* @@ -125,6 +116,9 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/grilo-simple-playlist %{_datadir}/vala/vapi/* %changelog +* Wed Feb 19 2014 Kalev Lember - 0.2.9-1 +- Update to 0.2.9 + * Wed Feb 05 2014 Adam Williamson - 0.2.7-2 - backport some patches from upstream that are needed for totem diff --git a/sources b/sources index 6082dd9..9e9f8f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0d87f6b94f3518daec97d1aa825106d grilo-0.2.7.tar.xz +a03d4afe4c9103d4995ca5157312f228 grilo-0.2.9.tar.xz