From 217feced47bd5cc91eab2928d299dcae9536264d Mon Sep 17 00:00:00 2001
From: Luca Bruno <lethalman88@gmail.com>
Date: Tue, 7 Jun 2016 21:21:37 +0200
Subject: [PATCH] gnome3_20.totem: fix build on i686

See https://bugzilla.gnome.org/show_bug.cgi?id=767374
---
 pkgs/desktops/gnome-3/3.20/core/totem/default.nix |  2 ++
 pkgs/desktops/gnome-3/3.20/core/totem/x86.patch   | 11 +++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 pkgs/desktops/gnome-3/3.20/core/totem/x86.patch

diff --git a/pkgs/desktops/gnome-3/3.20/core/totem/default.nix b/pkgs/desktops/gnome-3/3.20/core/totem/default.nix
index 13665c72274e..bce3bd0ceba3 100644
--- a/pkgs/desktops/gnome-3/3.20/core/totem/default.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/totem/default.nix
@@ -32,6 +32,8 @@ stdenv.mkDerivation rec {
 
   '';
 
+  patches = [ ./x86.patch ];
+
   meta = with stdenv.lib; {
     homepage = https://wiki.gnome.org/Apps/Videos;
     description = "Movie player for the GNOME desktop based on GStreamer";
diff --git a/pkgs/desktops/gnome-3/3.20/core/totem/x86.patch b/pkgs/desktops/gnome-3/3.20/core/totem/x86.patch
new file mode 100644
index 000000000000..ada6d59e8e04
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.20/core/totem/x86.patch
@@ -0,0 +1,11 @@
+--- a/src/backend/bacon-video-widget.c	2016-06-07 20:47:22.981213063 +0200
++++ b/src/backend/bacon-video-widget.c	2016-06-07 20:47:44.065781036 +0200
+@@ -2334,7 +2334,7 @@
+     if (!gst_toc_entry_get_start_stop_times (entry, &start, &stop)) {
+       GST_DEBUG ("Chapter #%d (couldn't get times)", i);
+     } else {
+-      GST_DEBUG ("Chapter #%d (start: %li stop: %li)", i, start, stop);
++      GST_DEBUG ("Chapter #%d (start: %" G_GINT64_FORMAT " stop: %" G_GINT64_FORMAT ")", i, start, stop);
+     }
+   }
+