From 3fd4f1b5b5930b4da68e872026d77eba67c77711 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 26 Jul 2017 20:15:24 +0200 Subject: [PATCH] Backport a patch to fix ico quality sorting --- 0001-ico-Fix-icon-quality-sorting.patch | 32 +++++++++++++++++++++++++ gdk-pixbuf2.spec | 8 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0001-ico-Fix-icon-quality-sorting.patch diff --git a/0001-ico-Fix-icon-quality-sorting.patch b/0001-ico-Fix-icon-quality-sorting.patch new file mode 100644 index 0000000..e2cb2e9 --- /dev/null +++ b/0001-ico-Fix-icon-quality-sorting.patch @@ -0,0 +1,32 @@ +From d6a0233a331a957615ba0dd7fa569fb496e3caf2 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 26 Jul 2017 15:57:10 +0200 +Subject: [PATCH] ico: Fix icon quality sorting + +Despite the inherited comment, commit 99508c7 sorted the icons by +increasing instead of decreasing quality. + +https://bugzilla.gnome.org/show_bug.cgi?id=785447 +--- + gdk-pixbuf/io-ico.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c +index 12f0a58802..5b3646cb3d 100644 +--- a/gdk-pixbuf/io-ico.c ++++ b/gdk-pixbuf/io-ico.c +@@ -203,9 +203,9 @@ compare_direntry_scores (gconstpointer a, + const struct ico_direntry_data *ib = b; + + /* Backwards, so largest first */ +- if (ib->ImageScore > ia->ImageScore) ++ if (ib->ImageScore < ia->ImageScore) + return -1; +- else if (ib->ImageScore < ia->ImageScore) ++ else if (ib->ImageScore > ia->ImageScore) + return 1; + return 0; + } +-- +2.13.0 + diff --git a/gdk-pixbuf2.spec b/gdk-pixbuf2.spec index 9d4132e..72998c5 100644 --- a/gdk-pixbuf2.spec +++ b/gdk-pixbuf2.spec @@ -2,7 +2,7 @@ Name: gdk-pixbuf2 Version: 2.36.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: An image loading library License: LGPLv2+ @@ -10,6 +10,9 @@ URL: http://www.gtk.org #VCS: git:git://git.gnome.org/gdk-pixbuf Source0: http://download.gnome.org/sources/gdk-pixbuf/2.36/gdk-pixbuf-%{version}.tar.xz +# Backported from upstream +Patch0: 0001-ico-Fix-icon-quality-sorting.patch + BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: libpng-devel BuildRequires: libjpeg-devel @@ -174,6 +177,9 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache %changelog +* Wed Jul 26 2017 Kalev Lember - 2.36.7-4 +- Backport a patch to fix ico quality sorting + * Wed Jul 26 2017 Fedora Release Engineering - 2.36.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild