void-packages/srcpkgs/par2cmdline/patches/avoid-corrupt-files-in-wrkdir.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* 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
```
2021-06-20 13:17:29 +07:00

25 lines
645 B
Diff

From 2d94e1e2aa8a927b00b666f1091cb2344d754f06 Mon Sep 17 00:00:00 2001
From: BlackEagle <ike.devolder@gmail.com>
Date: Sat, 6 Jan 2018 23:08:53 +0100
Subject: [PATCH] Add .DELETE_ON_ERROR to avoid corrupt files in workdir
@see http://rdiez.shoutwiki.com/wiki/GNU_Make_and_Autotools#.DELETE_ON_ERROR_is_a_must
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
---
Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git Makefile.am Makefile.am
index f404fd0..64ed9d2 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,8 @@
AUTOMAKE_OPTIONS = subdir-objects
+.DELETE_ON_ERROR:
+
bin_PROGRAMS = par2
man_MANS = man/par2.1