summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2011-08-14 10:52:41 +0000
committerNirbheek Chauhan <nirbheek@gentoo.org>2011-08-14 10:52:41 +0000
commit5f3c52cee8925a3995af18cf27a0912f9fc3c1f2 (patch)
tree7a93ead9627fdc61b2e082e7cc69190ec87e715a /media-plugins/grilo-plugins
parentBump to 0.1.16, bug 377651 (diff)
downloadgentoo-2-5f3c52cee8925a3995af18cf27a0912f9fc3c1f2.tar.gz
gentoo-2-5f3c52cee8925a3995af18cf27a0912f9fc3c1f2.tar.bz2
gentoo-2-5f3c52cee8925a3995af18cf27a0912f9fc3c1f2.zip
Bump to 0.1.16, bug 377651
(Portage version: 2.2.0_alpha39_p14/cvs/Linux x86_64)
Diffstat (limited to 'media-plugins/grilo-plugins')
-rw-r--r--media-plugins/grilo-plugins/ChangeLog13
-rw-r--r--media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-local-metadata-leak.patch23
-rw-r--r--media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-c90.patch178
-rw-r--r--media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-libgdata-0.9.patch178
-rw-r--r--media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-missing-case.patch20
-rw-r--r--media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-variable-shadowing.patch25
-rw-r--r--media-plugins/grilo-plugins/grilo-plugins-0.1.16.ebuild80
7 files changed, 516 insertions, 1 deletions
diff --git a/media-plugins/grilo-plugins/ChangeLog b/media-plugins/grilo-plugins/ChangeLog
index 07d1791857f2..9a7439f3a1ed 100644
--- a/media-plugins/grilo-plugins/ChangeLog
+++ b/media-plugins/grilo-plugins/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for media-plugins/grilo-plugins
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/grilo-plugins/ChangeLog,v 1.2 2011/06/15 16:43:45 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/grilo-plugins/ChangeLog,v 1.3 2011/08/14 10:52:41 nirbheek Exp $
+
+*grilo-plugins-0.1.16 (14 Aug 2011)
+
+ 14 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org>
+ +grilo-plugins-0.1.16.ebuild,
+ +files/grilo-plugins-0.1.16-local-metadata-leak.patch,
+ +files/grilo-plugins-0.1.16-youtube-c90.patch,
+ +files/grilo-plugins-0.1.16-youtube-libgdata-0.9.patch,
+ +files/grilo-plugins-0.1.16-youtube-missing-case.patch,
+ +files/grilo-plugins-0.1.16-youtube-variable-shadowing.patch:
+ Bump to 0.1.16, bug 377651
15 Jun 2011; Pacho Ramos <pacho@gentoo.org> grilo-plugins-0.1.15.ebuild:
Prepare to set 'xz' as default compressor for eapi4.
diff --git a/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-local-metadata-leak.patch b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-local-metadata-leak.patch
new file mode 100644
index 000000000000..b674e07e7302
--- /dev/null
+++ b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-local-metadata-leak.patch
@@ -0,0 +1,23 @@
+From 9c1ccee8cadddeb6dd5d61e90ca65b3e951e326f Mon Sep 17 00:00:00 2001
+From: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
+Date: Sun, 03 Jul 2011 01:46:53 +0000
+Subject: local-metadata: fix memory leak on picture resolve
+
+A reference was still hold on a GFile object.
+
+Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
+---
+diff --git a/src/metadata/local-metadata/grl-local-metadata.c b/src/metadata/local-metadata/grl-local-metadata.c
+index 0ba1fcc..d1e3208 100644
+--- a/src/metadata/local-metadata/grl-local-metadata.c
++++ b/src/metadata/local-metadata/grl-local-metadata.c
+@@ -570,6 +570,7 @@ resolve_image (GrlMetadataSource *source,
+ g_file_query_info_async (file, G_FILE_ATTRIBUTE_THUMBNAIL_PATH,
+ G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, cancellable,
+ (GAsyncReadyCallback)got_file_info, rs);
++ g_object_unref (file);
+ }
+ }
+
+--
+cgit v0.9
diff --git a/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-c90.patch b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-c90.patch
new file mode 100644
index 000000000000..d29ea3d8fd84
--- /dev/null
+++ b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-c90.patch
@@ -0,0 +1,178 @@
+From 0e425f129194593c3b7d3155aa8fc8f1a650cf06 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip@tecnocode.co.uk>
+Date: Mon, 04 Jul 2011 21:53:18 +0000
+Subject: youtube: Fix ISO C90 warnings
+
+Can't mix declarations and code.
+---
+diff --git a/src/media/youtube/grl-youtube.c b/src/media/youtube/grl-youtube.c
+index eadd506..2057ec5 100644
+--- a/src/media/youtube/grl-youtube.c
++++ b/src/media/youtube/grl-youtube.c
+@@ -250,6 +250,7 @@ grl_youtube_plugin_init (GrlPluginRegistry *registry,
+ gchar *api_key;
+ GrlConfig *config;
+ gint config_count;
++ GrlYoutubeSource *source;
+
+ GRL_LOG_DOMAIN_INIT (youtube_log_domain, "youtube");
+
+@@ -277,8 +278,7 @@ grl_youtube_plugin_init (GrlPluginRegistry *registry,
+ g_thread_init (NULL);
+ }
+
+- GrlYoutubeSource *source =
+- grl_youtube_source_new (api_key, YOUTUBE_CLIENT_ID);
++ source = grl_youtube_source_new (api_key, YOUTUBE_CLIENT_ID);
+
+ grl_plugin_registry_register_source (registry,
+ plugin,
+@@ -301,11 +301,11 @@ G_DEFINE_TYPE (GrlYoutubeSource, grl_youtube_source, GRL_TYPE_MEDIA_SOURCE);
+ static GrlYoutubeSource *
+ grl_youtube_source_new (const gchar *api_key, const gchar *client_id)
+ {
+- GRL_DEBUG ("grl_youtube_source_new");
+-
+ GrlYoutubeSource *source;
+ GDataYouTubeService *service;
+
++ GRL_DEBUG ("grl_youtube_source_new");
++
+ service = gdata_youtube_service_new (api_key, client_id);
+ if (!service) {
+ GRL_WARNING ("Failed to initialize gdata service");
+@@ -426,9 +426,13 @@ release_operation_data (GrlMetadataSource *source,
+ static OperationSpec *
+ operation_spec_new ()
+ {
++ OperationSpec *os;
++
+ GRL_DEBUG ("Allocating new spec");
+- OperationSpec *os = g_slice_new0 (OperationSpec);
++
++ os = g_slice_new0 (OperationSpec);
+ os->ref_count = 1;
++
+ return os;
+ }
+
+@@ -614,14 +618,14 @@ build_media_from_entry (GrlYoutubeSource *source,
+ static void
+ parse_categories (xmlDocPtr doc, xmlNodePtr node, OperationSpec *os)
+ {
+- GRL_DEBUG ("parse_categories");
+-
+ guint total = 0;
+ GList *all = NULL, *iter;
+ CategoryInfo *cat_info;
+ gchar *id;
+ guint index = 0;
+
++ GRL_DEBUG ("parse_categories");
++
+ while (node) {
+ cat_info = g_slice_new (CategoryInfo);
+ id = (gchar *) xmlGetProp (node, (xmlChar *) "term");
+@@ -800,14 +804,14 @@ metadata_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+ {
+- GRL_DEBUG ("metadata_cb");
+-
+ GError *error = NULL;
+ GrlYoutubeSource *source;
+ GDataEntry *video;
+ GDataService *service;
+ GrlMediaSourceMetadataSpec *ms = (GrlMediaSourceMetadataSpec *) user_data;
+
++ GRL_DEBUG ("metadata_cb");
++
+ source = GRL_YOUTUBE_SOURCE (ms->source);
+ service = GDATA_SERVICE (source->priv->service);
+
+@@ -876,13 +880,13 @@ search_progress_cb (GDataEntry *entry,
+ static void
+ search_cb (GObject *object, GAsyncResult *result, OperationSpec *os)
+ {
+- GRL_DEBUG ("search_cb");
+-
+ GDataFeed *feed;
+ GError *error = NULL;
+ gboolean need_extra_unref = FALSE;
+ GrlYoutubeSource *source = GRL_YOUTUBE_SOURCE (os->source);
+
++ GRL_DEBUG ("search_cb");
++
+ /* Check if operation was cancelled */
+ if (g_cancellable_is_cancelled (os->cancellable)) {
+ GRL_DEBUG ("Search operation has been cancelled");
+@@ -1045,10 +1049,10 @@ produce_container_from_directory (GDataService *service,
+ static void
+ produce_from_directory (CategoryInfo *dir, gint dir_size, OperationSpec *os)
+ {
+- GRL_DEBUG ("produce_from_directory");
+-
+ guint index, remaining;
+
++ GRL_DEBUG ("produce_from_directory");
++
+ /* Youtube's first index is 1, but the directories start at 0 */
+ os->skip--;
+
+@@ -1479,11 +1483,11 @@ grl_youtube_source_metadata (GrlMediaSource *source,
+ static gboolean
+ grl_youtube_test_media_from_uri (GrlMediaSource *source, const gchar *uri)
+ {
+- GRL_DEBUG ("grl_youtube_test_media_from_uri");
+-
+ gchar *video_id;
+ gboolean ok;
+
++ GRL_DEBUG ("grl_youtube_test_media_from_uri");
++
+ video_id = get_video_id_from_url (uri);
+ ok = (video_id != NULL);
+ g_free (video_id);
+@@ -1494,12 +1498,15 @@ static void
+ grl_youtube_get_media_from_uri (GrlMediaSource *source,
+ GrlMediaSourceMediaFromUriSpec *mfus)
+ {
+- GRL_DEBUG ("grl_youtube_get_media_from_uri");
+-
+ gchar *video_id;
+ GError *error;
+ GCancellable *cancellable;
+ GDataService *service;
++#ifdef GDATA_API_SUBJECT_TO_CHANGE
++ gchar *entry_id;
++#endif /* GDATA_API_SUBJECT_TO_CHANGE */
++
++ GRL_DEBUG ("grl_youtube_get_media_from_uri");
+
+ video_id = get_video_id_from_url (mfus->uri);
+ if (video_id == NULL) {
+@@ -1516,7 +1523,7 @@ grl_youtube_get_media_from_uri (GrlMediaSource *source,
+ cancellable = g_cancellable_new ();
+ grl_operation_set_data (mfus->media_from_uri_id, cancellable);
+ #ifdef GDATA_API_SUBJECT_TO_CHANGE
+- gchar *entry_id = g_strconcat ("tag:youtube.com,2008:video:", video_id, NULL);
++ entry_id = g_strconcat ("tag:youtube.com,2008:video:", video_id, NULL);
+ gdata_service_query_single_entry_async (service,
+ entry_id,
+ NULL,
+@@ -1539,10 +1546,11 @@ static void
+ grl_youtube_source_cancel (GrlMetadataSource *source,
+ guint operation_id)
+ {
++ GCancellable *cancellable;
++
+ GRL_DEBUG (__FUNCTION__);
+
+- GCancellable *cancellable =
+- (GCancellable *) grl_operation_get_data (operation_id);
++ cancellable = G_CANCELLABLE (grl_operation_get_data (operation_id));
+
+ if (cancellable) {
+ g_cancellable_cancel (cancellable);
+--
+cgit v0.9
diff --git a/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-libgdata-0.9.patch b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-libgdata-0.9.patch
new file mode 100644
index 000000000000..a7712e628c76
--- /dev/null
+++ b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-libgdata-0.9.patch
@@ -0,0 +1,178 @@
+From 1d7580183556d44dc9490b6ed7d72b512eeceab8 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip@tecnocode.co.uk>
+Date: Mon, 04 Jul 2011 22:12:53 +0000
+Subject: youtube: Add support for compiling against libgdata ≥ 0.9.0
+
+This adds conditional support for compiling against libgdata ≥ 0.9.0, which
+broke various APIs from 0.8.x.
+---
+diff --git a/configure.ac b/configure.ac
+index 898ef51..7d90503 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -160,6 +160,10 @@ if test "x$HAVE_GDATA" = "xyes"; then
+ if test $gdata_version_major -eq 0 -a $gdata_version_minor -ge 7; then
+ GDATA_CFLAGS="$GDATA_CFLAGS -DGDATA_API_SUBJECT_TO_CHANGE"
+ fi
++
++ if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
++ AC_DEFINE(HAVE_LIBGDATA_0_9, 1, [libgdata is 0.9.1 or higher])
++ fi
+ fi
+
+ # ----------------------------------------------------------
+diff --git a/src/media/youtube/grl-youtube.c b/src/media/youtube/grl-youtube.c
+index 050a80d..7a08683 100644
+--- a/src/media/youtube/grl-youtube.c
++++ b/src/media/youtube/grl-youtube.c
+@@ -306,7 +306,11 @@ grl_youtube_source_new (const gchar *api_key, const gchar *client_id)
+
+ GRL_DEBUG ("grl_youtube_source_new");
+
++#ifdef HAVE_LIBGDATA_0_9
++ service = gdata_youtube_service_new (api_key, NULL);
++#else /* HAVE_LIBGDATA_0_9 */
+ service = gdata_youtube_service_new (api_key, client_id);
++#endif /* !HAVE_LIBGDATA_0_9 */
+ if (!service) {
+ GRL_WARNING ("Failed to initialize gdata service");
+ return NULL;
+@@ -1135,14 +1139,28 @@ produce_from_feed (OperationSpec *os)
+ service = GRL_YOUTUBE_SOURCE (os->source)->priv->service;
+ query = gdata_query_new_with_limits (NULL , os->skip, os->count);
+ os->category_info = &feeds_dir[feed_type];
++
++#ifdef HAVE_LIBGDATA_0_9
+ gdata_youtube_service_query_standard_feed_async (GDATA_YOUTUBE_SERVICE (service),
+ feed_type,
+ query,
+ os->cancellable,
+ search_progress_cb,
+ os,
++ NULL,
+ (GAsyncReadyCallback) search_cb,
+ os);
++#else /* HAVE_LIBGDATA_0_9 */
++ gdata_youtube_service_query_standard_feed_async (GDATA_YOUTUBE_SERVICE (service),
++ feed_type,
++ query,
++ os->cancellable,
++ search_progress_cb,
++ os,
++ (GAsyncReadyCallback) search_cb,
++ os);
++#endif /* !HAVE_LIBGDATA_0_9 */
++
+ g_object_unref (query);
+ }
+
+@@ -1180,6 +1198,17 @@ produce_from_category (OperationSpec *os)
+ query = gdata_query_new_with_limits (NULL , os->skip, os->count);
+ os->category_info = &categories_dir[category_index];
+ gdata_query_set_categories (query, category_term);
++
++#ifdef HAVE_LIBGDATA_0_9
++ gdata_youtube_service_query_videos_async (GDATA_YOUTUBE_SERVICE (service),
++ query,
++ NULL,
++ search_progress_cb,
++ os,
++ NULL,
++ (GAsyncReadyCallback) search_cb,
++ os);
++#else /* HAVE_LIBGDATA_0_9 */
+ gdata_youtube_service_query_videos_async (GDATA_YOUTUBE_SERVICE (service),
+ query,
+ NULL,
+@@ -1187,6 +1216,8 @@ produce_from_category (OperationSpec *os)
+ os,
+ (GAsyncReadyCallback) search_cb,
+ os);
++#endif /* !HAVE_LIBGDATA_0_9 */
++
+ g_object_unref (query);
+ }
+
+@@ -1329,6 +1360,17 @@ grl_youtube_source_search (GrlMediaSource *source,
+ grl_operation_set_data (ss->search_id, os->cancellable);
+
+ query = gdata_query_new_with_limits (ss->text, os->skip, os->count);
++
++#ifdef HAVE_LIBGDATA_0_9
++ gdata_youtube_service_query_videos_async (GDATA_YOUTUBE_SERVICE (GRL_YOUTUBE_SOURCE (source)->priv->service),
++ query,
++ os->cancellable,
++ search_progress_cb,
++ os,
++ NULL,
++ (GAsyncReadyCallback) search_cb,
++ os);
++#else /* HAVE_LIBGDATA_0_9 */
+ gdata_youtube_service_query_videos_async (GDATA_YOUTUBE_SERVICE (GRL_YOUTUBE_SOURCE (source)->priv->service),
+ query,
+ os->cancellable,
+@@ -1336,6 +1378,8 @@ grl_youtube_source_search (GrlMediaSource *source,
+ os,
+ (GAsyncReadyCallback) search_cb,
+ os);
++#endif /* !HAVE_LIBGDATA_0_9 */
++
+ g_object_unref (query);
+ }
+
+@@ -1452,6 +1496,17 @@ grl_youtube_source_metadata (GrlMediaSource *source,
+ #ifdef GDATA_API_SUBJECT_TO_CHANGE
+ {
+ gchar *entryid = g_strconcat ("tag:youtube.com,2008:video:", id, NULL);
++
++#ifdef HAVE_LIBGDATA_0_9
++ gdata_service_query_single_entry_async (service,
++ NULL,
++ entryid,
++ NULL,
++ GDATA_TYPE_YOUTUBE_VIDEO,
++ cancellable,
++ metadata_cb,
++ ms);
++#else /* HAVE_LIBGDATA_0_9 */
+ gdata_service_query_single_entry_async (service,
+ entryid,
+ NULL,
+@@ -1459,6 +1514,8 @@ grl_youtube_source_metadata (GrlMediaSource *source,
+ cancellable,
+ metadata_cb,
+ ms);
++#endif /* !HAVE_LIBGDATA_0_9 */
++
+ g_free (entryid);
+ }
+ #else
+@@ -1524,6 +1581,17 @@ grl_youtube_get_media_from_uri (GrlMediaSource *source,
+ grl_operation_set_data (mfus->media_from_uri_id, cancellable);
+ #ifdef GDATA_API_SUBJECT_TO_CHANGE
+ entry_id = g_strconcat ("tag:youtube.com,2008:video:", video_id, NULL);
++
++#ifdef HAVE_LIBGDATA_0_9
++ gdata_service_query_single_entry_async (service,
++ NULL,
++ entry_id,
++ NULL,
++ GDATA_TYPE_YOUTUBE_VIDEO,
++ cancellable,
++ media_from_uri_cb,
++ mfus);
++#else /* HAVE_LIBGDATA_0_9 */
+ gdata_service_query_single_entry_async (service,
+ entry_id,
+ NULL,
+@@ -1531,6 +1599,8 @@ grl_youtube_get_media_from_uri (GrlMediaSource *source,
+ cancellable,
+ media_from_uri_cb,
+ mfus);
++#endif /* !HAVE_LIBGDATA_0_9 */
++
+ g_free (entry_id);
+ #else
+ gdata_youtube_service_query_single_video_async (GDATA_YOUTUBE_SERVICE (service),
+--
+cgit v0.9
diff --git a/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-missing-case.patch b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-missing-case.patch
new file mode 100644
index 000000000000..a0329c0e7d00
--- /dev/null
+++ b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-missing-case.patch
@@ -0,0 +1,20 @@
+From 477ddd90c29aba07a9ab2319a6fe9e6b6acef5c1 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip@tecnocode.co.uk>
+Date: Mon, 04 Jul 2011 22:15:56 +0000
+Subject: youtube: Add a missing case to a switch statement
+
+---
+diff --git a/src/media/youtube/grl-youtube.c b/src/media/youtube/grl-youtube.c
+index 7a08683..2bdaf01 100644
+--- a/src/media/youtube/grl-youtube.c
++++ b/src/media/youtube/grl-youtube.c
+@@ -1430,6 +1430,7 @@ grl_youtube_source_browse (GrlMediaSource *source,
+ case YOUTUBE_MEDIA_TYPE_CATEGORY:
+ produce_from_category (os);
+ break;
++ case YOUTUBE_MEDIA_TYPE_VIDEO:
+ default:
+ g_assert_not_reached ();
+ break;
+--
+cgit v0.9
diff --git a/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-variable-shadowing.patch b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-variable-shadowing.patch
new file mode 100644
index 000000000000..f1445a2e1d8b
--- /dev/null
+++ b/media-plugins/grilo-plugins/files/grilo-plugins-0.1.16-youtube-variable-shadowing.patch
@@ -0,0 +1,25 @@
+From e4c40d02fc1b6627b66682a28cdbb4cbd71aad7e Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip@tecnocode.co.uk>
+Date: Mon, 04 Jul 2011 21:56:05 +0000
+Subject: youtube: Fix variable shadowing a parameter
+
+---
+diff --git a/src/media/youtube/grl-youtube.c b/src/media/youtube/grl-youtube.c
+index 66609dd..050a80d 100644
+--- a/src/media/youtube/grl-youtube.c
++++ b/src/media/youtube/grl-youtube.c
+@@ -604,9 +604,9 @@ build_media_from_entry (GrlYoutubeSource *source,
+ gdata_youtube_video_look_up_content (video,
+ "application/x-shockwave-flash");
+ if (youtube_content != NULL) {
+- GDataMediaContent *content = GDATA_MEDIA_CONTENT (youtube_content);
+- grl_media_set_external_player (media,
+- gdata_media_content_get_uri (content));
++ const gchar *uri =
++ gdata_media_content_get_uri (GDATA_MEDIA_CONTENT (youtube_content));
++ grl_media_set_external_player (media, uri);
+ }
+ }
+ iter = g_list_next (iter);
+--
+cgit v0.9
diff --git a/media-plugins/grilo-plugins/grilo-plugins-0.1.16.ebuild b/media-plugins/grilo-plugins/grilo-plugins-0.1.16.ebuild
new file mode 100644
index 000000000000..82e0d0b4b4a6
--- /dev/null
+++ b/media-plugins/grilo-plugins/grilo-plugins-0.1.16.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/grilo-plugins/grilo-plugins-0.1.16.ebuild,v 1.1 2011/08/14 10:52:41 nirbheek Exp $
+
+EAPI="4"
+GNOME2_LA_PUNT="yes"
+
+inherit autotools eutils gnome2
+
+DESCRIPTION="A framework for easy media discovery and browsing"
+HOMEPAGE="https://live.gnome.org/Grilo"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+youtube +vimeo upnp"
+
+RDEPEND="
+ >=dev-libs/glib-2.26:2
+ =media-libs/grilo-${PV}[network]
+
+ dev-libs/gmime:2.4
+ dev-libs/libxml2:2
+ dev-db/sqlite:3
+
+ youtube? ( >=dev-libs/libgdata-0.4.0
+ >=media-libs/quvi-0.2.15 )
+ upnp? ( >=net-libs/gupnp-0.13
+ >=net-libs/gupnp-av-0.5 )
+ vimeo? ( net-libs/libsoup:2.4
+ dev-libs/libgcrypt )"
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.9"
+
+# `make check` doesn't do anything, and ${S}/test/test fails without all plugins
+RESTRICT="test"
+
+pkg_setup() {
+ DOCS="AUTHORS NEWS README"
+ # --enable-debug only changes CFLAGS, useless for us
+ G2CONF="${G2CONF}
+ --disable-maintainer-mode
+ --disable-static
+ --disable-debug
+ --disable-uninstalled"
+
+ # Plugins
+ # TODO: Enable tracker support
+ G2CONF="${G2CONF}
+ --enable-filesystem
+ --enable-jamendo
+ --enable-lastfm-albumart
+ --enable-flickr
+ --enable-podcasts
+ --enable-bookmarks
+ --disable-shoutcast
+ --enable-apple-trailers
+ --enable-metadata-store
+ --enable-gravatar
+ --disable-tracker
+ --enable-localmetadata
+ $(use_enable upnp)
+ $(use_enable youtube)
+ $(use_enable vimeo)"
+}
+
+src_prepare() {
+ # important patches from upstream git master
+ epatch "${FILESDIR}/${P}-youtube-c90.patch"
+ epatch "${FILESDIR}/${P}-youtube-variable-shadowing.patch"
+ epatch "${FILESDIR}/${P}-youtube-missing-case.patch"
+ epatch "${FILESDIR}/${P}-youtube-libgdata-0.9.patch"
+ epatch "${FILESDIR}/${P}-local-metadata-leak.patch"
+
+ sed -i -e 's/^\(SUBDIRS .*\)test/\1/g' Makefile.*
+
+ eautoreconf
+
+ gnome2_src_prepare
+}