File polib-1.1.0-fix-tests-big-endian.patch of Package python-polib

--- a/polib.py
+++ b/polib.py
@@ -592,7 +592,7 @@ class _BaseFile(list):
         offsets = koffsets + voffsets
 
         output = struct.pack(
-            "Iiiiiii",
+            "<Iiiiiii",
             # Magic number
             MOFile.MAGIC,
             # Version
@@ -607,10 +607,15 @@ class _BaseFile(list):
             0, keystart
 
         )
+        outarr = array.array("i", offsets)
+        # since 0.19.8 msgfmt produces little-endian files by default
+        if sys.byteorder == "big":
+            outarr.byteswap()
+
         if PY3 and sys.version_info.minor > 1:  # python 3.2 or superior
-            output += array.array("i", offsets).tobytes()
+            output += outarr.tobytes()
         else:
-            output += array.array("i", offsets).tostring()
+            output += outarr.tostring()
         output += ids
         output += strs
         return output