[oe-commits] [meta-openembedded] 02/05: python3-evdev: upgrade 1.2.0 -> 1.3.0

git at git.openembedded.org git at git.openembedded.org
Thu Mar 5 02:55:00 UTC 2020


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 2886e8779dae15bbd7757f60313f5676c47e91e9
Author: Pierre-Jean Texier <pjtexier at koncepto.io>
AuthorDate: Wed Mar 4 20:31:09 2020 +0000

    python3-evdev: upgrade 1.2.0 -> 1.3.0
    
    Remove patch applied upstream.
    
    See full changelog https://python-evdev.readthedocs.io/en/latest/changelog.html
    
    Signed-off-by: Pierre-Jean Texier <pjtexier at koncepto.io>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../recipes-devtools/python/python-evdev.inc       |  6 +-
 ...x-build-on-32bit-arches-with-64bit-time_t.patch | 83 ----------------------
 ...thon3-evdev_1.2.0.bb => python3-evdev_1.3.0.bb} |  1 +
 3 files changed, 4 insertions(+), 86 deletions(-)

diff --git a/meta-python/recipes-devtools/python/python-evdev.inc b/meta-python/recipes-devtools/python/python-evdev.inc
index a536815..5f5426a 100644
--- a/meta-python/recipes-devtools/python/python-evdev.inc
+++ b/meta-python/recipes-devtools/python/python-evdev.inc
@@ -5,10 +5,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=18debddbb3f52c661a129724a883a8e2"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/python-evdev:"
 
-SRC_URI += " file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch"
+SRC_URI = "${PYPI_SRC_URI}"
 
-SRC_URI[md5sum] = "53e440943dfa2514f95b3c448d6a36cb"
-SRC_URI[sha256sum] = "b03f5e1be5b4a5327494a981b831d251a142b09e8778eda1a8b53eba91100166"
+SRC_URI[md5sum] = "05f9e900d6e11e1674475d2dd2668f0d"
+SRC_URI[sha256sum] = "b1c649b4fed7252711011da235782b2c260b32e004058d62473471e5cd30634d"
 
 do_compile_prepend() {
     rm -rf ${S}/evdev/ecodes.c
diff --git a/meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
deleted file mode 100644
index 154172c..0000000
--- a/meta-python/recipes-devtools/python/python-evdev/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 435e78aaf6745e4da0fe3d4455473011626c77d1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem at gmail.com>
-Date: Sat, 30 Nov 2019 11:21:20 -0800
-Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
-
-time element is deprecated on new input_event structure in kernel's
-input.h [1]
-
-[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
-
-Upstream-Status: Submitted [https://github.com/gvalkov/python-evdev/pull/112]
-Signed-off-by: Khem Raj <raj.khem at gmail.com>
----
- evdev/input.c  | 13 +++++++++----
- evdev/uinput.c |  9 ++++++++-
- 2 files changed, 17 insertions(+), 5 deletions(-)
-
-diff --git a/evdev/input.c b/evdev/input.c
-index 67b9348..432db92 100644
---- a/evdev/input.c
-+++ b/evdev/input.c
-@@ -24,6 +24,11 @@
- #include <linux/input.h>
- #endif
- 
-+#ifndef input_event_sec
-+#define input_event_sec time.tv_sec
-+#define input_event_usec time.tv_usec
-+#endif
-+
- #define MAX_NAME_SIZE 256
- 
- extern char*  EV_NAME[EV_CNT];
-@@ -60,8 +65,8 @@ device_read(PyObject *self, PyObject *args)
-         return NULL;
-     }
- 
--    PyObject* sec  = PyLong_FromLong(event.time.tv_sec);
--    PyObject* usec = PyLong_FromLong(event.time.tv_usec);
-+    PyObject* sec  = PyLong_FromLong(event.input_event_sec);
-+    PyObject* usec = PyLong_FromLong(event.input_event_usec);
-     PyObject* val  = PyLong_FromLong(event.value);
-     PyObject* py_input_event = NULL;
- 
-@@ -102,8 +107,8 @@ device_read_many(PyObject *self, PyObject *args)
- 
-     // Construct a list of event tuples, which we'll make sense of in Python
-     for (unsigned i = 0 ; i < nread/event_size ; i++) {
--        sec  = PyLong_FromLong(event[i].time.tv_sec);
--        usec = PyLong_FromLong(event[i].time.tv_usec);
-+        sec  = PyLong_FromLong(event[i].input_event_sec);
-+        usec = PyLong_FromLong(event[i].input_event_usec);
-         val  = PyLong_FromLong(event[i].value);
- 
-         py_input_event = Py_BuildValue("OOhhO", sec, usec, event[i].type, event[i].code, val);
-diff --git a/evdev/uinput.c b/evdev/uinput.c
-index 192568d..56fe86c 100644
---- a/evdev/uinput.c
-+++ b/evdev/uinput.c
-@@ -16,6 +16,10 @@
- #include <linux/uinput.h>
- #endif
- 
-+#ifndef input_event_sec
-+#define input_event_sec time.tv_sec
-+#define input_event_usec time.tv_usec
-+#endif
- 
- // Workaround for installing on kernels newer than 4.4.
- #ifndef FF_MAX_EFFECTS
-@@ -232,8 +236,11 @@ uinput_write(PyObject *self, PyObject *args)
-     if (!ret) return NULL;
- 
-     struct input_event event;
-+    struct timeval tval;
-     memset(&event, 0, sizeof(event));
--    gettimeofday(&event.time, 0);
-+    gettimeofday(&tval, 0);
-+    event.input_event_usec = tval.tv_usec;
-+    event.input_event_sec = tval.tv_sec;
-     event.type = type;
-     event.code = code;
-     event.value = value;
diff --git a/meta-python/recipes-devtools/python/python3-evdev_1.2.0.bb b/meta-python/recipes-devtools/python/python3-evdev_1.3.0.bb
similarity index 98%
rename from meta-python/recipes-devtools/python/python3-evdev_1.2.0.bb
rename to meta-python/recipes-devtools/python/python3-evdev_1.3.0.bb
index 3a92b6e..d87bf2f 100644
--- a/meta-python/recipes-devtools/python/python3-evdev_1.2.0.bb
+++ b/meta-python/recipes-devtools/python/python3-evdev_1.3.0.bb
@@ -1,2 +1,3 @@
 inherit pypi setuptools3
 require python-evdev.inc
+

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


More information about the Openembedded-commits mailing list