summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch37
-rw-r--r--meta-oe/recipes-support/libiio/libiio_git.bb4
2 files changed, 40 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch b/meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch
new file mode 100644
index 0000000000..5566aa0ffd
--- /dev/null
+++ b/meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch
@@ -0,0 +1,37 @@
1From 3a26f0536706fa7c241c9de986799ae440c68c8a Mon Sep 17 00:00:00 2001
2From: Julien Malik <julien.malik@unseenlabs.fr>
3Date: Mon, 27 Jul 2020 14:34:44 +0200
4Subject: [PATCH] python: Do not verify whether libiio is installed when
5 cross-compiling
6
7This should fix #561
8
9Upstream-Status: Backport
10
11Signed-off-by: Julien Malik <julien.malik@paraiso.me>
12Signed-off-by: Sam Van Den Berge <sam.van.den.berge@gmail.com>
13---
14 bindings/python/setup.py.cmakein | 7 +++++++
15 1 file changed, 7 insertions(+)
16
17diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
18index cd14e2e..96d58a8 100644
19--- a/bindings/python/setup.py.cmakein
20+++ b/bindings/python/setup.py.cmakein
21@@ -54,6 +54,13 @@ class InstallWrapper(install):
22 install.run(self)
23
24 def _check_libiio_installed(self):
25+ cross_compiling = ("${CMAKE_CROSSCOMPILING}" == "TRUE")
26+ if cross_compiling:
27+ # When cross-compiling, we generally cannot dlopen
28+ # the libiio shared lib from the build platform.
29+ # Simply skip this check in that case.
30+ return
31+
32 from platform import system as _system
33 from ctypes import CDLL as _cdll
34 from ctypes.util import find_library
35--
362.25.1
37
diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
index 00c016db44..d7e4cc60a9 100644
--- a/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
7SRCREV = "565bf68eccfdbbf22cf5cb6d792e23de564665c7" 7SRCREV = "565bf68eccfdbbf22cf5cb6d792e23de564665c7"
8PV = "0.21+git${SRCPV}" 8PV = "0.21+git${SRCPV}"
9 9
10SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https" 10SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https \
11 file://0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch \
12"
11UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" 13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
12 14
13S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"