From: Sam Van Den Berge <[email protected]>

See https://github.com/openembedded/meta-openembedded/issues/248

Signed-off-by: Sam Van Den Berge <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
---
 meta-oe/recipes-support/libiio/libiio_git.bb | 26 +++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb 
b/meta-oe/recipes-support/libiio/libiio_git.bb
index b308bde171..00c016db44 100644
--- a/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -12,13 +12,15 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
 
-inherit cmake python3native systemd
+DISTUTILS_SETUP_PATH ?= "${B}/bindings/python/"
 
 DEPENDS = " \
     flex-native bison-native libaio \
     ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
 "
 
+inherit cmake python3native systemd setuptools3
+
 EXTRA_OECMAKE = " \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \
@@ -31,8 +33,6 @@ PACKAGECONFIG[usb_backend] = 
"-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libus
 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}"
 
 RDEPENDS_${PN}-${PYTHON_PN} = "${PN} ${PYTHON_PN}-ctypes 
${PYTHON_PN}-stringold"
@@ -46,3 +46,23 @@ FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}"
 
 SYSTEMD_PACKAGES = "${PN}-iiod"
 SYSTEMD_SERVICE_${PN}-iiod = "iiod.service"
+
+# Explicitly define do_configure, do_compile and do_install because both cmake 
and setuptools3 have
+# EXPORT_FUNCTIONS do_configure do_compile do_install
+do_configure() {
+    cmake_do_configure
+}
+
+do_compile() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 
'false', d)}; then
+        distutils3_do_compile
+    fi
+    cmake_do_compile
+}
+
+do_install() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 
'false', d)}; then
+        distutils3_do_install
+    fi
+    cmake_do_install
+}
-- 
2.30.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#89910): 
https://lists.openembedded.org/g/openembedded-devel/message/89910
Mute This Topic: https://lists.openembedded.org/mt/81107334/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to