diff --git a/openigtlink-fix_byte_order.patch b/openigtlink-fix_byte_order.patch new file mode 100644 index 0000000..cf25611 --- /dev/null +++ b/openigtlink-fix_byte_order.patch @@ -0,0 +1,28 @@ +diff --git a/Source/igtlutil/igtl_polydata.c b/Source/igtlutil/igtl_polydata.c +index 62557e7..ca6b585 100644 +--- a/Source/igtlutil/igtl_polydata.c ++++ b/Source/igtlutil/igtl_polydata.c +@@ -442,12 +442,19 @@ int igtl_export igtl_polydata_unpack(int type, void * byte_array, igtl_polydata_ + ptr32_dst = (igtl_uint32*)info->attributes[i].data; + ptr32_src = (igtl_uint32*)ptr; + ptr32_src_end = ptr32_src + n; +- while (ptr32_src < ptr32_src_end) ++ if (igtl_is_little_endian()) ++ { ++ while (ptr32_src < ptr32_src_end) + { +- *ptr32_dst = BYTE_SWAP_INT32(*ptr32_src); +- ptr32_dst ++; +- ptr32_src ++; ++ *ptr32_dst = BYTE_SWAP_INT32(*ptr32_src); ++ ptr32_dst ++; ++ ptr32_src ++; + } ++ } ++ else ++ { ++ memcpy(ptr32_dst, ptr32_src, s); ++ } + ptr += s; + } + diff --git a/openigtlink.spec b/openigtlink.spec index b2b5c4a..4614d67 100644 --- a/openigtlink.spec +++ b/openigtlink.spec @@ -3,7 +3,7 @@ Name: openigtlink Version: 2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Implementation of the OpenIGTLink network communication protocol License: BSD @@ -13,11 +13,12 @@ Source0: https://github.com/openigtlink/OpenIGTLink/archive/v%{version}.tar.gz#/ # upstream bug #120 Patch0: openigtlink-remove_broken_code.patch +# patch from upsream +Patch1: openigtlink-fix_byte_order.patch + BuildRequires: gcc-c++ BuildRequires: cmake -# bug #1427300 -ExcludeArch: ppc64 %description OpenIGTLink is a network communication protocol specifically designed and @@ -96,6 +97,9 @@ popd %changelog +* Sun Mar 12 2017 Dmitry Mikhirev 2.0-2 +- Fix test failure on ppc64 and re-enable build on ppc64 #1427300 + * Wed Feb 22 2017 Dmitry Mikhirev 2.0-1 - Update to 2.0 release - Fix FTBFS #1424021