diff --git a/pkgbuilds/libfprint-git/.omarchy/package.json b/pkgbuilds/libfprint-git/.omarchy/package.json index a48e412..39e8dfc 100644 --- a/pkgbuilds/libfprint-git/.omarchy/package.json +++ b/pkgbuilds/libfprint-git/.omarchy/package.json @@ -1,4 +1,4 @@ { "source": "aur", - "sync": false + "upstream_commit": "d225acd677e4a2af8f99698ea11386d8ad3af1bf" } diff --git a/pkgbuilds/libfprint-git/.omarchy/patches/0001-omarchy-focaltech-moc-support.patch b/pkgbuilds/libfprint-git/.omarchy/patches/0001-omarchy-focaltech-moc-support.patch new file mode 100644 index 0000000..0cc431c --- /dev/null +++ b/pkgbuilds/libfprint-git/.omarchy/patches/0001-omarchy-focaltech-moc-support.patch @@ -0,0 +1,160 @@ +diff -ruN a/PKGBUILD b/PKGBUILD +--- a/PKGBUILD 2026-06-12 01:10:32.081893787 -0400 ++++ b/PKGBUILD 2026-06-12 01:10:32.083938150 -0400 +@@ -1,25 +1,30 @@ +-# Maintainer: +-# Contributor: Timothy Gu +-# Contributor: Ivan Shapovalov +- +-## links +-# https://fprint.freedesktop.org +-# https://gitlab.freedesktop.org/libfprint/libfprint +- +-## basic info +-_pkgname="libfprint" +-pkgname="$_pkgname-git" +-pkgver=1.94.7.r29.g3f70bde +-pkgrel=1 +-pkgdesc="Library for fingerprint readers" +-url="https://gitlab.freedesktop.org/libfprint/libfprint" +-license=('LGPL-2.1-or-later') +-arch=('x86_64') ++# Maintainer: Mikko Nyman ++# Based on the Arch libfprint package by Jan Alexander Steffens (heftig). ++# ++# Tracks libfprint master to expose the focaltech_moc driver for ASUS ++# laptops with FocalTech MOC (Match-on-Chip) fingerprint sensors. The ++# driver is in master under LGPL but mainline libfprint releases (1.94.x) ++# do not yet ship it. Carries one extra patch adding USB ID 2808:a97a ++# (FocalTech FT9349 ESS, ASUS ExpertBook Ultra B9406CAA) to the driver's ++# id_table[]; the upstream MR is in flight. ++# ++# Once the patch lands and Arch's libfprint catches up, this package can ++# be removed from the OPR repo and Omarchy can install stock libfprint. + ++pkgname=libfprint-git ++pkgver=1.94.10.r12.gd79f157 ++pkgrel=1 ++pkgdesc="Library for fingerprint readers (libfprint master with FocalTech FT9349 PID 0xa97a patch)" ++url="https://fprint.freedesktop.org/" ++arch=(x86_64) ++license=(LGPL-2.1-or-later) + depends=( ++ gcc-libs ++ glib2 ++ glibc + libgudev + libgusb +- nss ++ openssl + pixman + ) + makedepends=( +@@ -28,38 +33,50 @@ + gobject-introspection + gtk-doc + meson +-) +-checkdepends=( +- python + python-cairo + python-gobject ++ systemd ++) ++checkdepends=( ++ cairo + umockdev + ) +- +-provides=( +- "$_pkgname=$pkgver" +- 'libfprint-2.so' ++provides=(libfprint libfprint-2.so) ++conflicts=(libfprint) ++groups=(fprint) ++source=( ++ "git+https://gitlab.freedesktop.org/libfprint/libfprint.git" ++ "focaltech_moc-add-pid-0xA97A.patch" ++) ++b2sums=( ++ 'SKIP' ++ 'SKIP' + ) +-conflicts=("$_pkgname") +- +-_pkgsrc="$_pkgname" +-source=("$_pkgsrc"::"git+$url.git") +-sha256sums=('SKIP') + + pkgver() { +- cd "$_pkgsrc" +- git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' --exclude='*_*' \ +- | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g' ++ cd libfprint ++ ( set -o pipefail ++ git describe --long --tags --abbrev=7 2>/dev/null \ ++ | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \ ++ || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" ++ ) ++} ++ ++prepare() { ++ cd libfprint ++ patch -p1 < "$srcdir/focaltech_moc-add-pid-0xA97A.patch" + } + + build() { +- local _meson_opts=( +- -Ddrivers=all +- -Dinstalled-tests=false ++ local meson_options=( ++ -D drivers=all ++ -D installed-tests=false + ) +- +- arch-meson "$_pkgsrc" build "${_meson_opts[@]}" ++ arch-meson libfprint build "${meson_options[@]}" + meson compile -C build ++ # Regenerate autosuspend.hwdb from the patched id_table[] so the ++ # udev-hwdb test in check() doesn't fail on the new PID 0xA97A. ++ ninja -C build sync-udev-hwdb + } + + check() { +@@ -67,5 +84,7 @@ + } + + package() { +- DESTDIR="$pkgdir" meson install -C build ++ meson install -C build --destdir "$pkgdir" + } ++ ++# vim:set sw=2 sts=-1 et: +diff -ruN a/focaltech_moc-add-pid-0xA97A.patch b/focaltech_moc-add-pid-0xA97A.patch +--- a/focaltech_moc-add-pid-0xA97A.patch 1969-12-31 19:00:00.000000000 -0500 ++++ b/focaltech_moc-add-pid-0xA97A.patch 2026-06-12 01:10:32.085938142 -0400 +@@ -0,0 +1,24 @@ ++From acfa370b92604c4e6d55f79ed283ed2b05da32de Mon Sep 17 00:00:00 2001 ++From: Mikko Nyman ++Date: Sat, 25 Apr 2026 17:43:18 +0300 ++Subject: [PATCH] focaltech_moc: add new pid:0xA97A ++ ++--- ++ libfprint/drivers/focaltech_moc/focaltech_moc.c | 1 + ++ 1 file changed, 1 insertion(+) ++ ++diff --git a/libfprint/drivers/focaltech_moc/focaltech_moc.c b/libfprint/drivers/focaltech_moc/focaltech_moc.c ++index 8bd93e4..23dac16 100644 ++--- a/libfprint/drivers/focaltech_moc/focaltech_moc.c +++++ b/libfprint/drivers/focaltech_moc/focaltech_moc.c ++@@ -37,6 +37,7 @@ static const FpIdEntry id_table[] = { ++ { .vid = 0x2808, .pid = 0x1579, }, ++ { .vid = 0x2808, .pid = 0x077A, }, ++ { .vid = 0x2808, .pid = 0x079A, }, +++ { .vid = 0x2808, .pid = 0xA97A, }, ++ { .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */ ++ }; ++ ++-- ++2.54.0 ++ diff --git a/pkgbuilds/libfprint-git/.omarchy/patches/0002-skip-merged-focaltech-pid.patch b/pkgbuilds/libfprint-git/.omarchy/patches/0002-skip-merged-focaltech-pid.patch new file mode 100644 index 0000000..11b3560 --- /dev/null +++ b/pkgbuilds/libfprint-git/.omarchy/patches/0002-skip-merged-focaltech-pid.patch @@ -0,0 +1,45 @@ +diff -ruN a/PKGBUILD b/PKGBUILD +--- a/PKGBUILD 2026-06-12 01:10:32.091938118 -0400 ++++ b/PKGBUILD 2026-06-12 01:10:32.094596080 -0400 +@@ -1,20 +1,20 @@ + # Maintainer: Mikko Nyman + # Based on the Arch libfprint package by Jan Alexander Steffens (heftig). + # +-# Tracks libfprint master to expose the focaltech_moc driver for ASUS +-# laptops with FocalTech MOC (Match-on-Chip) fingerprint sensors. The +-# driver is in master under LGPL but mainline libfprint releases (1.94.x) +-# do not yet ship it. Carries one extra patch adding USB ID 2808:a97a +-# (FocalTech FT9349 ESS, ASUS ExpertBook Ultra B9406CAA) to the driver's +-# id_table[]; the upstream MR is in flight. ++# Tracks libfprint master to expose the focaltech_moc driver updates for ++# ASUS laptops with FocalTech MOC (Match-on-Chip) fingerprint sensors. ++# Mainline libfprint releases (1.94.x) do not yet ship the latest device ++# IDs, including USB ID 2808:a97a (FocalTech FT9349 ESS, ASUS ExpertBook ++# Ultra B9406CAA). The patch for 2808:a97a has landed upstream; keep the ++# fallback patch only for older refs where the ID is still missing. + # +-# Once the patch lands and Arch's libfprint catches up, this package can +-# be removed from the OPR repo and Omarchy can install stock libfprint. ++# Once Arch's libfprint catches up, this package can be removed from the ++# OPR repo and Omarchy can install stock libfprint. + + pkgname=libfprint-git + pkgver=1.94.10.r12.gd79f157 + pkgrel=1 +-pkgdesc="Library for fingerprint readers (libfprint master with FocalTech FT9349 PID 0xa97a patch)" ++pkgdesc="Library for fingerprint readers (libfprint master with FocalTech MOC updates)" + url="https://fprint.freedesktop.org/" + arch=(x86_64) + license=(LGPL-2.1-or-later) +@@ -64,7 +64,10 @@ + + prepare() { + cd libfprint +- patch -p1 < "$srcdir/focaltech_moc-add-pid-0xA97A.patch" ++ ++ if ! grep -qi 'pid = 0xa97a' libfprint/drivers/focaltech_moc/focaltech_moc.c; then ++ patch -p1 < "$srcdir/focaltech_moc-add-pid-0xA97A.patch" ++ fi + } + + build() { diff --git a/pkgbuilds/libfprint-git/PKGBUILD b/pkgbuilds/libfprint-git/PKGBUILD index 1a6ecba..de26677 100644 --- a/pkgbuilds/libfprint-git/PKGBUILD +++ b/pkgbuilds/libfprint-git/PKGBUILD @@ -1,20 +1,20 @@ # Maintainer: Mikko Nyman # Based on the Arch libfprint package by Jan Alexander Steffens (heftig). # -# Tracks libfprint master to expose the focaltech_moc driver for ASUS -# laptops with FocalTech MOC (Match-on-Chip) fingerprint sensors. The -# driver is in master under LGPL but mainline libfprint releases (1.94.x) -# do not yet ship it. Carries one extra patch adding USB ID 2808:a97a -# (FocalTech FT9349 ESS, ASUS ExpertBook Ultra B9406CAA) to the driver's -# id_table[]; the upstream MR is in flight. +# Tracks libfprint master to expose the focaltech_moc driver updates for +# ASUS laptops with FocalTech MOC (Match-on-Chip) fingerprint sensors. +# Mainline libfprint releases (1.94.x) do not yet ship the latest device +# IDs, including USB ID 2808:a97a (FocalTech FT9349 ESS, ASUS ExpertBook +# Ultra B9406CAA). The patch for 2808:a97a has landed upstream; keep the +# fallback patch only for older refs where the ID is still missing. # -# Once the patch lands and Arch's libfprint catches up, this package can -# be removed from the OPR repo and Omarchy can install stock libfprint. +# Once Arch's libfprint catches up, this package can be removed from the +# OPR repo and Omarchy can install stock libfprint. pkgname=libfprint-git pkgver=1.94.10.r12.gd79f157 -pkgrel=1 -pkgdesc="Library for fingerprint readers (libfprint master with FocalTech FT9349 PID 0xa97a patch)" +pkgrel=1.1 +pkgdesc="Library for fingerprint readers (libfprint master with FocalTech MOC updates)" url="https://fprint.freedesktop.org/" arch=(x86_64) license=(LGPL-2.1-or-later) @@ -64,7 +64,10 @@ pkgver() { prepare() { cd libfprint - patch -p1 < "$srcdir/focaltech_moc-add-pid-0xA97A.patch" + + if ! grep -qi 'pid = 0xa97a' libfprint/drivers/focaltech_moc/focaltech_moc.c; then + patch -p1 < "$srcdir/focaltech_moc-add-pid-0xA97A.patch" + fi } build() {