```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
```
19 lines
811 B
Diff
19 lines
811 B
Diff
--- a/src/tbbmalloc/proxy.cpp 2018-10-17 14:05:31.311723013 +0200
|
|
+++ b/src/tbbmalloc/proxy.cpp 2018-10-17 14:06:32.972726194 +0200
|
|
@@ -28,6 +28,7 @@
|
|
// of aligned_alloc as required by new C++ standard, this makes it hard to
|
|
// redefine aligned_alloc here. However, running on systems with new libc
|
|
// version, it still needs it to be redefined, thus tricking system headers
|
|
+#if defined(__GLIBC__)
|
|
#if defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC
|
|
// tell <cstdlib> that there is no aligned_alloc
|
|
#undef _GLIBCXX_HAVE_ALIGNED_ALLOC
|
|
@@ -37,6 +38,7 @@
|
|
#include <cstdlib>
|
|
#undef aligned_alloc
|
|
#endif // defined(__GLIBC_PREREQ)&&!__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC
|
|
+#endif // defined(__GLIBC__)
|
|
#endif // __linux__ && !__ANDROID__
|
|
|
|
#include "proxy.h"
|