mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +00:00
98625eb6c5
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>
22 lines
733 B
BlitzBasic
22 lines
733 B
BlitzBasic
require libgpiod.inc
|
|
|
|
DEPENDS += "autoconf-archive-native"
|
|
|
|
SRC_URI[md5sum] = "585b4bb431f99c4ba9b3ee58b9d494c1"
|
|
SRC_URI[sha256sum] = "21ae8fd1f8dafc2eb2ba50e652390cf533d21351419a7426255895cb52e21b1c"
|
|
|
|
# enable tools and cxx bindings
|
|
PACKAGECONFIG ?= "cxx tools"
|
|
|
|
PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
|
|
PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
|
|
|
|
PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
|
|
|
|
inherit python3native
|
|
|
|
PACKAGES =+ "${PN}-python"
|
|
FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
|
|
RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}"
|
|
RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}"
|