Skip to contentSkip to conversation

libiio: Conditionally inherit distutils3-base

PATCH Superseded Martin Siegumfeldt 2 participants 2 messages Oct 28, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libiio: Conditionally inherit distutils3-base

* inherit only when PACKAGECONFIG indicates Python bindings is build

---
 meta-oe/recipes-support/libiio/libiio_git.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-support/libiio/libiio_git.bb +3 -1
index e6e0eaef8..027e4d5e5 100644
@@ -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 \
@@ -30,6 +30,8 @@ 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"
 
+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"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 22 lines · Martin Siegumfeldt

* inherit only when PACKAGECONFIG indicates Python bindings is build

---
 meta-oe/recipes-support/libiio/libiio_git.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-support/libiio/libiio_git.bb +1 -1
index e6e0eaef8..027e4d5e5 100644
@@ -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 \

meta-oe/recipes-support/libiio/libiio_git.bb PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND" · line 34

Quoted 5 lines
meta-oe/recipes-support/libiio/libiio_git.bb +2 -0
@@ -30,6 +30,8 @@ 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"
 
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)}
+

we also need to define this packageconfig where it should add -DPYTHON_BINDINGS=OFF
when it is not set

Quoted 11 lines
meta-oe/recipes-support/libiio/libiio_git.bb +0 -1
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
 
 RDEPENDS_${PN}-${PYTHON_PN} = "${PN} ${PYTHON_PN}-ctypes ${PYTHON_PN}-stringold"
--

2.17.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel