861ac185a6
```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 ```
15 lines
371 B
Diff
15 lines
371 B
Diff
For musl libc declare a macro version of basename(3).
|
|
|
|
--- a/src/core/sysfs.cc 2016-05-07 05:36:45.771620396 +0200
|
|
+++ b/src/core/sysfs.cc 2016-05-07 05:37:33.265617827 +0200
|
|
@@ -19,6 +19,10 @@
|
|
|
|
__ID("@(#) $Id$");
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
|
|
+#endif
|
|
+
|
|
using namespace sysfs;
|
|
|
|
struct sysfs::entry_i
|