* 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
```
21 lines
512 B
Diff
21 lines
512 B
Diff
--- a/src/common.c 2018-06-21 23:29:12.238999543 +0200
|
|
+++ b/src/common.c 2018-06-21 23:30:28.347795214 +0200
|
|
@@ -34,7 +34,7 @@
|
|
#include <time.h>
|
|
#include <limits.h>
|
|
|
|
-#ifdef HAVE_EXECINFO_H
|
|
+#if defined(HAVE_EXECINFO_H) && defined(__GLIBC__)
|
|
#include <execinfo.h>
|
|
#endif
|
|
|
|
@@ -567,7 +567,7 @@
|
|
|
|
int format_stacktrace(char *buffer, int bufsize)
|
|
{
|
|
-#ifdef HAVE_EXECINFO_H
|
|
+#if defined(HAVE_EXECINFO_H) && defined(__GLIBC__)
|
|
const int stack_depth=20;
|
|
void *temp[stack_depth];
|
|
char **strings;
|