```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
```
26 lines
814 B
Diff
26 lines
814 B
Diff
From 0ce8ef86e8bfc872b40bc090fea9873fa1f51836 Mon Sep 17 00:00:00 2001
|
|
From: q66 <daniel@octaforge.org>
|
|
Date: Thu, 21 Jan 2021 22:22:28 +0100
|
|
Subject: [PATCH] fix ppc64 arch tuple
|
|
|
|
---
|
|
src/basic/architecture.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git src/basic/architecture.h src/basic/architecture.h
|
|
index 620b522..3ea6e52 100644
|
|
--- a/src/basic/architecture.h
|
|
+++ b/src/basic/architecture.h
|
|
@@ -77,7 +77,7 @@ int uname_architecture(void);
|
|
#elif defined(__powerpc64__)
|
|
# if __BYTE_ORDER == __BIG_ENDIAN
|
|
# define native_architecture() ARCHITECTURE_PPC64
|
|
-# define LIB_ARCH_TUPLE "ppc64-linux-gnu"
|
|
+# define LIB_ARCH_TUPLE "powerpc64-linux-gnu"
|
|
# define SECONDARY_ARCHITECTURE ARCHITECTURE_PPC
|
|
# else
|
|
# define native_architecture() ARCHITECTURE_PPC64_LE
|
|
--
|
|
2.30.0
|
|
|