[oe] [meta-gnome][PATCH 2/6] nautilus: Fix build with gdx-pixbuf >= to 2.36.11

Khem Raj raj.khem at gmail.com
Sun May 6 06:18:00 UTC 2018


OE-Core has updates to 2.36.11, so we have to replace
obsolete API uses

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...ome-desktop-thumbnail-API-with-new-g.patch | 40 +++++++++++++++++++
 .../recipes-gnome/nautilus/nautilus_3.18.5.bb | 10 +++--
 2 files changed, 47 insertions(+), 3 deletions(-)
 create mode 100644 meta-gnome/recipes-gnome/nautilus/nautilus/0001-nautilus-drop-gnome-desktop-thumbnail-API-with-new-g.patch

diff --git a/meta-gnome/recipes-gnome/nautilus/nautilus/0001-nautilus-drop-gnome-desktop-thumbnail-API-with-new-g.patch b/meta-gnome/recipes-gnome/nautilus/nautilus/0001-nautilus-drop-gnome-desktop-thumbnail-API-with-new-g.patch
new file mode 100644
index 000000000..f19eb4979
--- /dev/null
+++ b/meta-gnome/recipes-gnome/nautilus/nautilus/0001-nautilus-drop-gnome-desktop-thumbnail-API-with-new-g.patch
@@ -0,0 +1,40 @@
+From a4ed38e95cbe07f02028249b8b315565a5ac1e43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sat, 5 May 2018 22:32:45 -0700
+Subject: [PATCH] nautilus: drop gnome-desktop thumbnail API with new
+ gdk-pixbuf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If gdk-pixbuf >= 2.36.5 is available, its scaling API can do what we
+want, so we don’t need to use the deprecated gnome-desktop one.
+
+Also fixes compile errors seen on master
+nautilus-properties-window.c:5101: undefined reference to `gnome_desktop_thumbnail_scale_down_pixbuf'
+
+Upstream-Status: Backport
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/nautilus-properties-window.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
+index dea8b0f..fad9bd1 100644
+--- a/src/nautilus-properties-window.c
++++ b/src/nautilus-properties-window.c
+@@ -5098,10 +5098,11 @@ update_preview_callback (GtkFileChooser *icon_chooser,
+ 			scale = (double)gdk_pixbuf_get_height (pixbuf) /
+ 				gdk_pixbuf_get_width (pixbuf);
+ 
+-			scaled_pixbuf = gnome_desktop_thumbnail_scale_down_pixbuf
++			scaled_pixbuf = gdk_pixbuf_scale_simple
+ 				(pixbuf,
+ 				 PREVIEW_IMAGE_WIDTH,
+-				 scale * PREVIEW_IMAGE_WIDTH);
++				 scale * PREVIEW_IMAGE_WIDTH,
++				 GDK_INTERP_HYPER);
+ 			g_object_unref (pixbuf);
+ 			pixbuf = scaled_pixbuf;
+ 		}
diff --git a/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb b/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb
index 8fdbf6ac2..bdb2f3c88 100644
--- a/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb
+++ b/meta-gnome/recipes-gnome/nautilus/nautilus_3.18.5.bb
@@ -6,14 +6,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=36cf660aea2b8beffba7945f44a7e748 \
                     file://COPYING.EXTENSIONS;md5=7579d6678402a1868631bf82c93ff0d4 \
                     file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
 
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/nautilus/3.18/nautilus-${PV}.tar.xz"
+inherit distro_features_check autotools pkgconfig gobject-introspection
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/nautilus/${MAJ_VER}/nautilus-${PV}.tar.xz \
+           file://0001-nautilus-drop-gnome-desktop-thumbnail-API-with-new-g.patch \
+           "
 
 SRC_URI[md5sum] = "0f578bda5655c0ce204befafca5803d7"
 SRC_URI[sha256sum] = "60a927c0522b4cced9d8f62baed2ee5e2fd4305be4523eb5bc44805971a6cc15"
 
 DEPENDS = "gtk+3 gnome-desktop3 gsettings-desktop-schemas glib-2.0-native intltool-native pango"
 
-inherit distro_features_check autotools pkgconfig gobject-introspection
 REQUIRED_DISTRO_FEATURES = "x11"
 
 EXTRA_OECONF = " \
@@ -23,7 +27,7 @@ EXTRA_OECONF = " \
     --enable-tracker=no \
     --disable-schemas-compile \
     --enable-xmp=no \
-    --enable-libexif=no \ 
+    --enable-libexif=no \
 "
 
 FILES_${PN} += "${datadir}/*"
-- 
2.17.0




More information about the Openembedded-devel mailing list