diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-07-17 15:51:30 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-07-17 15:51:30 +0000 |
commit | e42e35620c40f90b3550c5cb7195c1cf4a78799f (patch) | |
tree | 5c3f89ff3f207fe714e035beb641c0394c7a587a /user | |
parent | fe6191d403699ddcf1c3e5070690d70daa92c88d (diff) | |
download | packages-e42e35620c40f90b3550c5cb7195c1cf4a78799f.tar.gz packages-e42e35620c40f90b3550c5cb7195c1cf4a78799f.tar.bz2 packages-e42e35620c40f90b3550c5cb7195c1cf4a78799f.tar.xz packages-e42e35620c40f90b3550c5cb7195c1cf4a78799f.zip |
user/libwacom: fix db properly, install udev rules properly
Diffstat (limited to 'user')
-rw-r--r-- | user/libwacom/APKBUILD | 6 | ||||
-rw-r--r-- | user/libwacom/fix-database.patch | 34 |
2 files changed, 25 insertions, 15 deletions
diff --git a/user/libwacom/APKBUILD b/user/libwacom/APKBUILD index 56464b2a0..c99e8605a 100644 --- a/user/libwacom/APKBUILD +++ b/user/libwacom/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libwacom pkgver=0.33 -pkgrel=1 +pkgrel=2 pkgdesc="Tablet description library" url="http://linuxwacom.sourceforge.net/" arch="all" @@ -31,9 +31,9 @@ check() { package() { make DESTDIR="$pkgdir" install install -dm755 "$pkgdir"/usr/lib/udev/rules.d/ - tools/generate-udev-rules + tools/generate-udev-rules \ > "$pkgdir"/usr/lib/udev/rules.d/65-libwacom.rules } sha512sums="de4d9cf3b5f4d87a159ba8ee617bafce9d13b67dc23d9dc67efd57317b0df2079dd0de328bc800de47f14ee49ea82bb842e34297cef23ba336c1ddca3afa826d libwacom-0.33.tar.bz2 -d1ac1176aa4a95991330e23fb84868d65a1b2e81d68173c990f885af1ce591de7aca16e21db8128e4f1975bca22b8014a6fa2ca8c0458dce464568239d75263c fix-database.patch" +db07a7c44bd7ed010eec167d5e7cd807da203f8d42630855189b7c7e91ef6776b7df571ee0b0a0985912f836640fcf458ee4a394a47e9e8365892a6a137a3f00 fix-database.patch" diff --git a/user/libwacom/fix-database.patch b/user/libwacom/fix-database.patch index d367ca997..3c43b5bbf 100644 --- a/user/libwacom/fix-database.patch +++ b/user/libwacom/fix-database.patch @@ -1,15 +1,25 @@ -https://github.com/linuxwacom/libwacom/issues/85 - -Awful, cheesy hack. - ---- libwacom-0.33/libwacom/libwacom-database.c.old 2019-04-12 03:10:21.000000000 +0000 -+++ libwacom-0.33/libwacom/libwacom-database.c 2019-06-01 06:24:56.290159726 +0000 -@@ -152,7 +152,7 @@ - - memset(namestr, 0, sizeof(namestr)); +diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c +index afb89a2..28388f5 100644 +--- a/libwacom/libwacom-database.c ++++ b/libwacom/libwacom-database.c +@@ -147,14 +147,13 @@ make_match_string (const char *name, WacomBusType bus, int vendor_id, int produc + static gboolean + match_from_string(const char *str, WacomBusType *bus, int *vendor_id, int *product_id, char **name) + { +- int rc = 1; +- char busstr[64], namestr[64]; ++ int rc = 1, len = 0; ++ char busstr[64]; +- memset(namestr, 0, sizeof(namestr)); +- - rc = sscanf(str, "%63[^:]:%x:%x:%63c", busstr, vendor_id, product_id, namestr); -+ rc = sscanf(str, "%63[^:]:%x:%x:%63[^\b]", busstr, vendor_id, product_id, namestr); - if (rc == 4) { - *name = g_strdup(namestr); +- if (rc == 4) { +- *name = g_strdup(namestr); ++ rc = sscanf(str, "%63[^:]:%x:%x:%n", busstr, vendor_id, product_id, &len); ++ if (len > 0) { ++ /* Grumble grumble scanf handling of %n */ ++ *name = g_strdup(str+len); } else if (rc == 3) { + *name = NULL; + } else { |