Skip to contentSkip to conversation

libwacom: add recipe

PATCH In review [email protected] 2 participants 7 messages Aug 29, 2019 – Sep 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libwacom: add recipe

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.

---
 .../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
meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +59 -0
new file mode 100644
index 000000000..27e037c98
@@ -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) {
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +17 -0
new file mode 100644
index 000000000..0787ad246
@@ -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
Signature · 1 line
2.20.0
author
#1 lore raw
Quoted 7 lines · On 2019/8/29 下午4:29, [email protected] wrote:

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.

Ping.

Quoted 96 lines
---
  .../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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +59 -0
new file mode 100644
index 000000000..27e037c98
@@ -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) {
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +17 -0
new file mode 100644
index 000000000..0787ad246
@@ -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
Signature · 1 line
Kai Kang
#2 lore raw
Quoted 8 lines · Kang Kai
Quoted 7 lines · On 2019/8/29 下午4:29, [email protected] wrote:

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.

fails to build

https://errors.yoctoproject.org/Errors/Details/268566/

https://errors.yoctoproject.org/Errors/Details/268387/

Quoted 115 lines

Ping.

Quoted 109 lines

---
  .../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

(quoted diff) +1 -0
@@ -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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +3 -0
+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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +16 -0
+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)]

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +37 -0
+
+-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) {
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +1 -0
new file mode 100644
index 000000000..0787ad246
@@ -0,0 +1,17 @@
+DESCRIPTION = "libwacom is a library to identify wacom tablets and

their model-specific features."

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +5 -0
+HOMEPAGE = "https://github.com/linuxwacom/libwacom/wiki"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=40a21fffb367c82f39fd91a3b137c36e"

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +11 -0
+
+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
author
#3 lore raw
Quoted 7 lines · Khem Raj
Quoted 6 lines · Kang Kai
Quoted 5 lines · On 2019/8/29 下午4:29, [email protected] wrote:

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.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Add a patch to generate udev rules file on target that it is not suitable for cross compile.

fails to build

https://errors.yoctoproject.org/Errors/Details/268566/

https://errors.yoctoproject.org/Errors/Details/268387/

Thanks. I'll check them.

Kai

Quoted 115 lines
Quoted 115 lines

Ping.

Quoted 109 lines
---
   .../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

(quoted diff) +1 -0
@@ -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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +3 -0
+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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +16 -0
+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)]

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +37 -0
+
+-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) {
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +1 -0
new file mode 100644
index 000000000..0787ad246
@@ -0,0 +1,17 @@
+DESCRIPTION = "libwacom is a library to identify wacom tablets and

their model-specific features."

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +5 -0
+HOMEPAGE = "https://github.com/linuxwacom/libwacom/wiki"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=40a21fffb367c82f39fd91a3b137c36e"

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +11 -0
+
+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
Signature · 1 line
Kai Kang
author
#4 lore raw
In reply to Khem Raj
Quoted 7 lines · Khem Raj
Quoted 6 lines · Kang Kai
Quoted 5 lines · On 2019/8/29 下午4:29, [email protected] wrote:

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.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Add a patch to generate udev rules file on target that it is not suitable for cross compile.

fails to build

https://errors.yoctoproject.org/Errors/Details/268566/

https://errors.yoctoproject.org/Errors/Details/268387/

HI Khem,

I still can't reproduce the failures. And I can't find the config of the failed builds. Would you like to tell me where can I find the build config? Thanks.

Regards,
Kai

Quoted 115 lines
Quoted 115 lines

Ping.

Quoted 109 lines
---
   .../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

(quoted diff) +1 -0
@@ -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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +3 -0
+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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +16 -0
+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)]

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +37 -0
+
+-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) {
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +1 -0
new file mode 100644
index 000000000..0787ad246
@@ -0,0 +1,17 @@
+DESCRIPTION = "libwacom is a library to identify wacom tablets and

their model-specific features."

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +5 -0
+HOMEPAGE = "https://github.com/linuxwacom/libwacom/wiki"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=40a21fffb367c82f39fd91a3b137c36e"

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +11 -0
+
+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
Signature · 1 line
Kai Kang
#5 lore raw
Quoted 15 lines · Kang Kai
Quoted 14 lines · Khem Raj
Quoted 8 lines · Kang Kai
Quoted 7 lines · On 2019/8/29 下午4:29, [email protected] wrote:

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.

fails to build

https://errors.yoctoproject.org/Errors/Details/268566/

Quoted 8 lines
Quoted 1 line

https://errors.yoctoproject.org/Errors/Details/268387/

HI Khem,

I still can't reproduce the failures. And I can't find the config of the failed builds. Would you like to tell me where can I find the build config? Thanks.

This is using gold linker I think that’s what you might be missing

Quoted 131 lines

Regards,
Kai

Quoted 8 lines
Quoted 8 lines

Ping.

Quoted 3 lines
---
   .../generate-udev-rules-on-target.patch       | 59

+++++++++++++++++++

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
   .../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

Quoted 1 line
Quoted 1 line
Quoted 1 line

create mode 100644 meta-oe/recipes-extended/libwacom/

libwacom_1.0.bb

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

diff --git

a/meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch

Quoted 1 line
Quoted 1 line
Quoted 1 line

b/meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

new file mode 100644
index 000000000..27e037c98
--- /dev/null
+++

b/meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch

Quoted 84 lines
Quoted 84 lines
Quoted 84 lines
(quoted diff) +1 -0
@@ -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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +3 -0
+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

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +16 -0
+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)]

