diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-08-27 18:05:37 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-08-28 07:13:20 -0700 |
commit | 98625eb6c501d74d18e728a8b34e9719c7011f1b (patch) | |
tree | e6724df68191bff09fe2b0356baa42cf4ca33cf1 | |
parent | 2ebaa8df1257389161d0bee9e553c28f63e52005 (diff) | |
download | meta-openembedded-98625eb6c501d74d18e728a8b34e9719c7011f1b.tar.gz |
libgpiod: nherit python3native unconditionally
this recipe inherits python3native class conditionally, this condition
depends on a given packageconfig, however inherit ${VAR} syntax requires
VAR to be evaluated before inheriting it, therefore if someone appends
python3 to packageconfig via a bbappend, then the packageconfig will
become effective and add --enable-bindings-python to configure but
inherit wont evaluate correctly since the expression adding to
packageconfig
PACKAGECONFIG_append = " python3"
will be coming _after_ the inherit, and the builds will fail e.g.
| ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory
| #include <Python.h>
This will still mean that python3native is always inherited but the
effective configure option will be --disable-bindings-python and that
will do the right thing
See. https://github.com/openembedded/meta-openembedded/issues/140
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/libgpiod/libgpiod_1.4.1.bb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.4.1.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.4.1.bb index 756b143ef..d55902898 100644 --- a/meta-oe/recipes-support/libgpiod/libgpiod_1.4.1.bb +++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.4.1.bb | |||
@@ -12,7 +12,8 @@ PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" | |||
12 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev" | 12 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev" |
13 | 13 | ||
14 | PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" | 14 | PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3" |
15 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)} | 15 | |
16 | inherit python3native | ||
16 | 17 | ||
17 | PACKAGES =+ "${PN}-python" | 18 | PACKAGES =+ "${PN}-python" |
18 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" | 19 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" |