[packages/libfprint] - up to 1.90.6 - add support for ELAN reader on Vaio SX laptops

baggins baggins at pld-linux.org
Sun Dec 13 14:02:24 CET 2020


commit cbb48e0e086679ef8f5adaea8ed0586da40b81a9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Dec 13 14:01:40 2020 +0100

    - up to 1.90.6
    - add support for ELAN reader on Vaio SX laptops

 ...e-array-parameter-and-array-bounds-warnin.patch | 28 ++++++++++++++++
 libfprint-gtkdoc.patch                             | 10 ------
 libfprint.spec                                     | 37 ++++++++++++----------
 vaio-sx.patch                                      | 22 +++++++++++++
 4 files changed, 70 insertions(+), 27 deletions(-)
---
diff --git a/libfprint.spec b/libfprint.spec
index ddc4c06..8fff832 100644
--- a/libfprint.spec
+++ b/libfprint.spec
@@ -5,14 +5,14 @@
 Summary:	Fingerprint reader library
 Summary(pl.UTF-8):	Biblioteka do obsługi czytników linii papilarnych
 Name:		libfprint
-Version:	0.8.2
+Version:	1.90.6
 Release:	1
 License:	LGPL v2.1+
 Group:		Libraries
-#Source0Download: https://gitlab.freedesktop.org/libfprint/libfprint/tags
-Source0:	https://gitlab.freedesktop.org/libfprint/libfprint/uploads/4272fab4f37516db5b20d07bb576a4b1/%{name}-%{version}.tar.xz
-# Source0-md5:	7cc2ffd39b6f86d127c0581597f855e8
-Patch0:		%{name}-gtkdoc.patch
+Source0:	https://gitlab.freedesktop.org/libfprint/libfprint/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
+# Source0-md5:	923d1f1c5aef5ac642b89ef2d95cd055
+Patch0:		vaio-sx.patch
+Patch1:		0001-nbis-Disable-array-parameter-and-array-bounds-warnin.patch
 URL:		https://fprint.freedesktop.org/
 BuildRequires:	glib2-devel >= 1:2.28
 BuildRequires:	gtk-doc
@@ -95,12 +95,14 @@ Udev rules for libfprint.
 Reguły udeva dla libfprint.
 
 %prep
-%setup -q
+%setup -q -n %{name}-v%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %meson build \
-	-Dx11-examples=false \
+	-Dx11-examples=true \
+	-Dgtk-examples=true
 	%{!?with_static_libs:--default=library=shared}
 
 %meson_build -C build
@@ -111,7 +113,7 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %meson_install -C build
 
-install examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -122,27 +124,28 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS HACKING.md NEWS README THANKS TODO
-%attr(755,root,root) %{_libdir}/libfprint.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfprint.so.0
+%attr(755,root,root) %{_libdir}/libfprint-2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfprint-2.so.2
+%{_libdir}/girepository-1.0/FPrint-2.0.typelib
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libfprint.so
-%dir %{_includedir}/libfprint
-%{_includedir}/libfprint/fprint.h
-%{_pkgconfigdir}/libfprint.pc
+%attr(755,root,root) %{_libdir}/libfprint-2.so
+%{_includedir}/libfprint-2
+%{_pkgconfigdir}/libfprint-2.pc
+%{_datadir}/gir-1.0/FPrint-2.0.gir
 %{_examplesdir}/%{name}-%{version}
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/libfprint.a
+%{_libdir}/libfprint-2.a
 %endif
 
 %files apidocs
 %defattr(644,root,root,755)
-%{_gtkdocdir}/libfprint
+%{_gtkdocdir}/libfprint-2
 
 %files -n udev-libfprint
 %defattr(644,root,root,755)
-/lib/udev/rules.d/60-fprint-autosuspend.rules
+/lib/udev/rules.d/60-libfprint-2-autosuspend.rules
diff --git a/0001-nbis-Disable-array-parameter-and-array-bounds-warnin.patch b/0001-nbis-Disable-array-parameter-and-array-bounds-warnin.patch
new file mode 100644
index 0000000..5399f18
--- /dev/null
+++ b/0001-nbis-Disable-array-parameter-and-array-bounds-warnin.patch
@@ -0,0 +1,28 @@
+From 2d10d864d8bc4b952cf412f6e18e44412dba759a Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <bberg at redhat.com>
+Date: Wed, 9 Dec 2020 15:46:23 +0100
+Subject: [PATCH] nbis: Disable array-parameter and array-bounds warnings
+
+NBIS just does weird things and while the array-parameter warning is
+easy to fix, the other is not trivial. So disable these warnings so that
+we can still build using newer GCC versions.
+---
+ libfprint/meson.build | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index 96cfe9b..4d1d30c 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -234,6 +234,8 @@ libnbis = static_library('nbis',
+         '-Wno-error=redundant-decls',
+         '-Wno-redundant-decls',
+         '-Wno-discarded-qualifiers',
++        '-Wno-array-bounds',
++        '-Wno-array-parameter',
+     ]),
+     install: false)
+ 
+-- 
+2.26.2
+
diff --git a/libfprint-gtkdoc.patch b/libfprint-gtkdoc.patch
deleted file mode 100644
index 96508c1..0000000
--- a/libfprint-gtkdoc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libfprint-0.8.2/doc/meson.build.orig	2018-07-17 13:49:47.000000000 +0200
-+++ libfprint-0.8.2/doc/meson.build	2018-12-16 15:40:04.836362925 +0100
-@@ -54,7 +54,6 @@
-              content_files: content_files,
-              expand_content_files: expand_content_files,
-              scan_args: [
--               '--rebuild-types',
-                '--ignore-decorators=API_EXPORTED',
-                '--ignore-headers=' + ' '.join(private_headers),
-              ],
diff --git a/vaio-sx.patch b/vaio-sx.patch
new file mode 100644
index 0000000..75129bb
--- /dev/null
+++ b/vaio-sx.patch
@@ -0,0 +1,22 @@
+--- libfprint-v1.90.6/libfprint/drivers/elan.h~	2020-12-09 13:30:53.000000000 +0100
++++ libfprint-v1.90.6/libfprint/drivers/elan.h	2020-12-13 11:30:59.890743558 +0100
+@@ -31,9 +31,10 @@
+ #define ELAN_0907 (1 << 0)
+ #define ELAN_0C03 (1 << 1)
+ #define ELAN_0C42 (1 << 2)
++#define ELAN_0C46 (1 << 3)
+ 
+ /* devices which don't require frame rotation before assembling */
+-#define ELAN_NOT_ROTATED ELAN_0C03
++#define ELAN_NOT_ROTATED ELAN_0C03 | ELAN_0C46
+ 
+ /* min FW version that supports calibration */
+ #define ELAN_MIN_CALIBRATION_FW 0x0138
+@@ -214,6 +214,7 @@
+   {.vid = ELAN_VEND_ID,  .pid = 0x0c32, .driver_data = ELAN_ALL_DEV},
+   {.vid = ELAN_VEND_ID,  .pid = 0x0c33, .driver_data = ELAN_ALL_DEV},
+   {.vid = ELAN_VEND_ID,  .pid = 0x0c42, .driver_data = ELAN_0C42},
++  {.vid = ELAN_VEND_ID,  .pid = 0x0c46, .driver_data = ELAN_0C46},
+   {.vid = ELAN_VEND_ID,  .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
+   {.vid = 0,  .pid = 0,  .driver_data = 0},
+ };
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libfprint.git/commitdiff/cbb48e0e086679ef8f5adaea8ed0586da40b81a9



More information about the pld-cvs-commit mailing list