void-packages/srcpkgs/zabbix/patches/fix-libxml2_m4.patch
Đoàn Trần Công Danh e2a21ccfd6 srcpkgs/z*: 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
363 B
Diff

--- a/m4/libxml2.m4 2020-05-10 19:36:06.000000000 +0200
+++ b/m4/libxml2.m4 2020-07-24 07:58:12.642619506 +0200
@@ -52,7 +52,7 @@
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
PKG_PROG_PKG_CONFIG()
- if test -x "$PKG_CONFIG"; then
+ if test -x $(which "$PKG_CONFIG"); then
LIBXML2_CFLAGS="`$PKG_CONFIG --cflags libxml-2.0`"