diff options
author | Sam Van Den Berge <sam.van.den.berge@telenet.be> | 2021-03-05 11:39:58 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-03-05 08:48:51 -0800 |
commit | 51f98865da0af69564bf47c128b9a2afae7f3cbe (patch) | |
tree | ba39d9362f3b0971a0056d58f865f7ff2fcfe4b6 /meta-oe/recipes-support/libiio/libiio_git.bb | |
parent | f6f0d171b022d3055e2cc318172ace2cbee30805 (diff) | |
download | meta-openembedded-51f98865da0af69564bf47c128b9a2afae7f3cbe.tar.gz |
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>
Diffstat (limited to 'meta-oe/recipes-support/libiio/libiio_git.bb')
-rw-r--r-- | meta-oe/recipes-support/libiio/libiio_git.bb | 26 |
1 files 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 b308bde17..00c016db4 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+)+)" | |||
12 | 12 | ||
13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
14 | 14 | ||
15 | inherit cmake python3native systemd | 15 | DISTUTILS_SETUP_PATH ?= "${B}/bindings/python/" |
16 | 16 | ||
17 | DEPENDS = " \ | 17 | DEPENDS = " \ |
18 | flex-native bison-native libaio \ | 18 | flex-native bison-native libaio \ |
19 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ | 19 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ |
20 | " | 20 | " |
21 | 21 | ||
22 | inherit cmake python3native systemd setuptools3 | ||
23 | |||
22 | EXTRA_OECMAKE = " \ | 24 | EXTRA_OECMAKE = " \ |
23 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | 25 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
24 | -DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \ | 26 | -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 | |||
31 | PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2" | 33 | PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2" |
32 | PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF" | 34 | PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF" |
33 | 35 | ||
34 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)} | ||
35 | |||
36 | PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}" | 36 | PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}" |
37 | 37 | ||
38 | RDEPENDS_${PN}-${PYTHON_PN} = "${PN} ${PYTHON_PN}-ctypes ${PYTHON_PN}-stringold" | 38 | RDEPENDS_${PN}-${PYTHON_PN} = "${PN} ${PYTHON_PN}-ctypes ${PYTHON_PN}-stringold" |
@@ -46,3 +46,23 @@ FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}" | |||
46 | 46 | ||
47 | SYSTEMD_PACKAGES = "${PN}-iiod" | 47 | SYSTEMD_PACKAGES = "${PN}-iiod" |
48 | SYSTEMD_SERVICE_${PN}-iiod = "iiod.service" | 48 | SYSTEMD_SERVICE_${PN}-iiod = "iiod.service" |
49 | |||
50 | # Explicitly define do_configure, do_compile and do_install because both cmake and setuptools3 have | ||
51 | # EXPORT_FUNCTIONS do_configure do_compile do_install | ||
52 | do_configure() { | ||
53 | cmake_do_configure | ||
54 | } | ||
55 | |||
56 | do_compile() { | ||
57 | if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 'false', d)}; then | ||
58 | distutils3_do_compile | ||
59 | fi | ||
60 | cmake_do_compile | ||
61 | } | ||
62 | |||
63 | do_install() { | ||
64 | if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 'false', d)}; then | ||
65 | distutils3_do_install | ||
66 | fi | ||
67 | cmake_do_install | ||
68 | } | ||