mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-17 15:55:59 +01:00
libiio: fix build when python bindings are enabled
See https://github.com/openembedded/meta-openembedded/issues/248 Signed-off-by: Sam Van Den Berge <sam.van.den.berge@telenet.be> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
f6f0d171b0
commit
51f98865da
|
|
@ -12,13 +12,15 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
inherit cmake python3native systemd
|
DISTUTILS_SETUP_PATH ?= "${B}/bindings/python/"
|
||||||
|
|
||||||
DEPENDS = " \
|
DEPENDS = " \
|
||||||
flex-native bison-native libaio \
|
flex-native bison-native libaio \
|
||||||
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
|
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
inherit cmake python3native systemd setuptools3
|
||||||
|
|
||||||
EXTRA_OECMAKE = " \
|
EXTRA_OECMAKE = " \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \
|
-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[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
|
||||||
PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
|
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}"
|
PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
|
||||||
|
|
||||||
RDEPENDS_${PN}-${PYTHON_PN} = "${PN} ${PYTHON_PN}-ctypes ${PYTHON_PN}-stringold"
|
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_PACKAGES = "${PN}-iiod"
|
||||||
SYSTEMD_SERVICE_${PN}-iiod = "iiod.service"
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user