Files
void-packages/srcpkgs/fprint_demo/patches/ftbfs-libfprint-080.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```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

28 lines
877 B
Diff

From ea44a11a48ca1a558e3c9cb0a0504699e6b556fa Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 8 Oct 2018 16:48:03 +0200
Subject: [PATCH] main: Fix compilation with libfprint >= 0.8.0
With API to be added to libfprint 0.8.3
---
src/verify.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/verify.c b/src/verify.c
index d3777bc..4f7f8e9 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -236,7 +236,11 @@ static void plot_minutiae(unsigned char *rgbdata, int width, int height,
for (i = 0; i < nr_minutiae; i++) {
struct fp_minutia *min = minlist[i];
- size_t pixel_offset = (min->y * width) + min->x;
+ int x, y;
+ size_t pixel_offset;
+
+ fp_minutia_get_coords(min, &x, &y);
+ pixel_offset = (y * width) + x;
write_pixel(pixel_offset - 2);
write_pixel(pixel_offset - 1);
write_pixel(pixel_offset);