meta-oe/recipes-extended/libwacom/libwacom/generate-udev-rules-on-target.patch new file +37 -0
+
+-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) {
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +1 -0
new file mode 100644
index 000000000..0787ad246
@@ -0,0 +1,17 @@
+DESCRIPTION = "libwacom is a library to identify wacom tablets and

their model-specific features."

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +5 -0
+HOMEPAGE = "https://github.com/linuxwacom/libwacom/wiki"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=40a21fffb367c82f39fd91a3b137c36e"

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +4 -0
+
+DEPENDS = "libgudev libxml2"
+
+SRC_URI = "git://github.com/linuxwacom/libwacom.git;protocol=https \
Quoted 8 lines
Quoted 8 lines

meta-oe/recipes-extended/libwacom/libwacom_1.0.bb line 17

Quoted 7 lines
meta-oe/recipes-extended/libwacom/libwacom_1.0.bb new file +7 -0
+           file://generate-udev-rules-on-target.patch \
+           "
+SRCREV = "ae6c9cf78802844349986ac2a708d87e891a3e6e"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig

--
Kai Kang

author
#6 lore raw
Quoted 31 lines · Khem Raj

On Wed, Sep 11, 2019 at 8:18 PM Kang Kai <[email protected] <mailto:[email protected]>> wrote:

    On 2019/9/6 上午9:10, Khem Raj wrote:
    > On 9/4/19 6:51 PM, Kang Kai wrote:
    >> On 2019/8/29 下午4:29, [email protected]
    <mailto:[email protected]> wrote:
    >>> From: Kai Kang <[email protected]
    <mailto:[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.
    >
    > fails to build
    >
    > https://errors.yoctoproject.org/Errors/Details/268566/
    >
    > https://errors.yoctoproject.org/Errors/Details/268387/

    HI Khem,

    I still can't reproduce the failures. And I can't find the config
    of the
    failed builds. Would you like to tell me where can I find the build
    config? Thanks.
Quoted 1 line

This is using gold linker I think that’s what you might be missing

Thanks. I'll try it.

Quoted 143 lines
    Regards,
    Kai


    >
    >
    >> Ping.
    >>
    >>
    >>> Signed-off-by: Kai Kang <[email protected]
    <mailto:[email protected]>>
    >>> ---
    >>> .../generate-udev-rules-on-target.patch       | 59
    +++++++++++++++++++
    >>>    .../recipes-extended/libwacom/libwacom_1.0.bb
    <http://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
    <http://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]
    <mailto:[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
    <http://libwacom_1.0.bb>
    >>> b/meta-oe/recipes-extended/libwacom/libwacom_1.0.bb
    <http://libwacom_1.0.bb>
    >>> new file mode 100644
    >>> index 000000000..0787ad246
    >>> --- /dev/null
    >>> +++ b/meta-oe/recipes-extended/libwacom/libwacom_1.0.bb
    <http://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
    <http://github.com/linuxwacom/libwacom.git;protocol=https> \
    >>> + file://generate-udev-rules-on-target.patch \
    >>> +           "
    >>> +SRCREV = "ae6c9cf78802844349986ac2a708d87e891a3e6e"
    >>> +
    >>> +S = "${WORKDIR}/git"
    >>> +
    >>> +inherit meson pkgconfig
    >>

    -- 
    Kai Kang
Signature · 1 line
Kai Kang