[gtk-vnc] gtk-vnc-0.5.1-bigendian.patch: Fix pixel swizzling on big-endian.

Adam Jackson ajax at fedoraproject.org
Mon Dec 10 19:55:50 UTC 2012


commit ea7de7367a54a8fc6a86d37b69234a37cc382424
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 10 14:55:46 2012 -0500

    gtk-vnc-0.5.1-bigendian.patch: Fix pixel swizzling on big-endian.

 gtk-vnc-0.5.1-bigendian.patch |   25 +++++++++++++++++++++++++
 gtk-vnc.spec                  |   10 +++++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/gtk-vnc-0.5.1-bigendian.patch b/gtk-vnc-0.5.1-bigendian.patch
new file mode 100644
index 0000000..7961fd9
--- /dev/null
+++ b/gtk-vnc-0.5.1-bigendian.patch
@@ -0,0 +1,25 @@
+From 4b3a6e84bd1a1bc85feafbd6ce64c3af4b29c903 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Mon, 03 Dec 2012 18:37:38 +0000
+Subject: cairo: Fix framebuffer setup on big-endian
+
+Without this, big-endian machines would over-swizzle.
+
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+---
+diff --git a/src/vnccairoframebuffer.c b/src/vnccairoframebuffer.c
+index ae61ded..75cf7d9 100644
+--- a/src/vnccairoframebuffer.c
++++ b/src/vnccairoframebuffer.c
+@@ -142,8 +142,7 @@ VncCairoFramebuffer *vnc_cairo_framebuffer_new(guint16 width, guint16 height,
+     localFormat.blue_shift = 0;
+     localFormat.depth = 32;
+     localFormat.bits_per_pixel = 32;
+-    /* XXX is cairo native endian ? */
+-    localFormat.byte_order = G_LITTLE_ENDIAN;
++    localFormat.byte_order = G_BYTE_ORDER;
+ 
+     pixels = cairo_image_surface_get_data(surface);
+ 
+--
+cgit v0.9.0.2
diff --git a/gtk-vnc.spec b/gtk-vnc.spec
index 3df9b3c..d164460 100644
--- a/gtk-vnc.spec
+++ b/gtk-vnc.spec
@@ -24,7 +24,7 @@
 Summary: A GTK2 widget for VNC clients
 Name: gtk-vnc
 Version: 0.5.1
-Release: 4%{?dist}%{?extra_release}
+Release: 5%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.xz
@@ -57,6 +57,8 @@ BuildRequires: vala-tools
 BuildRequires: pulseaudio-libs-devel
 %endif
 
+Patch0: gtk-vnc-0.5.1-bigendian.patch
+
 %description
 gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines
 allowing it to be completely asynchronous while remaining single threaded.
@@ -178,6 +180,9 @@ Libraries, includes, etc. to compile with the gtk-vnc library
 
 %prep
 %setup -q -n gtk-vnc-%{version} -c
+pushd gtk-vnc-%{version}
+%patch0 -p1 -b .bigendian
+popd
 %if %{with_gtk3}
 cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
 %endif
@@ -362,6 +367,9 @@ rm -fr %{buildroot}
 %endif
 
 %changelog
+* Mon Dec 10 2012 Adam Jackson <ajax at redhat.com> 0.5.1-5
+- gtk-vnc-0.5.1-bigendian.patch: Fix pixel swizzling on big-endian.
+
 * Tue Sep  4 2012 Daniel P. Berrange <berrange at redhat.com> - 0.5.1-4
 - Add missing deps on gvnc (rhbz #852053)
 


More information about the scm-commits mailing list