diff --git a/gtk-doc-reproducible-html.patch b/gtk-doc-reproducible-html.patch
new file mode 100644
index 0000000..1dc0d67
--- /dev/null
+++ b/gtk-doc-reproducible-html.patch
@@ -0,0 +1,15 @@
+Description: Make HTML output deterministic
+Author: Peter De Wachter
+Last-Update: 2015-01-19
+
+--- a/gtkdoc-mkdb.in
++++ b/gtkdoc-mkdb.in
+@@ -1093,7 +1093,7 @@
+
+ # do a case insensitive sort while chopping off the prefix
+ foreach my $hash (
+- sort { $$a{criteria} cmp $$b{criteria} }
++ sort { $$a{criteria} cmp $$b{criteria} or $$a{original} cmp $$b{original} }
+ map { my $x = uc($_); $x =~ s/^$NAME_SPACE\_?(.*)/$1/i; { criteria => $x, original => $_, short => $1 } }
+ keys %apiindex) {
+
diff --git a/gtk-doc.changes b/gtk-doc.changes
index e06e04a..2e4b329 100644
--- a/gtk-doc.changes
+++ b/gtk-doc.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Tue Feb 3 16:54:32 UTC 2015 - coolo@suse.com
+
+- add gtk-doc-reproducible-html.patch from the debian
+ reproducible builds project to make output reproducible
+
-------------------------------------------------------------------
Thu Jul 17 19:13:43 UTC 2014 - zaitor@opensuse.org
diff --git a/gtk-doc.spec b/gtk-doc.spec
index bf8bd50..567de22 100644
--- a/gtk-doc.spec
+++ b/gtk-doc.spec
@@ -1,7 +1,7 @@
#
# spec file for package gtk-doc
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@ Url: http://www.gtk.org/gtk-doc/
Source: http://download.gnome.org/sources/gtk-doc/1.21/%{name}-%{version}.tar.xz
# When updating this package, please don't forget to update the gtk-doc.m4 Source
# in glib2.
+# PATCH-FIX-UPSTREAM sort the HTML entries
+Patch0: http://2k38.be/gtk-doc-reproducible-html.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxml2-tools
BuildRequires: libxslt