void-packages/srcpkgs/mdocml/patches/cross.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

29 lines
741 B
Diff

--- a/configure
+++ b/configure
@@ -168,14 +168,6 @@
if ${COMP} -o "test-${1}" "${SOURCEDIR}/test-${1}.c" ${3} ${4} 1>&3 2>&3
then
echo "partial result of ${n}: ${CC} succeeded" 1>&3
- else
- echo "result of ${n}: ${CC} failed with exit status $?" 1>&3
- echo "result of compiling ${n}: no" 1>&3
- echo 1>&3
- return 1
- fi
-
- if ./test-${1} 1>&3 2>&3; then
echo "tested ${n}: yes" 1>&2
echo "result of running ${n}: yes" 1>&3
echo 1>&3
@@ -185,10 +177,9 @@
rm "test-${1}"
return 0
else
- echo "result of ${n}: execution failed with exit status $?" 1>&3
+ echo "result of ${n}: ${CC} failed with exit status $?" 1>&3
echo "result of running ${n}: no" 1>&3
echo 1>&3
- rm "test-${1}"
return 1
fi
}