diff --git a/package/libiio/0001-bindings-python-fix-library-loading.patch b/package/libiio/0001-bindings-python-fix-library-loading.patch index f8715b4c5b..7331e6ca19 100644 --- a/package/libiio/0001-bindings-python-fix-library-loading.patch +++ b/package/libiio/0001-bindings-python-fix-library-loading.patch @@ -7,7 +7,7 @@ On Linux the find_library() function requires ld, gcc, objdump or ldconfig on the target, which might not be present on a buildroot system. [1] We do not actually need this function at all, as we know the iio library -will be referencable in the system under the name "libiio.so". +will be referencable in the system under the name "libiio.so.1". So instead of kicking of this complicated cross-platform/cross-distro compatible machinery, we just pass in the name of the library we already know. @@ -19,23 +19,41 @@ distro setups, so we can just hardcode the lib name, but we cannot submit that upstream. Signed-off-by: Marcus Hoffmann +[updated for libiio v1: file moved to bindings/python/iio/__init__.py] --- - bindings/python/iio.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + bindings/python/iio/__init__.py | 22 +--------------------- + 1 file changed, 1 insertion(+), 21 deletions(-) -diff --git a/bindings/python/iio.py b/bindings/python/iio.py -index b91260cc..bde17694 100644 ---- a/bindings/python/iio.py -+++ b/bindings/python/iio.py -@@ -224,7 +224,7 @@ else: - # Non-windows, possibly Posix system - _iiolib = "iio" +diff --git a/bindings/python/iio/__init__.py b/bindings/python/iio/__init__.py +--- a/bindings/python/iio/__init__.py ++++ b/bindings/python/iio/__init__.py +@@ -321,26 +321,7 @@ + _StreamPtr = _POINTER(_Stream) + _AttrPtr = _POINTER(_Attr) --_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True) -+_lib = _cdll("libiio.so", use_errno=True, use_last_error=True) +-if "Windows" in _system(): +- _lib_loc = find_library("libiio1.dll") +-else: +- # Non-windows, possibly Posix system +- _lib_loc = find_library("iio") +- if _lib_loc is not None: +- if _path.islink(_lib_loc): +- _lib_loc = _path.realpath(_lib_loc) +- filename = _path.basename(_lib_loc) +- if ".so." in filename: +- version = filename.split(".so.")[1] +- elif "/Versions/" in _lib_loc: +- version = _lib_loc.split("/Versions/")[1].split("/")[0] +- else: +- version = None +- if version is not None and not version.startswith("1"): +- raise OSError(2, f"libiio version 1.x required, found version {version}") +- +-if _lib_loc is None: +- raise OSError(2, "Could not find libiio C library") ++_lib_loc = "libiio.so.1" + _lib = _cdll(_lib_loc, use_errno=True, use_last_error=True) + _libc = _cdll(find_library("c")) - _get_backends_count = _lib.iio_get_backends_count - _get_backends_count.restype = c_uint -- 2.25.1 - diff --git a/package/libiio/Config.in b/package/libiio/Config.in index 9a93253fd8..ce80aa5e95 100644 --- a/package/libiio/Config.in +++ b/package/libiio/Config.in @@ -68,6 +68,7 @@ config BR2_PACKAGE_LIBIIO_IIOD default y depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND + select BR2_PACKAGE_ZSTD help Install the IIO Daemon. diff --git a/package/libiio/libiio.hash b/package/libiio/libiio.hash index e15ac27198..dc3774225f 100644 --- a/package/libiio/libiio.hash +++ b/package/libiio/libiio.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 45eab1a3f98bfc491f3f321ea14393640ce0d0f5c1b92d0caa05d6388014d586 libiio-da72b6193911e8fc242422bea5bef90e23c3577d.tar.gz +sha256 23f08abf2055060dd719db5d876401ea601fad9e63e99e4bc6d1374710b0ece5 libiio-5b43a23144992972dd52e970c2c1cd718f97ce7a.tar.gz sha256 102900208eef27b766380135906d431dba87edaa7ec6aa72e6ebd3dd67f3a97b COPYING.txt diff --git a/package/libiio/libiio.mk b/package/libiio/libiio.mk index 9ec475137e..78d73fe128 100644 --- a/package/libiio/libiio.mk +++ b/package/libiio/libiio.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBIIO_VERSION = da72b6193911e8fc242422bea5bef90e23c3577d +LIBIIO_VERSION = 5b43a23144992972dd52e970c2c1cd718f97ce7a LIBIIO_SITE = $(call github,analogdevicesinc,libiio,$(LIBIIO_VERSION)) LIBIIO_INSTALL_STAGING = YES LIBIIO_LICENSE = LGPL-2.1+ @@ -15,8 +15,7 @@ LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \ -DWITH_LOCAL_CONFIG=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_CONFIG),ON,OFF) \ -DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \ -DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \ - -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \ - -DWITH_DOC=OFF + -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) LIBIIO_CONF_OPTS += -DNO_THREADS=OFF @@ -65,10 +64,10 @@ LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=OFF endif ifeq ($(BR2_PACKAGE_LIBAIO),y) -LIBIIO_DEPENDENCIES += libaio -LIBIIO_CONF_OPTS += -DWITH_AIO=ON +LIBIIO_DEPENDENCIES += libaio zstd +LIBIIO_CONF_OPTS += -DWITH_AIO=ON -DWITH_ZSTD=ON else -LIBIIO_CONF_OPTS += -DWITH_AIO=OFF +LIBIIO_CONF_OPTS += -DWITH_AIO=OFF -DWITH_ZSTD=OFF endif ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)