void-packages/srcpkgs/u2f-hidraw-policy/patches/Makefile.patch
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: convert patches to -Np1
```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

11 lines
381 B
Diff

--- a/Makefile 2015-10-30 14:48:49.000000000 -0400
+++ b/Makefile.bck 2016-08-16 18:38:41.989106570 -0400
@@ -3,7 +3,7 @@
CFLAGS := -O2 -Wall
u2f_hidraw_id: u2f_hidraw_id.c
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $^ `pkg-config --cflags --libs libudev`
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $^ `pkg-config --cflags --libs libudev` $(LDFLAGS)
.PHONY: install
install: all