Skip to contentSkip to conversation

package/libevdev: add host-python dependency

PATCH New Peter Seiderer 3 participants 8 messages Mar 2, 2020 – Mar 15, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 package/libevdev: add host-python dependency

Fixes:

checking for a Python interpreter with version >= 2.6... none
configure: error: no suitable Python interpreter found

---
Notes:
- maybe something for the master branch, but no autobuilds affected, seems python is installed everywhere

Changes v1 -> v2:
- no changes

---
 package/libevdev/libevdev.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libevdev/libevdev.mk +1 -1
index 0b5a526bab..8b243be74e 100644
@@ -14,7 +14,7 @@ LIBEVDEV_LICENSE_FILES = COPYING
 LIBEVDEV_AUTORECONF = YES
 
 # Uses PKG_CHECK_MODULES() in configure.ac
-LIBEVDEV_DEPENDENCIES = host-pkgconf
+LIBEVDEV_DEPENDENCIES = host-pkgconf host-python
 
 LIBEVDEV_INSTALL_STAGING = YES
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 2/3 package/libevdev: bump version to 1.9.0

And update hash file formatting (2 spaces).

For details see [1] and [2].

[1] https://lists.freedesktop.org/archives/input-tools/2020-February/001529.html
[2] https://lists.freedesktop.org/archives/input-tools/2020-March/001530.html

---
Changes v1 -> v2:
- minor change in commit log (one extra empty line)

---
 package/libevdev/libevdev.hash | 12 ++++++------
 package/libevdev/libevdev.mk   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
package/libevdev/libevdev.hash +6 -6
index 0d2c999222..5a28275319 100644
@@ -1,8 +1,8 @@
-# From https://lists.freedesktop.org/archives/input-tools/2019-August/001521.html
-md5 879631080be18526737e33b63d848039 libevdev-1.8.0.tar.xz
-sha1 4392d28fb91a5f6eb404aab531526f5fa0bbe73d libevdev-1.8.0.tar.xz
-sha256 20d3cae4efd277f485abdf8f2a7c46588e539998b5a08c2c4d368218379d4211 libevdev-1.8.0.tar.xz
-sha512 8d285632f4fe87c01e81f94e514bec4e37fed4bc44d6d38b9297dba1114e42f6ed8d143fc05f3d0e8d51b08b659e34481dc4c65f60421c54e2f3e11efbafdeb4 libevdev-1.8.0.tar.xz
+# From https://lists.freedesktop.org/archives/input-tools/2020-March/001530.html
+md5  13c3f0911f9326d4b9fa103365f84421  libevdev-1.9.0.tar.xz
+sha1  ab5040ee88dd4cb49a75da72e8fded91b282c108  libevdev-1.9.0.tar.xz
+sha256  e7e18a64264f2dea19b6c50a481f8c062529d42919ccda0bc861495bce28eb9e  libevdev-1.9.0.tar.xz
+sha512  6e7589b5776437ac23fbf65b3194fb1dd3a68a294696145060cdd97bcdeb9b04f355f2be028dc1a5efe98ef2cafca15e4f61115edf5d62591e3a8944dc95942a  libevdev-1.9.0.tar.xz
 
 # Hash for license files:
-sha256 f063d1279b31e73007e1c54493391818b4cb5f9162d590120397e0347b932137 COPYING
+sha256  f063d1279b31e73007e1c54493391818b4cb5f9162d590120397e0347b932137  COPYING
package/libevdev/libevdev.mk +1 -1
index 8b243be74e..2fac47f2f8 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBEVDEV_VERSION = 1.8.0
+LIBEVDEV_VERSION = 1.9.0
 LIBEVDEV_SITE = http://www.freedesktop.org/software/libevdev
 LIBEVDEV_SOURCE = libevdev-$(LIBEVDEV_VERSION).tar.xz
 LIBEVDEV_LICENSE = X11
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 2/3 package/libevdev: bump version to 1.9.0

Quoted 7 lines · On Mon, 2 Mar 2020 16:09:06 +0100 Peter Seiderer <[email protected]> wrote:

And update hash file formatting (2 spaces).

For details see [1] and [2].

[1] https://lists.freedesktop.org/archives/input-tools/2020-February/001529.html
[2] https://lists.freedesktop.org/archives/input-tools/2020-March/001530.html

Quoted 8 lines

---
Changes v1 -> v2:
- minor change in commit log (one extra empty line)

