libiio: add python3 packageconfig

* used for enabling python bindings - note that behavior is changed
   from 'opt-out' to 'opt-in'

 * config is used for potentially inheriting distutils3-base

 * also decapitalize packageconfig names similar to other recipes

Signed-off-by: Martin Siegumfeldt <mns@gomspace.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Martin Siegumfeldt 2019-10-30 14:40:26 +01:00 committed by Khem Raj
parent ccd88c0c04
commit bfe856b579

View File

@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
S = "${WORKDIR}/git"
inherit cmake python3native systemd distutils3-base
inherit cmake python3native systemd
DEPENDS = " \
flex-native bison-native libaio \
@ -25,10 +25,13 @@ EXTRA_OECMAKE = " \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
"
PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND"
PACKAGECONFIG ??= "usb_backend network_backend"
PACKAGECONFIG[USB_BACKEND] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2"
PACKAGECONFIG[NETWORK_BACKEND] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2"
PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)}
PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"