Re: [oe] [meta-oe][Patch] libwacom: add recipe

2019-09-11 Thread Kang Kai

On 2019/9/12 上午11:21, Khem Raj wrote:



On Wed, Sep 11, 2019 at 8:18 PM Kang Kai > 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, kai.k...@windriver.com
 wrote:
>>> From: Kai Kang mailto:kai.k...@windriver.com>>
>>>
>>> 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.


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


Thanks. I'll try it.




Regards,
Kai


>
>
>> Ping.
>>
>>
>>> Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
>>> ---
>>> .../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 0..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 mailto:kai.k...@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

Re: [oe] [meta-oe][Patch] libwacom: add recipe

2019-09-11 Thread Khem Raj
On Wed, Sep 11, 2019 at 8:18 PM Kang Kai  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, kai.k...@windriver.com wrote:
> >>> From: Kai Kang 
> >>>
> >>> 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.
>

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

>
> Regards,
> Kai
>
>
> >
> >
> >> Ping.
> >>
> >>
> >>> Signed-off-by: Kai Kang 
> >>> ---
> >>>.../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 0..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 
> >>> +---
> >>> +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 0..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 =
> >>> 

Re: [oe] [meta-oe][Patch] libwacom: add recipe

2019-09-11 Thread Kang Kai

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, kai.k...@windriver.com wrote:

From: Kai Kang 

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.


Regards,
Kai






Ping.



Signed-off-by: Kai Kang 
---
   .../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 0..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 
+---
+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 0..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




--
Kai Kang

--
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-oe][Patch] libwacom: add recipe

2019-09-05 Thread Kang Kai

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, kai.k...@windriver.com wrote:

From: Kai Kang 

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/


Thanks. I'll check them.

Kai






Ping.



Signed-off-by: Kai Kang 
---
   .../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 0..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 
+---
+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 0..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




--
Kai Kang

--
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-oe][Patch] libwacom: add recipe

2019-09-05 Thread Khem Raj

On 9/4/19 6:51 PM, Kang Kai wrote:
> On 2019/8/29 下午4:29, kai.k...@windriver.com wrote:
>> From: Kai Kang 
>>
>> 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/


>
> Ping.
>
>
>> Signed-off-by: Kai Kang 
>> ---
>>   .../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 0..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 
>> +---
>> +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 0..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
>
>
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-oe][Patch] libwacom: add recipe

2019-09-04 Thread Kang Kai

On 2019/8/29 下午4:29, kai.k...@windriver.com wrote:

From: Kai Kang 

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.



Signed-off-by: Kai Kang 
---
  .../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 0..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 
+---
+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 0..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



--
Kai Kang

--
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe][Patch] libwacom: add recipe

2019-08-29 Thread kai.kang
From: Kai Kang 

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 
---
 .../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 0..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 
+---
+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 0..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
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel