void-packages/srcpkgs/mc/patches/xbps.patch
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

13 lines
395 B
Diff

--- a/misc/mc.ext.in 2017-08-21 19:28:49.638411103 +0200
+++ b/misc/mc.ext.in 2017-08-21 19:38:05.633602005 +0200
@@ -145,8 +145,8 @@
Open=%cd %p/utar://
View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz4
-# .tar.xz, .txz
-regex/\.t(ar\.xz|xz)$
+# .tar.xz, .txz, .xbps
+regex/\.(t(ar\.xz|xz)|xbps)$
Open=%cd %p/utar://
View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz