void-packages/srcpkgs/python3-pykeepass/patches/be.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

28 lines
785 B
Diff

From fcabf9640d0426d01411681d7d1b74db6f3292e0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 11 Feb 2021 02:14:36 +0100
Subject: [PATCH] fix big endian support
---
pykeepass/kdbx_parsing/pytwofish.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git pykeepass/kdbx_parsing/pytwofish.py pykeepass/kdbx_parsing/pytwofish.py
index 7cea419..4749d72 100644
--- a/pykeepass/kdbx_parsing/pytwofish.py
+++ b/pykeepass/kdbx_parsing/pytwofish.py
@@ -140,8 +140,9 @@ import struct
import sys
WORD_BIGENDIAN = 0
-if sys.byteorder == 'big':
- WORD_BIGENDIAN = 1
+# this actually breaks the implementation
+#if sys.byteorder == 'big':
+# WORD_BIGENDIAN = 1
def rotr32(x, n):
return (x >> n) | ((x << (32 - n)) & 0xFFFFFFFF)
--
2.30.0