---
 package/libevdev/libevdev.hash | 12 ++++++------
 package/libevdev/libevdev.mk   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v2 3/3 package/libevdev: convert to meson

In reply to Peter Seiderer

- drop legacy patch 0001-configure-add-disable-runtime-tests-option.patch and use -Dtests=disabled instead

- drop host-pkgconf dependency as pkgconf is only used in case tests are enabled to find the check package (checked via meson output - no 'Found pkg-config' - and via strace)

- update host-python dependecy to host-python3 as the script libevdev/make-event-names.py which is used to generate the header file event-names.h is updated to python3:
'#!/usr/bin/env python3'
This made no difference with autotools build as the script was called with '$(PYTHON) libevdev/make-event-names.py'.

- add patch to fix tools compile with older toolchains adding the local include path (only the meson build is affected)

---
Changes v1 -> v2:
- really add the patch

---
 ...ure-add-disable-runtime-tests-option.patch | 44 ---------------
 ...ild-use-local-include-path-for-tools.patch | 54 +++++++++++++++++++
 package/libevdev/libevdev.mk                  | 13 +++--
 3 files changed, 60 insertions(+), 51 deletions(-)
 delete mode 100644 package/libevdev/0001-configure-add-disable-runtime-tests-option.patch
 create mode 100644 package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch
package/libevdev/0001-configure-add-disable-runtime-tests-option.patch deleted +0 -44
deleted file mode 100644
index 745903178c..0000000000
@@ -1,44 +0,0 @@
-From 93f6bc2b97a2b76a5e725d63d4b6c2dfe7baf63b Mon Sep 17 00:00:00 2001
-From: Peter Seiderer <[email protected]>
-Date: Sun, 11 Oct 2015 13:33:19 +0200
-Subject: [PATCH] configure: add '--disable-runtime-tests' option
-
-Signed-off-by: Peter Seiderer <[email protected]>
-[Rebased libevdev-1.6.0]
-Signed-off-by: Peter Seiderer <[email protected]>
----
- configure.ac | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5161d93..2b3bb26 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -76,7 +76,14 @@ else
- 	AC_MSG_WARN([check not found - skipping building unit tests])
- fi
- AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
--AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x$HAVE_CHECK" = "xyes"])
-+
-+AC_ARG_ENABLE([runtime-tests],
-+	AS_HELP_STRING([--disable-runtime-tests], [Disable runtime tests]))
-+AS_IF([test "x$enable_runtime_tests" != "xno"],
-+	[enable_runtime_tests=yes],
-+	[enable_runtime_tests=no])
-+
-+AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x${enable_runtime_tests}x$HAVE_CHECK" = "xyesxyes"])
- AM_CONDITIONAL(ENABLE_STATIC_LINK_TEST, [test "x$enable_static" = "xyes"])
- 
- with_cflags=""
-@@ -162,7 +169,7 @@ AC_MSG_RESULT([
- 	       Libdir				${libdir}
- 
- 	       Build documentation		${have_doxygen}
--	       Enable unit-tests		${HAVE_CHECK}
-+	       Enable unit-tests		${HAVE_CHECK} (runtime-tests: ${enable_runtime_tests})
- 	       Enable profiling			${enable_gcov}
- 	       Static library symbol check	${static_symbol_leaks_test}
- 	       ])
--- 
-2.19.1
-
package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch new file +54 -0

54 lines not on this page · raw message

package/libevdev/libevdev.mk +6 -7
index 2fac47f2f8..9cd09ac2d3 100644
@@ -10,14 +10,13 @@ LIBEVDEV_SOURCE = libevdev-$(LIBEVDEV_VERSION).tar.xz
 LIBEVDEV_LICENSE = X11
 LIBEVDEV_LICENSE_FILES = COPYING
 
-# patch touches configure.ac
-LIBEVDEV_AUTORECONF = YES
-
-# Uses PKG_CHECK_MODULES() in configure.ac
-LIBEVDEV_DEPENDENCIES = host-pkgconf host-python
+LIBEVDEV_DEPENDENCIES = host-python3
 
 LIBEVDEV_INSTALL_STAGING = YES
 
-LIBEVDEV_CONF_OPTS += --disable-runtime-tests
+LIBEVDEV_CONF_OPTS += \
+	-Dtests=disabled \
+	-Ddocumentation=disabled \
+	-Dcoverity=false
 
-$(eval $(autotools-package))
+$(eval $(meson-package))
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 3/3 package/libevdev: convert to meson

