[oe-commits] [meta-openembedded] 58/58: python-evdev: Use target header to generate ecodes.c

git at git.openembedded.org git at git.openembedded.org
Sun May 6 20:02:36 UTC 2018


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

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

commit a19aa29f7fa336cd075b72c496fe1102e6e5422b
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Apr 27 14:14:54 2018 -0700

    python-evdev: Use target header to generate ecodes.c
    
    ecodes.c is generated file and if we do not specify the
    linux input headers it happiliy defaults to /usr/include/
    to look for these headers while emitting code for ecodes.c
    which can cause gripes when build systems kernel UAPI is
    different than the target kernel. Mysterious build errors
    or even worse runtime errors can start to appear.
    
    e.g.
    
    | evdev/ecodes.c:603:29: error: 'KEY_ROTATE_LOCK_TOGGLE' undeclared (first use in this function); did you mean 'KEY_ATTENDANT_TOGGLE'?
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-python/recipes-devtools/python/python-evdev.inc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-python/recipes-devtools/python/python-evdev.inc b/meta-python/recipes-devtools/python/python-evdev.inc
index ccd5077..5a3884a 100644
--- a/meta-python/recipes-devtools/python/python-evdev.inc
+++ b/meta-python/recipes-devtools/python/python-evdev.inc
@@ -6,6 +6,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=18debddbb3f52c661a129724a883a8e2"
 SRC_URI[md5sum] = "c7e855ae9f97f869a59e75b29f05ce74"
 SRC_URI[sha256sum] = "57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1"
 
+do_compile_prepend() {
+    rm -rf ${S}/evdev/ecodes.c
+}
+
+DISTUTILS_BUILD_ARGS = "build_ecodes --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h"
+
 RDEPENDS_${PN} += "\
     ${PYTHON_PN}-ctypes \
     ${PYTHON_PN}-fcntl \

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


More information about the Openembedded-commits mailing list