diff -Nru libwacom-1.3/debian/changelog libwacom-1.3/debian/changelog --- libwacom-1.3/debian/changelog 2021-03-31 05:10:28.000000000 +0000 +++ libwacom-1.3/debian/changelog 2021-04-21 10:16:53.000000000 +0000 @@ -1,3 +1,16 @@ +libwacom (1.3-2ubuntu3) focal; urgency=medium + + * The previous revision failed to build due to some issues with the + backport of the feature to the old version, fix the problems + with those changes + - d/p/meson-build-auto-test.patch: + include the new tablet files in the list of data files to install + - d/p/split_EMR_specific_stylus_tests.patch, + - d/p/introduce_WSTYLUS_MOBILE_type.patch: + cherry pick test fixes to match the code changes + + -- Bin Li Wed, 21 Apr 2021 18:16:53 +0800 + libwacom (1.3-2ubuntu2) focal; urgency=medium * Support isdv4-aes stylus group and multiple AES stylus definitions. diff -Nru libwacom-1.3/debian/patches/introduce_WSTYLUS_MOBILE_type.patch libwacom-1.3/debian/patches/introduce_WSTYLUS_MOBILE_type.patch --- libwacom-1.3/debian/patches/introduce_WSTYLUS_MOBILE_type.patch 1970-01-01 00:00:00.000000000 +0000 +++ libwacom-1.3/debian/patches/introduce_WSTYLUS_MOBILE_type.patch 2021-04-21 10:16:53.000000000 +0000 @@ -0,0 +1,125 @@ +commit 36a22c884f3439fd72bfc2268afd1c29364ffee8 +Author: Jason Gerecke +Date: Fri Nov 1 15:24:03 2019 -0700 + + Introduce WSTYLUS_MOBILE type for AES devices + + AES styli are distinct enough from the existing stylus classes to + deserve one of their own. This class is named WSTYLUS_MOBILE both to + reflect the fact that AES sensors are only found on tablet PCs and to + allow the potential inclusion of other similar sensors which may not + use AES tech. + + Stylus test cases are added to cover the future addition of AES styli + to libwacom. + + Signed-off-by: Jason Gerecke + +diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c +index ac9c281..a3fb3cd 100644 +--- a/libwacom/libwacom-database.c ++++ b/libwacom/libwacom-database.c +@@ -98,6 +98,8 @@ type_from_str (const char *type) + return WSTYLUS_PUCK; + if (streq(type, "3D")) + return WSTYLUS_3D; ++ if (streq(type, "Mobile")) ++ return WSTYLUS_MOBILE; + return WSTYLUS_UNKNOWN; + } + +diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c +index c4a50a8..ce66ae2 100644 +--- a/libwacom/libwacom.c ++++ b/libwacom/libwacom.c +@@ -1293,6 +1293,7 @@ libwacom_print_stylus_description (int fd, const WacomStylus *stylus) + case WSTYLUS_STROKE: type = "Stroke"; break; + case WSTYLUS_PUCK: type = "Puck"; break; + case WSTYLUS_3D: type = "3D"; break; ++ case WSTYLUS_MOBILE: type = "Mobile"; break; + default: g_assert_not_reached(); break; + } + +diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h +index 8035e17..8cf6c92 100644 +--- a/libwacom/libwacom.h ++++ b/libwacom/libwacom.h +@@ -159,6 +159,7 @@ typedef enum { + WSTYLUS_STROKE, + WSTYLUS_PUCK, + WSTYLUS_3D, ++ WSTYLUS_MOBILE, + } WacomStylusType; + + /** +diff --git a/test/test-stylus-validity.c b/test/test-stylus-validity.c +index db628cb..849c205 100644 +--- a/test/test-stylus-validity.c ++++ b/test/test-stylus-validity.c +@@ -53,6 +53,7 @@ test_type(gconstpointer data) + case WSTYLUS_STROKE: + case WSTYLUS_PUCK: + case WSTYLUS_3D: ++ case WSTYLUS_MOBILE: + break; + case WSTYLUS_UNKNOWN: + default: +@@ -60,6 +61,14 @@ test_type(gconstpointer data) + } + } + ++static void ++test_mobile(gconstpointer data) ++{ ++ const WacomStylus *stylus = data; ++ ++ g_assert_cmpint(libwacom_stylus_get_type(stylus), ==, WSTYLUS_MOBILE); ++} ++ + static void + test_eraser(gconstpointer data) + { +@@ -202,6 +211,21 @@ _add_test(const WacomStylus *stylus, GTestDataFunc func, const char *funcname) + #define add_test(stylus, func_) \ + _add_test(stylus, func_, #func_) + ++static void ++setup_aes_tests(const WacomStylus *stylus) ++{ ++ add_test(stylus, test_mobile); ++ ++ add_test(stylus, test_pressure); ++ add_test(stylus, test_no_distance); ++ ++ if (libwacom_stylus_get_id(stylus) < 0x8000) { ++ add_test(stylus, test_no_tilt); ++ } else { ++ add_test(stylus, test_tilt); ++ } ++} ++ + static void + setup_emr_tests(const WacomStylus *stylus) + { +@@ -260,6 +284,7 @@ setup_tests(const WacomStylus *stylus) + default: + switch (libwacom_stylus_get_id(stylus)) { + case 0x885: ++ case 0x8051: + add_test(stylus, test_no_buttons); + break; + default: +@@ -267,7 +292,12 @@ setup_tests(const WacomStylus *stylus) + } + } + +- setup_emr_tests(stylus); ++ /* Technology-specific tests */ ++ if (libwacom_stylus_get_type(stylus) == WSTYLUS_MOBILE) { ++ setup_aes_tests(stylus); ++ } else { ++ setup_emr_tests(stylus); ++ } + + if (libwacom_stylus_has_eraser(stylus)) + add_test(stylus, test_eraser); diff -Nru libwacom-1.3/debian/patches/meson-build-auto-test.patch libwacom-1.3/debian/patches/meson-build-auto-test.patch --- libwacom-1.3/debian/patches/meson-build-auto-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ libwacom-1.3/debian/patches/meson-build-auto-test.patch 2021-04-21 10:16:53.000000000 +0000 @@ -0,0 +1,21 @@ +Index: libwacom/meson.build +=================================================================== +--- libwacom.orig/meson.build ++++ libwacom/meson.build +@@ -236,6 +236,8 @@ data_files = [ + 'data/isdv4-10f.tablet', + 'data/isdv4-12c.tablet', + 'data/isdv4-48c9.tablet', ++ 'data/isdv4-48ca.tablet', ++ 'data/isdv4-48ce.tablet', + 'data/isdv4-48ec.tablet', + 'data/isdv4-48ed.tablet', + 'data/isdv4-48ee.tablet', +@@ -266,6 +268,7 @@ data_files = [ + 'data/isdv4-51bf.tablet', + 'data/isdv4-51c4.tablet', + 'data/isdv4-51e2.tablet', ++ 'data/isdv4-51e9.tablet', + 'data/isdv4-51f5.tablet', + 'data/isdv4-51f6.tablet', + 'data/isdv4-90.tablet', diff -Nru libwacom-1.3/debian/patches/series libwacom-1.3/debian/patches/series --- libwacom-1.3/debian/patches/series 2021-03-31 05:10:28.000000000 +0000 +++ libwacom-1.3/debian/patches/series 2021-04-21 10:16:53.000000000 +0000 @@ -4,4 +4,7 @@ isdv4-48ce.patch add-isdv4-aes-stylus-group.patch add-multiple-AES-stylus-definitions.patch +split_EMR_specific_stylus_tests.patch +introduce_WSTYLUS_MOBILE_type.patch isdv4-51e9.patch +meson-build-auto-test.patch diff -Nru libwacom-1.3/debian/patches/split_EMR_specific_stylus_tests.patch libwacom-1.3/debian/patches/split_EMR_specific_stylus_tests.patch --- libwacom-1.3/debian/patches/split_EMR_specific_stylus_tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ libwacom-1.3/debian/patches/split_EMR_specific_stylus_tests.patch 2021-04-21 10:16:53.000000000 +0000 @@ -0,0 +1,87 @@ +commit 5092098c68f2d5e6a7935e50efbad99d836135c9 +Author: Jason Gerecke +Date: Fri Nov 1 15:25:42 2019 -0700 + + test: Split EMR-specific stylus tests into their own section + + The ID and eraser tests currently performed by test-stylus-validity + are only relevant to EMR tools. To make implementing tests for AES + tools more clean, lets first move these into their own dedicated + function. + + Signed-off-by: Jason Gerecke + +diff --git a/test/test-stylus-validity.c b/test/test-stylus-validity.c +index 6582428..db628cb 100644 +--- a/test/test-stylus-validity.c ++++ b/test/test-stylus-validity.c +@@ -203,32 +203,8 @@ _add_test(const WacomStylus *stylus, GTestDataFunc func, const char *funcname) + _add_test(stylus, func_, #func_) + + static void +-setup_tests(const WacomStylus *stylus) ++setup_emr_tests(const WacomStylus *stylus) + { +- add_test(stylus, test_name); +- add_test(stylus, test_type); +- +- /* Button checks */ +- switch (libwacom_stylus_get_type(stylus)) { +- case WSTYLUS_PUCK: +- add_test(stylus, test_puck); +- add_test(stylus, test_buttons); +- break; +- case WSTYLUS_INKING: +- case WSTYLUS_STROKE: +- add_test(stylus, test_no_buttons); +- break; +- default: +- switch (libwacom_stylus_get_id(stylus)) { +- case 0x885: +- add_test(stylus, test_no_buttons); +- break; +- default: +- add_test(stylus, test_buttons); +- } +- } +- +- /* Axes checks */ + switch (libwacom_stylus_get_id(stylus)) { + case 0xffffd: + add_test(stylus, test_pressure); +@@ -263,6 +239,35 @@ setup_tests(const WacomStylus *stylus) + add_test(stylus, test_distance); + break; + } ++} ++ ++static void ++setup_tests(const WacomStylus *stylus) ++{ ++ add_test(stylus, test_name); ++ add_test(stylus, test_type); ++ ++ /* Button checks */ ++ switch (libwacom_stylus_get_type(stylus)) { ++ case WSTYLUS_PUCK: ++ add_test(stylus, test_puck); ++ add_test(stylus, test_buttons); ++ break; ++ case WSTYLUS_INKING: ++ case WSTYLUS_STROKE: ++ add_test(stylus, test_no_buttons); ++ break; ++ default: ++ switch (libwacom_stylus_get_id(stylus)) { ++ case 0x885: ++ add_test(stylus, test_no_buttons); ++ break; ++ default: ++ add_test(stylus, test_buttons); ++ } ++ } ++ ++ setup_emr_tests(stylus); + + if (libwacom_stylus_has_eraser(stylus)) + add_test(stylus, test_eraser);