void-packages/srcpkgs/sword/patches/ppc64.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```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

22 lines
710 B
Diff

From: Daniel Glassey <wdg@debian.org>
Date: Sat, 3 Nov 2018 13:34:07 +0700
Subject: powerpc64 can define __s64 differently
Index: sword/include/sysdata.h
===================================================================
--- a/include/sysdata.h
+++ b/include/sysdata.h
@@ -42,8 +42,13 @@ typedef unsigned int __u32;
#ifdef OS_ANDROID
#elif defined(__GNUC__)
+ #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__)
+ typedef __signed__ long __s64;
+ typedef unsigned long __u64;
+ #else
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
+ #endif
#elif defined(__BORLANDC__)
typedef signed __int64 __s64;
typedef unsigned __int64 __u64;