[SCM] inkscape/master: Add patch to fix cursor colors when running in a Big Endian systems
mattia at users.alioth.debian.org
mattia at users.alioth.debian.org
Mon Nov 7 17:21:55 UTC 2016
The following commit has been merged in the master branch:
commit 0be84125610e178c2e68fbc03f13ed88128a9d32
Author: Mattia Rizzolo <mattia at debian.org>
Date: Mon Nov 7 17:09:09 2016 +0000
Add patch to fix cursor colors when running in a Big Endian systems
Thanks: Steven Gawroriski <steven at multiphasicapps.net> for the patch
Closes: #841853
diff --git a/debian/patches/fix-cursor-color-in-BE.patch b/debian/patches/fix-cursor-color-in-BE.patch
new file mode 100644
index 0000000..07cdc9d
--- /dev/null
+++ b/debian/patches/fix-cursor-color-in-BE.patch
@@ -0,0 +1,27 @@
+Description: Swap before return sp_cursor_pixbuf_from_xpm on big endian
+ This byte swaps before the return in sp_cursor_pixbuf_from_xpm on big
+ endian systems so that the cursor is made visible on these systems.
+Author: Steven Gawroriski <steven at multiphasicapps.net>
+Forwarded: yes, and applied
+ https://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15155
+ https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15221
+Bug: https://bugs.launchpad.net/inkscape/+bug/1639611
+Bug-Debian: https://bugs.debian.org/841853
+
+--- a/src/sp-cursor.cpp
++++ b/src/sp-cursor.cpp
+@@ -106,6 +106,14 @@
+ pixmap_buffer[y * width + x] = (it == colorMap.end()) ? 0u : it->second;
+ }
+ }
++
++#if G_BYTE_ORDER == G_BIG_ENDIAN
++ for (int i = 0, n = width * height; i < n; i++)
++ {
++ guint32 v = pixmap_buffer[i];
++ pixmap_buffer[i] = ((v & 0xFF) << 24) | (((v >> 8) & 0xFF) << 16) | (((v >> 16) & 0xFF) << 8) | ((v >> 24) & 0xFF);
++ }
++#endif
+
+ return gdk_pixbuf_new_from_data(reinterpret_cast<guchar*>(pixmap_buffer), GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), free_cursor_data, NULL);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c72bd79..1129c8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
fix-FTBFS.patch
reproducible-build.patch
fix-FTBFS-with-gcc6.patch
+fix-cursor-color-in-BE.patch
--
inkscape packaging
More information about the pkg-multimedia-commits
mailing list