void-packages/srcpkgs/hitch/patches/cross-compile.diff
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: 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

12 lines
315 B
Diff

--- a/hitch.m4
+++ b/hitch.m4
@@ -24,7 +24,7 @@
AC_MSG_CHECKING([whether the compiler accepts $2])
hitch_save_CFLAGS=$CFLAGS
CFLAGS="[$]$1 $2 $CFLAGS"
- AC_RUN_IFELSE(
+ AC_LINK_IFELSE(
[AC_LANG_SOURCE([int main(void) { return (0); }])],
[AC_MSG_RESULT([yes]); $1="[$]$1 $2"],
[AC_MSG_RESULT([no])])