--- /dev/null
+From b2e7a0b5db67dd276b09a151cf8a4aa3b58409fb Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Sun, 13 Aug 2017 11:28:19 +0200
+Subject: [PATCH] Allow selecting specific gmime version
+
+---
+ configure.ac | 69 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 34 insertions(+), 35 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index dda59f7..f92bbf5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,47 +74,46 @@ pkg_modules="glib-2.0 >= $GLIB_REQS libxml-2.0 gthread-2.0 gio-2.0 >= $GIO_REQS
+ ##################################
+ # Checking libgmime dependency
+ ##################################
++GMIME=""
+ gmime_message=""
+
+-AC_ARG_ENABLE(gmime-i-know-what-im-doing,
+- AS_HELP_STRING([--disable-gmime-i-know-what-im-doing],
+- [Disable libgmime (Unsupported, breaks Podcast support).]),
+- [enable_gmime=no],
+- [enable_gmime=yes])
+-
+-if test "x$enable_gmime" = "xyes" ; then
+- have_gmime3=no
+- PKG_CHECK_MODULES(GMIME,
+- gmime-3.0,
+- [have_gmime=yes have_gmime3=yes GMIME=gmime-3.0],
+- [have_gmime=no])
+-
+- if test "x$have_gmime" = "xno" ; then
+- PKG_CHECK_MODULES(GMIME,
+- gmime-2.6,
+- [have_gmime=yes GMIME=gmime-2.6],
+- [have_gmime=no])
+- fi
+-
+- if test "x$have_gmime" = "xyes" ; then
+- AC_SUBST(GMIME, $GMIME)
+- AC_SUBST(USEGMIME, yes)
+- AC_DEFINE(HAVE_GMIME, 1, [GMime available in the system])
+- if test "x$have_gmime3" = xyes ; then
+- AC_DEFINE(HAVE_GMIME3, 1, [GMime 3.0 available in the system])
+- fi
+- pkg_modules="$pkg_modules $GMIME"
+- else
+- AC_MSG_ERROR([libgmime is required to compile totem-pl-parser.])
+- fi
+-else
+- AC_SUBST(USEGMIME, no)
+- gmime_message="
++AC_ARG_ENABLE(gmime,
++ AS_HELP_STRING([--enable-gmime=2.6|3.0|auto|no],
++ [Which gmime version to compile against. Disabling libgmime is unsupported and breaks Podcast support.]),
++ [],
++ [enable_gmime=auto])
++
++AS_IF([test "x$enable_gmime" = "x2.6"],
++ [PKG_CHECK_MODULES(GMIME, [gmime-2.6], [GMIME=gmime-2.6])],
++ [test "x$enable_gmime" = "x3.0"],
++ [PKG_CHECK_MODULES(GMIME, [gmime-3.0], [GMIME=gmime-3.0])],
++ [test "x$enable_gmime" = "xauto" -o "x$enable_gmime" = "xyes"],
++ [PKG_CHECK_MODULES(GMIME, [gmime-3.0],
++ [GMIME=gmime-3.0],
++ [PKG_CHECK_MODULES(GMIME, [gmime-2.6], [GMIME=gmime-2.6])])],
++ [test "x$enable_gmime" = "xno"],
++ [],
++ # else
++ [AC_MSG_ERROR([invalid gmime version specified])]
++)
++
++AS_IF([test "x$enable_gmime" = "xno"],
++ [
++ AC_SUBST(USEGMIME, no)
++ gmime_message="
+ **************************************************************
+ Compiling totem-pl-parser without libgmime.
+ This will break podcast support and is completely unsupported.
+ **************************************************************"
+-fi
++ ], [
++ AC_SUBST(GMIME, $GMIME)
++ AC_SUBST(USEGMIME, yes)
++ AC_DEFINE(HAVE_GMIME, 1, [GMime available in the system])
++ AS_IF([test "$xGMIME" = "xgmime-3.0"],
++ [AC_DEFINE(HAVE_GMIME3, 1, [GMime 3.0 available in the system])])
++ pkg_modules="$pkg_modules $GMIME"
++ ]
++)
+
+ ##################################
+ # Checking quvi dependency
+--
+2.14.0
+
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_EAUTORECONF="yes"
+inherit gnome2
+
+DESCRIPTION="Playlist parsing library"
+HOMEPAGE="https://developer.gnome.org/totem-pl-parser/stable/"
+
+LICENSE="LGPL-2+"
+SLOT="0/18"
+IUSE="archive crypt +introspection +quvi test"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="
+ >=dev-libs/glib-2.31:2
+ dev-libs/gmime:2.6
+ >=net-libs/libsoup-2.43:2.4
+ archive? ( >=app-arch/libarchive-3 )
+ crypt? ( dev-libs/libgcrypt:0= )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.5:= )
+ quvi? ( >=media-libs/libquvi-0.9.1:0= )
+"
+DEPEND="${RDEPEND}
+ !<media-video/totem-2.21
+ dev-libs/gobject-introspection-common
+ >=dev-util/intltool-0.35
+ >=dev-util/gtk-doc-am-1.14
+ sys-devel/autoconf-archive
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ test? (
+ gnome-base/gvfs[http]
+ sys-apps/dbus )
+"
+# eautoreconf needs:
+# dev-libs/gobject-introspection-common
+# sys-devel/autoconf-archive
+
+PATCHES=(
+ # Fix gmime slot automagic, https://bugzilla.gnome.org/786231
+ "${FILESDIR}"/${P}-gmime-automagic.patch
+)
+
+src_prepare() {
+ # Disable tests requiring network access, bug #346127
+ # 3rd test fails on upgrade, not once installed
+ sed -e 's:\(g_test_add_func.*/parser/resolution.*\):/*\1*/:' \
+ -e 's:\(g_test_add_func.*/parser/parsing/itms_link.*\):/*\1*/:' \
+ -e 's:\(g_test_add_func.*/parser/parsability.*\):/*\1/:'\
+ -i plparse/tests/parser.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ --enable-gmime=2.6 \
+ $(use_enable archive libarchive) \
+ $(use_enable crypt libgcrypt) \
+ $(use_enable quvi) \
+ $(use_enable introspection)
+}
+
+src_test() {
+ # This is required as told by upstream in bgo#629542
+ GVFS_DISABLE_FUSE=1 dbus-run-session emake check
+}