void-packages/srcpkgs/jigdo/patches/sizewidth.patch
Đoàn Trần Công Danh 1a06b0d5d7 srcpkgs/j*: 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

40 lines
1.6 KiB
Diff

SIZE_WIDTH is already defined stdint.h
--- a/src/mkimage.cc 2005-07-09 21:14:46.000000000 +0200
+++ b/src/mkimage.cc 2018-01-15 19:36:50.781708093 +0100
@@ -285,27 +285,27 @@
//______________________________________________________________________
namespace {
- const int SIZE_WIDTH = 12;
+ const int SIZE__WIDTH = 12;
}
ostream& JigdoDesc::ImageInfo::put(ostream& s) const {
- s << "image-info " << setw(SIZE_WIDTH) << size() << " "
+ s << "image-info " << setw(SIZE__WIDTH) << size() << " "
<< md5() << ' ' << blockLength() << '\n';
return s;
}
ostream& JigdoDesc::UnmatchedData::put(ostream& s) const {
- s << "in-template " << setw(SIZE_WIDTH) << offset() << ' '
- << setw(SIZE_WIDTH) << size() << '\n';
+ s << "in-template " << setw(SIZE__WIDTH) << offset() << ' '
+ << setw(SIZE__WIDTH) << size() << '\n';
return s;
}
ostream& JigdoDesc::MatchedFile::put(ostream& s) const {
- s << "need-file " << setw(SIZE_WIDTH) << offset() << ' '
- << setw(SIZE_WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
+ s << "need-file " << setw(SIZE__WIDTH) << offset() << ' '
+ << setw(SIZE__WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
return s;
}
ostream& JigdoDesc::WrittenFile::put(ostream& s) const {
- s << "have-file " << setw(SIZE_WIDTH) << offset() << ' '
- << setw(SIZE_WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
+ s << "have-file " << setw(SIZE__WIDTH) << offset() << ' '
+ << setw(SIZE__WIDTH) << size() << ' ' << md5() << ' ' << rsync() << '\n';
return s;
}