Quoted 94 lines · Peter Seiderer

- drop legacy patch 0001-configure-add-disable-runtime-tests-option.patch and use -Dtests=disabled instead

- drop host-pkgconf dependency as pkgconf is only used in case tests are enabled to find the check package (checked via meson output - no 'Found pkg-config' - and via strace)

- update host-python dependecy to host-python3 as the script libevdev/make-event-names.py which is used to generate the header file event-names.h is updated to python3:
'#!/usr/bin/env python3'
This made no difference with autotools build as the script was called with '$(PYTHON) libevdev/make-event-names.py'.

- add patch to fix tools compile with older toolchains adding the local include path (only the meson build is affected)

---
Changes v1 -> v2:
- really add the patch

---
 ...ure-add-disable-runtime-tests-option.patch | 44 ---------------
 ...ild-use-local-include-path-for-tools.patch | 54 +++++++++++++++++++
 package/libevdev/libevdev.mk                  | 13 +++--
 3 files changed, 60 insertions(+), 51 deletions(-)
 delete mode 100644 package/libevdev/0001-configure-add-disable-runtime-tests-option.patch
 create mode 100644 package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch
package/libevdev/0001-configure-add-disable-runtime-tests-option.patch deleted +0 -44
deleted file mode 100644
index 745903178c..0000000000
@@ -1,44 +0,0 @@
-From 93f6bc2b97a2b76a5e725d63d4b6c2dfe7baf63b Mon Sep 17 00:00:00 2001
-From: Peter Seiderer <[email protected]>
-Date: Sun, 11 Oct 2015 13:33:19 +0200
-Subject: [PATCH] configure: add '--disable-runtime-tests' option
-
-Signed-off-by: Peter Seiderer <[email protected]>
-[Rebased libevdev-1.6.0]
-Signed-off-by: Peter Seiderer <[email protected]>
----
- configure.ac | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5161d93..2b3bb26 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -76,7 +76,14 @@ else
- 	AC_MSG_WARN([check not found - skipping building unit tests])
- fi
- AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
--AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x$HAVE_CHECK" = "xyes"])
-+
-+AC_ARG_ENABLE([runtime-tests],
-+	AS_HELP_STRING([--disable-runtime-tests], [Disable runtime tests]))
-+AS_IF([test "x$enable_runtime_tests" != "xno"],
-+	[enable_runtime_tests=yes],
-+	[enable_runtime_tests=no])
-+
-+AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x${enable_runtime_tests}x$HAVE_CHECK" = "xyesxyes"])
- AM_CONDITIONAL(ENABLE_STATIC_LINK_TEST, [test "x$enable_static" = "xyes"])
- 
- with_cflags=""
-@@ -162,7 +169,7 @@ AC_MSG_RESULT([
- 	       Libdir				${libdir}
- 
- 	       Build documentation		${have_doxygen}
--	       Enable unit-tests		${HAVE_CHECK}
-+	       Enable unit-tests		${HAVE_CHECK} (runtime-tests: ${enable_runtime_tests})
- 	       Enable profiling			${enable_gcov}
- 	       Static library symbol check	${static_symbol_leaks_test}
- 	       ])
--- 
-2.19.1
-
package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch new file +9 -0
new file mode 100644
index 0000000000..aa0af75055
@@ -0,0 +1,54 @@
+From 83eb5bbac775d46b74e7f99fbd243d53f0118b37 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Mon, 2 Mar 2020 15:43:14 +0100
+Subject: [PATCH] meson.build: use local include path for tools
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes the following compile failure with old toolchains and meson

package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch line 19

Quoted 10 lines
package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch new file +10 -0
+build (autotools build not affected):
+
+  ../tools/mouse-dpi-tool.c: In function ?handle_event?:
+  ../tools/mouse-dpi-tool.c:115:13: error: ?const struct input_event? has no member named ?input_event_sec?
+     m->us = ev->input_event_sec * 1000000 + ev->input_event_usec;
+               ^
+  ../tools/mouse-dpi-tool.c:115:45: error: ?const struct input_event? has no member named ?input_event_usec?
+     m->us = ev->input_event_sec * 1000000 + ev->input_event_usec;
+                                               ^
+

Upstream: https://lists.freedesktop.org/archives/input-tools/2020-March/001532.html
https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/42

