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.patch34
-rw-r--r--meta-oe/recipes-support/libiio/libiio_git.bb4
2 files changed, 37 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..4d3dcd5ced
--- /dev/null
+++ b/meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch
@@ -0,0 +1,34 @@
1From 717b0f46b23ddc042da481d1d446bdd1c6c49142 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
9Signed-off-by: Julien Malik <julien.malik@paraiso.me>
10---
11 bindings/python/setup.py.cmakein | 7 +++++++
12 1 file changed, 7 insertions(+)
13
14diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
15index cd14e2e..96d58a8 100644
16--- a/bindings/python/setup.py.cmakein
17+++ b/bindings/python/setup.py.cmakein
18@@ -54,6 +54,13 @@ class InstallWrapper(install):
19 install.run(self)
20
21 def _check_libiio_installed(self):
22+ cross_compiling = ("${CMAKE_CROSSCOMPILING}" == "TRUE")
23+ if cross_compiling:
24+ # When cross-compiling, we generally cannot dlopen
25+ # the libiio shared lib from the build platform.
26+ # Simply skip this check in that case.
27+ return
28+
29 from platform import system as _system
30 from ctypes import CDLL as _cdll
31 from ctypes.util import find_library
32--
332.25.1
34
diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
index 6f37d1e898..d2d6fd4751 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"