[python-msgpack] fix build on big endian arches

Dan Horák sharkcz at fedoraproject.org
Tue Jul 12 12:56:26 UTC 2011


commit 0b8c8ac03e24df873a0324fca0221e6ba68e6ee7
Author: Dan Horák <dan at danny.cz>
Date:   Tue Jul 12 14:56:00 2011 +0200

    fix build on big endian arches

 msgpack-python-0.1.9-endian.patch |   12 ++++++++++++
 python-msgpack.spec               |    7 ++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/msgpack-python-0.1.9-endian.patch b/msgpack-python-0.1.9-endian.patch
new file mode 100644
index 0000000..bdd6c40
--- /dev/null
+++ b/msgpack-python-0.1.9-endian.patch
@@ -0,0 +1,12 @@
+diff -up msgpack-python-0.1.9/msgpack/pack_template.h.endian msgpack-python-0.1.9/msgpack/pack_template.h
+--- msgpack-python-0.1.9/msgpack/pack_template.h.endian	2011-07-12 14:37:47.000000000 +0200
++++ msgpack-python-0.1.9/msgpack/pack_template.h	2011-07-12 14:38:10.000000000 +0200
+@@ -21,7 +21,7 @@
+ #define TAKE8_16(d) ((uint8_t*)&d)[0]
+ #define TAKE8_32(d) ((uint8_t*)&d)[0]
+ #define TAKE8_64(d) ((uint8_t*)&d)[0]
+-#elif __BIG_ENDIAN__
++#else /* __BIG_ENDIAN__ */
+ #define TAKE8_8(d)  ((uint8_t*)&d)[0]
+ #define TAKE8_16(d) ((uint8_t*)&d)[1]
+ #define TAKE8_32(d) ((uint8_t*)&d)[3]
diff --git a/python-msgpack.spec b/python-msgpack.spec
index f961e27..0caa788 100644
--- a/python-msgpack.spec
+++ b/python-msgpack.spec
@@ -6,13 +6,14 @@
 
 Name:           python-%{srcname}
 Version:        0.1.9
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A Python MessagePack (de)serializer
 
 Group:          Development/Languages
 License:        ASL 2.0
 URL:            http://pypi.python.org/pypi/msgpack-python/
 Source0:        http://pypi.python.org/packages/source/m/%{srcname}-python/%{srcname}-python-%{version}.tar.gz
+Patch0:         msgpack-python-0.1.9-endian.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 
@@ -35,6 +36,7 @@ This is a Python (de)serializer for MessagePack.
 
 %prep
 %setup -q -n %{srcname}-python-%{version}
+%patch0 -p1 -b .endian
 
 
 %build
@@ -62,6 +64,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Tue Jul 12 2011 Dan Horák <dan[at]danny.cz> - 0.1.9-3
+- fix build on big endian arches
+
 * Fri Jun 24 2011 Fabian Affolter <fabian at bernewireless.net> - 0.1.9-2
 - Tests are failing, they are not active at the moment
 - Filtering added


More information about the scm-commits mailing list