c987560802
```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 ```
31 lines
801 B
Diff
31 lines
801 B
Diff
--- a/src/dir.c 2018-12-18 12:11:40.000000000 +0100
|
|
+++ b/src/dir.c 2020-02-27 19:32:00.653813072 +0100
|
|
@@ -31,7 +31,7 @@
|
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
-
|
|
+#define _GNU_SOURCE /* for asprintf(3) */
|
|
#include <errno.h>
|
|
#include <limits.h>
|
|
#include <stdio.h>
|
|
--- a/src/ckmame.c 2018-12-18 12:11:40.000000000 +0100
|
|
+++ b/src/ckmame.c 2020-02-27 19:39:05.451796134 +0100
|
|
@@ -33,6 +33,7 @@
|
|
|
|
#include "config.h"
|
|
|
|
+#define _GNU_SOURCE /* for asprintf(3) */
|
|
#include <signal.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
--- a/src/xmalloc.c 2018-12-18 12:11:40.000000000 +0100
|
|
+++ b/src/xmalloc.c 2020-02-27 19:40:48.957792007 +0100
|
|
@@ -33,6 +33,7 @@
|
|
|
|
#include "config.h"
|
|
|
|
+#define _GNU_SOURCE /* for vasprintf(3) */
|
|
#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|