void-packages/srcpkgs/simutron/patches/remove-bitbang-from-firmware-c.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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
471 B
Diff

--- a/plugins/avrmcu/plugin/firmware.c
+++ b/plugins/avrmcu/plugin/firmware.c
@@ -118,10 +118,6 @@
case AVR_MMCU_TAG_SIMAVR_CONSOLE: {
firmware->console_register_addr = src[0] | (src[1] << 8);
} break;
- case AVR_MMCU_TAG_BITBANG: {
- firmware->bitbang_on_mask =
- src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
- } break;
}
size -= next;
src += next - 2; // already incremented