void-packages/srcpkgs/jsonnet/patches/Makefile.patch
Đoàn Trần Công Danh 1a06b0d5d7 srcpkgs/j*: 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

17 lines
517 B
Diff

--- a/Makefile 2020-02-09 23:22:27.000000000 +0100
+++ b/Makefile 2020-02-14 14:14:31.131124997 +0100
@@ -127,11 +127,11 @@
install: bins libs
mkdir -p $(DESTDIR)$(PREFIX)/bin
- cp $(BINS) $(DESTDIR)$(PREFIX)/bin/
+ cp -P $(BINS) $(DESTDIR)$(PREFIX)/bin/
mkdir -p $(DESTDIR)$(PREFIX)/lib
- cp $(LIBS) $(DESTDIR)$(PREFIX)/lib/
+ cp -P $(LIBS) $(DESTDIR)$(PREFIX)/lib/
mkdir -p $(DESTDIR)$(PREFIX)/include
- cp $(INCS) $(DESTDIR)$(PREFIX)/include/
+ cp -P $(INCS) $(DESTDIR)$(PREFIX)/include/
all: $(ALL)