From: Kai Kang <[email protected]> Package libinput has a package config 'libwacom'. When it is set, package libwacom is required. So add the recipe of libwacom.
Add a patch to generate udev rules file on target that it is not suitable for cross compile. Signed-off-by: Kai Kang <[email protected]> --- .../generate-udev-rules-on-target.patch | 59 +++++++++++++++++++ .../recipes-extended/libwacom/libwacom_1.0.bb | 17 ++++++ 2 files changed, 76 insertions(+) create mode 100644 meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch create mode 100644 meta-oe/recipes-extended/libwacom/libwacom_1.0.bb diff --git a/meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch b/meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file mode 100644 index 000000000..27e037c98 --- /dev/null +++ b/meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch @@ -0,0 +1,59 @@ +libwacom create a native executable file to generate udev rules file. But it is +not suitable for cross compile. And it is complicate to create libwacom-native +that libgudev-native and udev-native are required. + +So do not generate udev rules file during compilation. Install the executable +file to generate udev rules on target. It should put the generated rules file +at /lib/udev/rules.d/65-libwacom.rules. + +Upstream-Status: Inappropriate [cross-compile specific] + +Signed-off-by: Kai Kang <[email protected]> +--- +diff --git a/meson.build b/meson.build +index 6584c86..4009f5f 100644 +--- a/meson.build ++++ b/meson.build +@@ -407,20 +407,20 @@ executable('libwacom-list-local-devices', + include_directories: [includes_src], + install: true) + +-tools_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.source_root())] ++tools_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.source_root()), '-DLIBWACOM_DATA_DIR="@0@"'.format(dir_data)] + +-gen_udev_rules = executable('generate-udev-rules', ++gen_udev_rules = executable('libwacom-generate-udev-rules', + 'tools/generate-udev-rules.c', + dependencies: [dep_libwacom, dep_glib], + include_directories: [includes_src], + c_args: tools_cflags, +- install: false) +-custom_target('udev-rules', +- command: gen_udev_rules, +- capture: true, +- output: '65-libwacom.rules', +- install: true, +- install_dir: join_paths(dir_udev, 'rules.d')) ++ install: true) ++#custom_target('udev-rules', ++# command: gen_udev_rules, ++# capture: true, ++# output: '65-libwacom.rules', ++# install: true, ++# install_dir: join_paths(dir_udev, 'rules.d')) + + executable('list-devices', + 'tools/list-devices.c', +diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c +index bb00e7b..fbf49f0 100644 +--- a/tools/generate-udev-rules.c ++++ b/tools/generate-udev-rules.c +@@ -229,7 +229,7 @@ int main(int argc, char **argv) + } + + +- db = libwacom_database_new_for_path(TOPSRCDIR"/data"); ++ db = libwacom_database_new_for_path(LIBWACOM_DATA_DIR); + + list = libwacom_list_devices_from_database(db, NULL); + if (!list) { diff --git a/meta-oe/recipes-extended/libwacom/libwacom_1.0.bb b/meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file mode 100644 index 000000000..0787ad246 --- /dev/null +++ b/meta-oe/recipes-extended/libwacom/libwacom_1.0.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "libwacom is a library to identify wacom tablets and their model-specific features." +HOMEPAGE = "https://github.com/linuxwacom/libwacom/wiki" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=40a21fffb367c82f39fd91a3b137c36e" + +DEPENDS = "libgudev libxml2" + +SRC_URI = "git://github.com/linuxwacom/libwacom.git;protocol=https \ + file://generate-udev-rules-on-target.patch \ + " +SRCREV = "ae6c9cf78802844349986ac2a708d87e891a3e6e" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig -- 2.20.0 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
