[oe-commits] [meta-openembedded] 02/02: libwacom: add recipe

git at git.openembedded.org git at git.openembedded.org
Thu Sep 5 04:32:16 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 6982497d05d264f57c06eb441bf52236ca62790e
Author: Kai Kang <kai.kang at windriver.com>
AuthorDate: Thu Aug 29 04:29:42 2019 -0400

    libwacom: add recipe
    
    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 <kai.kang at windriver.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../libwacom/generate-udev-rules-on-target.patch   | 59 ++++++++++++++++++++++
 meta-oe/recipes-extended/libwacom/libwacom_1.0.bb  | 17 +++++++
 2 files changed, 76 insertions(+)

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 0000000..27e037c
--- /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 <kai.kang at windriver.com>
+---
+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 0000000..0787ad2
--- /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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list