Fix build with newer gnome-desktop3
This commit is contained in:
parent
bd5c5fb738
commit
a92b602627
|
@ -0,0 +1,57 @@
|
||||||
|
From 0e7749ba0bfac7e72c19841afcbebb10851533b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bastien Nocera <hadess@hadess.net>
|
||||||
|
Date: Fri, 14 Jul 2017 11:41:38 +0200
|
||||||
|
Subject: [PATCH] thumbnail: Remove use of obsolete gnome-desktop-thumbnail
|
||||||
|
helper
|
||||||
|
|
||||||
|
gnome_desktop_thumbnail_scale_down_pixbuf() is obsolete now that
|
||||||
|
gdk-pixbuf doesn't have the same bugs when shrinking images by large
|
||||||
|
factors.
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=784942
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
src/xviewer-thumbnail.c | 9 +++++----
|
||||||
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index e991fd035..763fef2dd 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -88,7 +88,7 @@
|
||||||
|
GTK_REQUIRED=3.10.0
|
||||||
|
GLIB_REQUIRED=2.38.0
|
||||||
|
GNOME_DESKTOP_REQUIRED=2.91.2
|
||||||
|
-GDKPIXBUF_REQUIRED=2.4.0
|
||||||
|
+GDKPIXBUF_REQUIRED=2.36.5
|
||||||
|
GTK_PRINT_REQUIRED=3.5.4
|
||||||
|
SHARED_MIME_INFO_REQUIRED=0.20
|
||||||
|
EXEMPI_REQUIRED=1.99.5
|
||||||
|
|
||||||
|
diff --git a/src/xviewer-thumbnail.c b/src/xviewer-thumbnail.c
|
||||||
|
index 2e9fdd02c..2cc6fdf07 100644
|
||||||
|
--- a/src/xviewer-thumbnail.c
|
||||||
|
+++ b/src/xviewer-thumbnail.c
|
||||||
|
@@ -123,9 +123,10 @@ create_thumbnail_from_pixbuf (EogThumbData *data,
|
||||||
|
|
||||||
|
perc = CLAMP (128.0/(MAX (width, height)), 0, 1);
|
||||||
|
|
||||||
|
- thumb = gnome_desktop_thumbnail_scale_down_pixbuf (pixbuf,
|
||||||
|
- width*perc,
|
||||||
|
- height*perc);
|
||||||
|
+ thumb = gdk_pixbuf_scale_simple (pixbuf,
|
||||||
|
+ width*perc,
|
||||||
|
+ height*perc,
|
||||||
|
+ GDK_INTERP_HYPER);
|
||||||
|
|
||||||
|
return thumb;
|
||||||
|
}
|
||||||
|
@@ -444,7 +445,7 @@ eog_thumbnail_fit_to_size (GdkPixbuf *thumbnail, gint dimension)
|
||||||
|
width = MAX (width * factor, 1);
|
||||||
|
height = MAX (height * factor, 1);
|
||||||
|
|
||||||
|
- result_pixbuf = gnome_desktop_thumbnail_scale_down_pixbuf (thumbnail, width, height);
|
||||||
|
+ result_pixbuf = gdk_pixbuf_scale_simple (thumbnail, width, height, GDK_INTERP_HYPER);
|
||||||
|
|
||||||
|
return result_pixbuf;
|
||||||
|
}
|
29
xviewer.spec
29
xviewer.spec
|
@ -7,12 +7,13 @@
|
||||||
|
|
||||||
Name: xviewer
|
Name: xviewer
|
||||||
Version: 1.6.0
|
Version: 1.6.0
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: Fast and functional graphics viewer
|
Summary: Fast and functional graphics viewer
|
||||||
|
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
Url: https://github.com/linuxmint/%{name}
|
Url: https://github.com/linuxmint/%{name}
|
||||||
Source: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: Remove_obsolete_gnome-desktop-thumbnail.patch
|
||||||
|
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: libappstream-glib
|
BuildRequires: libappstream-glib
|
||||||
|
@ -113,31 +114,23 @@ NOCONFIGURE=1 %{_bindir}/gnome-autogen.sh
|
||||||
%{buildroot}%{_datadir}/appdata/*.appdata.xml
|
%{buildroot}%{_datadir}/appdata/*.appdata.xml
|
||||||
|
|
||||||
|
|
||||||
|
%if (0%{?rhel} && 0%{?rhel <= 7})
|
||||||
%post
|
%post
|
||||||
/bin/touch %{_datadir}/icons/hicolor >&/dev/null || :
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
%if (0%{?fedora} && 0%{?fedora} <=24) || (0%{?rhel} && 0%{?rhel} <= 7)
|
|
||||||
%{_bindir}/update-desktop-database >&/dev/null || :
|
%{_bindir}/update-desktop-database >&/dev/null || :
|
||||||
%endif # (0%%{?fedora} && 0%%{?fedora} <=24) || (0%%{?rhel} && 0%%{?rhel} <= 7)
|
|
||||||
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ $1 -eq 0 ]; then
|
|
||||||
/bin/touch --no-create %{_datadir}/icons/hicolor >&/dev/null || :
|
|
||||||
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
|
|
||||||
fi
|
|
||||||
%if (0%{?fedora} && 0%{?fedora} <=24) || (0%{?rhel} && 0%{?rhel} <= 7)
|
|
||||||
%{_bindir}/update-desktop-database >&/dev/null || :
|
%{_bindir}/update-desktop-database >&/dev/null || :
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
||||||
|
%{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
fi
|
fi
|
||||||
%endif # (0%%{?fedora} && 0%%{?fedora} <=24) || (0%%{?rhel} && 0%%{?rhel} <= 7)
|
|
||||||
|
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
|
|
||||||
%if (0%{?fedora} && 0%{?fedora} <=24) || (0%{?rhel} && 0%{?rhel} <= 7)
|
|
||||||
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
||||||
%endif # (0%%{?fedora} && 0%%{?fedora} <=24) || (0%%{?rhel} && 0%%{?rhel} <= 7)
|
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
|
@ -171,6 +164,10 @@ fi
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 20 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.6.0-7
|
||||||
|
- Fix build with newer gnome-desktop3
|
||||||
|
- Fix scriplets
|
||||||
|
|
||||||
* Sun Feb 11 2018 Björn Esser <besser82@fedoraproject.org> - 1.6.0-6
|
* Sun Feb 11 2018 Björn Esser <besser82@fedoraproject.org> - 1.6.0-6
|
||||||
- Rebuilt for gnome-desktop3
|
- Rebuilt for gnome-desktop3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue