[msgpack/el6] - apply upstream fix for big endians

Dan Horák sharkcz at fedoraproject.org
Tue Aug 27 09:18:29 UTC 2013


commit b183c91ba38b59107ab4a7582e77d273a042be27
Author: Dan Horák <dan at danny.cz>
Date:   Tue Aug 27 11:13:55 2013 +0200

    - apply upstream fix for big endians

 msgpack-fix-decode-on-bigendian-systems.patch |   55 +++++++++++++++++++++++++
 msgpack.spec                                  |    9 +++-
 2 files changed, 62 insertions(+), 2 deletions(-)
---
diff --git a/msgpack-fix-decode-on-bigendian-systems.patch b/msgpack-fix-decode-on-bigendian-systems.patch
new file mode 100644
index 0000000..abddf1e
--- /dev/null
+++ b/msgpack-fix-decode-on-bigendian-systems.patch
@@ -0,0 +1,55 @@
+From b8aa93ce30d11d091b339bff0e10ddf3a8d08daf Mon Sep 17 00:00:00 2001
+From: Hideyuki Tanaka <tanaka.hideyuki at gmail.com>
+Date: Thu, 26 Jan 2012 16:38:27 +0900
+Subject: [PATCH] fix decode on bigendian systems
+
+---
+ msgpack/sysdep.h | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/src/msgpack/sysdep.h b/src/msgpack/sysdep.h
+index 0a99de9..4fedbd8 100644
+--- a/src/msgpack/sysdep.h
++++ b/src/msgpack/sysdep.h
+@@ -153,24 +153,24 @@ typedef unsigned int _msgpack_atomic_counter_t;
+ #define _msgpack_be64(x) (x)
+ 
+ #define _msgpack_load16(cast, from) ((cast)( \
+-        (((uint16_t)((uint8_t*)from)[1]) << 8) | \
+-        (((uint16_t)((uint8_t*)from)[0])     ) ))
++        (((uint16_t)((uint8_t*)from)[0]) << 8) | \
++        (((uint16_t)((uint8_t*)from)[1])     ) ))
+ 
+ #define _msgpack_load32(cast, from) ((cast)( \
+-        (((uint32_t)((uint8_t*)from)[3]) << 24) | \
+-        (((uint32_t)((uint8_t*)from)[2]) << 16) | \
+-        (((uint32_t)((uint8_t*)from)[1]) <<  8) | \
+-        (((uint32_t)((uint8_t*)from)[0])      ) ))
++        (((uint32_t)((uint8_t*)from)[0]) << 24) | \
++        (((uint32_t)((uint8_t*)from)[1]) << 16) | \
++        (((uint32_t)((uint8_t*)from)[2]) <<  8) | \
++        (((uint32_t)((uint8_t*)from)[3])      ) ))
+ 
+ #define _msgpack_load64(cast, from) ((cast)( \
+-        (((uint64_t)((uint8_t*)from)[7]) << 56) | \
+-        (((uint64_t)((uint8_t*)from)[6]) << 48) | \
+-        (((uint64_t)((uint8_t*)from)[5]) << 40) | \
+-        (((uint64_t)((uint8_t*)from)[4]) << 32) | \
+-        (((uint64_t)((uint8_t*)from)[3]) << 24) | \
+-        (((uint64_t)((uint8_t*)from)[2]) << 16) | \
+-        (((uint64_t)((uint8_t*)from)[1]) << 8)  | \
+-        (((uint64_t)((uint8_t*)from)[0])     )  ))
++        (((uint64_t)((uint8_t*)from)[0]) << 56) | \
++        (((uint64_t)((uint8_t*)from)[1]) << 48) | \
++        (((uint64_t)((uint8_t*)from)[2]) << 40) | \
++        (((uint64_t)((uint8_t*)from)[3]) << 32) | \
++        (((uint64_t)((uint8_t*)from)[4]) << 24) | \
++        (((uint64_t)((uint8_t*)from)[5]) << 16) | \
++        (((uint64_t)((uint8_t*)from)[6]) << 8)  | \
++        (((uint64_t)((uint8_t*)from)[7])     )  ))
+ #endif
+ 
+ 
+-- 
+1.8.1.4
+
diff --git a/msgpack.spec b/msgpack.spec
index dfcae44..ce541ee 100644
--- a/msgpack.spec
+++ b/msgpack.spec
@@ -1,6 +1,6 @@
 Name:		msgpack
 Version:	0.5.7
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Binary-based efficient object serialization library
 Group:		System Environment/Libraries
 
@@ -8,13 +8,13 @@ License:	ASL 2.0
 URL:		http://msgpack.org
 Source0:	http://msgpack.org/releases/cpp/%{name}-%{version}.tar.gz
 Patch0:		msgpack-gtest-implicit-dso.patch
+Patch1:		msgpack-fix-decode-on-bigendian-systems.patch
 
 # for regenerating configure
 BuildRequires:	libtool
 # for %%check
 BuildRequires:	gtest-devel
 BuildRequires:	zlib-devel
-ExcludeArch:	ppc64
 
 %description
 MessagePack is a binary-based efficient object serialization
@@ -34,6 +34,7 @@ Libraries and header files for %{name}
 %prep
 %setup -q
 %patch0 -p1 -b .gtest-implicit-dso
+%patch1 -p1 -b .big-endian
 
 
 %build
@@ -66,6 +67,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f '{}' ';'
 
 
 %changelog
+* Tue Aug 27 2013 Dan Horák <dan[at]danny.cz> - 0.5.7-5
+- apply upstream fix for big endians
+- drop ExcludeArch
+
 * Thu Apr 18 2013 Daiki Ueno <dueno at redhat.com> - 0.5.7-4
 - add ExcludeArch for ppc64 where %%check fails
 


More information about the scm-commits mailing list