Quoted 60 lines
package/libevdev/0001-meson.build-use-local-include-path-for-tools.patch new file +35 -0
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ meson.build | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 4831f8e..5500a83 100644
+--- a/meson.build
++++ b/meson.build
+@@ -102,18 +102,22 @@ install_man(manpage)
+ # tools
+ executable('libevdev-events',
+ 	   sources: ['tools/libevdev-events.c'],
++	   include_directories: [includes_include],
+ 	   dependencies: dep_libevdev,
+ 	   install: false)
+ executable('touchpad-edge-detector',
+ 	   sources: ['tools/touchpad-edge-detector.c'],
++	   include_directories: [includes_include],
+ 	   dependencies: [dep_libevdev, dep_lm],
+            install: true)
+ executable('mouse-dpi-tool',
+ 	   sources: ['tools/mouse-dpi-tool.c'],
++	   include_directories: [includes_include],
+ 	   dependencies: dep_libevdev,
+            install: true)
+ executable('libevdev-tweak-device',
+ 	   sources: ['tools/libevdev-tweak-device.c'],
++	   include_directories: [includes_include],
+ 	   dependencies: dep_libevdev,
+ 	   install: true)
+ 
+-- 
+2.25.1
+
package/libevdev/libevdev.mk +6 -7
index 2fac47f2f8..9cd09ac2d3 100644
@@ -10,14 +10,13 @@ LIBEVDEV_SOURCE = libevdev-$(LIBEVDEV_VERSION).tar.xz
 LIBEVDEV_LICENSE = X11
 LIBEVDEV_LICENSE_FILES = COPYING
 
-# patch touches configure.ac
-LIBEVDEV_AUTORECONF = YES
-
-# Uses PKG_CHECK_MODULES() in configure.ac
-LIBEVDEV_DEPENDENCIES = host-pkgconf host-python
+LIBEVDEV_DEPENDENCIES = host-python3
 
 LIBEVDEV_INSTALL_STAGING = YES
 
-LIBEVDEV_CONF_OPTS += --disable-runtime-tests
+LIBEVDEV_CONF_OPTS += \
+	-Dtests=disabled \
+	-Ddocumentation=disabled \
+	-Dcoverity=false
 
-$(eval $(autotools-package))
+$(eval $(meson-package))
#5 lore raw

PATCH v2 3/3 package/libevdev: convert to meson

In reply to Peter Seiderer
Quoted 14 lines · On Mon, 2 Mar 2020 16:09:07 +0100 Peter Seiderer <[email protected]> wrote:

- drop legacy patch 0001-configure-add-disable-runtime-tests-option.patch and use -Dtests=disabled instead

- drop host-pkgconf dependency as pkgconf is only used in case tests are enabled to find the check package (checked via meson output - no 'Found pkg-config' - and via strace)

- update host-python dependecy to host-python3 as the script libevdev/make-event-names.py which is used to generate the header file event-names.h is updated to python3:
'#!/usr/bin/env python3'
This made no difference with autotools build as the script was called with '$(PYTHON) libevdev/make-event-names.py'.

Quoted 4 lines

- add patch to fix tools compile with older toolchains adding the local include path (only the meson build is affected)

I've changed the host-python3 dependency to use $(BR2_PYTHON3_HOST_DEPENDENCY) instead, so that we only build host-python3 is not Python 3.x interpreter is available. And I applied to next.

But anyway as replied on PATCH 1/3, we have an issue where host-python3 doesn't build if there's no Python 3.x interpreter available on the build machine.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH v2 1/3 package/libevdev: add host-python dependency

In reply to Peter Seiderer

Hello,

Quoted 6 lines · On Mon, 2 Mar 2020 16:09:05 +0100 Peter Seiderer <[email protected]> wrote:

Fixes:

checking for a Python interpreter with version >= 2.6... none
configure: error: no suitable Python interpreter found

I've applied to master. Ideally, I would have preferred to use host-python3, since Titouan is working on making sure everything in Buildroot builds properly with Python 3. However due to another issue host-python3 is not self-sufficient: it doesn't build if Python3 is not already installed on the build machine!

So, for now, I've applied your patch as-is to master.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH v2 1/3 package/libevdev: add host-python dependency

In reply to Peter Seiderer
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

Fixes:
checking for a Python interpreter with version >= 2.6... none
configure: error: no suitable Python interpreter found

Quoted 8 lines

---
Notes:
- maybe something for the master branch, but no autobuilds affected, seems python is installed everywhere

Changes v1 -> v2:
- no changes

Committed to 2019.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard