r44838 - in /packages/openturns/trunk/debian/patches: bigendian-randomgenerator.patch series
barbier-guest at users.alioth.debian.org
barbier-guest at users.alioth.debian.org
Sat May 19 17:30:04 UTC 2012
Author: barbier-guest
Date: Sat May 19 17:30:03 2012
New Revision: 44838
URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=44838
Log:
New patch: bigendian-randomgenerator.patch
Fix t_RandomGenerator_std unit test. It fails on PowerPC because of endianness.
Added:
packages/openturns/trunk/debian/patches/bigendian-randomgenerator.patch
Modified:
packages/openturns/trunk/debian/patches/series
Added: packages/openturns/trunk/debian/patches/bigendian-randomgenerator.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/openturns/trunk/debian/patches/bigendian-randomgenerator.patch?rev=44838&op=file
==============================================================================
--- packages/openturns/trunk/debian/patches/bigendian-randomgenerator.patch (added)
+++ packages/openturns/trunk/debian/patches/bigendian-randomgenerator.patch Sat May 19 17:30:03 2012
@@ -1,0 +1,48 @@
+Description: Fix t_RandomGenerator_std unit test.
+ It fails on PowerPC because of endianness.
+Author: Denis Barbier <bouzim at gmail.com>
+
+---
+
+Origin: Debian
+Forwarded: no
+Last-Update: 2012-05-19
+
+--- openturns-1.0.orig/lib/src/Base/Stat/dsfmt.h
++++ openturns-1.0/lib/src/Base/Stat/dsfmt.h
+@@ -78,10 +78,17 @@ namespace tutils
+ {
+ uint32_t words[4];
+ memcpy(&words[0], &u_[i], 16);
++#ifdef __BIG_ENDIAN__
++ state[4 * i ] = words[1];
++ state[4 * i + 1] = words[0];
++ state[4 * i + 2] = words[3];
++ state[4 * i + 3] = words[2];
++#else
+ state[4 * i ] = words[0];
+ state[4 * i + 1] = words[1];
+ state[4 * i + 2] = words[2];
+ state[4 * i + 3] = words[3];
++#endif
+ }
+ }
+
+@@ -91,10 +98,17 @@ namespace tutils
+ for (OT::UnsignedLong i = 0; i <= (uint32_t)(N); i++)
+ {
+ uint32_t words[4];
++#ifdef __BIG_ENDIAN__
++ words[1] = (uint32_t)(state[4 * i ]);
++ words[0] = (uint32_t)(state[4 * i + 1]);
++ words[3] = (uint32_t)(state[4 * i + 2]);
++ words[2] = (uint32_t)(state[4 * i + 3]);
++#else
+ words[0] = (uint32_t)(state[4 * i ]);
+ words[1] = (uint32_t)(state[4 * i + 1]);
+ words[2] = (uint32_t)(state[4 * i + 2]);
+ words[3] = (uint32_t)(state[4 * i + 3]);
++#endif
+ memcpy(&u_[i], &words[0], 16);
+ }
+ }
Modified: packages/openturns/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/openturns/trunk/debian/patches/series?rev=44838&op=diff
==============================================================================
--- packages/openturns/trunk/debian/patches/series (original)
+++ packages/openturns/trunk/debian/patches/series Sat May 19 17:30:03 2012
@@ -6,6 +6,7 @@
ftbfs-4.7.patch
cmake-configdir.patch
no-link-python.patch
+bigendian-randomgenerator.patch
installcheck.patch
disable-test-wrapper.patch
debian-soname.patch
More information about the debian-science-commits
mailing list