summaryrefslogtreecommitdiff
path: root/adi-iio.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-28 14:17:10 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-28 14:17:10 +0000
commit1d86b5317496f4f2fa524215389325fd7f32bd6b (patch)
tree8babbf5a6cd1f75601d2edd81d8e8a144d897848 /adi-iio.spec
parent05e40c397bfc55e6d564eaffeb026fbb34048e43 (diff)
automatic import of ros-humble-adi-iioopeneuler24.03_LTS_SP3
Diffstat (limited to 'adi-iio.spec')
-rw-r--r--adi-iio.spec33
1 files changed, 21 insertions, 12 deletions
diff --git a/adi-iio.spec b/adi-iio.spec
index 8730e08..1474dfc 100644
--- a/adi-iio.spec
+++ b/adi-iio.spec
@@ -1,11 +1,11 @@
%define ros_distro humble
%define RosPkgName adi-iio
%define src_version 1.0.1-3
-%define libiio_version 1.0.0
+%define libiio_version 0.25
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 1.0.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: ROS package to interface with IIO devices
License: Apache License, Version 2.0
URL: https://github.com/analogdevicesinc/iio_ros2/tree/humble
@@ -49,11 +49,16 @@ Vendors libiio (userspace IIO library) as it is not available on openEuler.
%autosetup -n %{RosPkgName}-%{src_version} -a 1
%build
-# Build vendored libiio first (openEuler has no libiio package).
-# Network backend disabled: it transitively pulls in libavahi/libxml2/libzstd
-# (DNS-SD discovery + XML backend + ZSTD for IIOD async API). adi-iio only
-# needs the local backend (iio_create_context_from_uri with "local:" URI) plus
-# the libiio API, so WITH_NETWORK_BACKEND=OFF avoids the whole dependency chain.
+# Build vendored libiio 0.25 first (openEuler has no libiio package).
+# Using 0.25 (last 0.x release) because adi-iio 1.0.1 uses the libiio 0.x API
+# (iio_buffer_cancel/destroy, iio_channel_enable/disable single-arg,
+# iio_device_create_buffer, iio_buffer_refill/first/step/push) which was
+# removed/changed in libiio 1.0. libiio 1.0.0 was tried in rounds 1-2 and
+# caused compilation failures due to API mismatch.
+# Network backend disabled: it transitively pulls in libavahi/libxml2
+# (DNS-SD discovery + XML backend). adi-iio only needs the local backend
+# (iio_create_context_from_uri with "local:" URI) plus the libiio API,
+# so WITH_NETWORK_BACKEND=OFF avoids the whole dependency chain.
cd libiio-%{libiio_version}
mkdir -p build && cd build
cmake .. \
@@ -67,14 +72,12 @@ cmake .. \
-DWITH_NETWORK_BACKEND=OFF \
-DWITH_ZSTD=OFF \
-DWITH_IIOD=OFF \
- -DWITH_UTILS=OFF \
-DWITH_EXAMPLES=OFF \
-DWITH_TESTS=OFF \
- -DWITH_MAN=OFF \
- -DLIBIIO_COMPAT=OFF
+ -DWITH_MAN=OFF
make %{?_smp_mflags}
_LIBIIO_BUILD_DIR="$PWD"
-_LIBIIO_INC_DIR="$(cd ../include/iio && pwd)"
+_LIBIIO_INC_DIR="$(cd .. && pwd)"
cd ../..
# Source ROS environment
@@ -115,10 +118,16 @@ make install DESTDIR=%{buildroot}
%files
/usr/lib*/libiio.so*
/usr/lib*/pkgconfig/libiio.pc
-/usr/include/iio/
+/usr/include/iio.h
/opt/ros/%{ros_distro}
%changelog
+* Mon Sep 28 2026 ai-importer <ai-importer@openeuler.org> - 1.0.1-4
+- Switch vendored libiio from 1.0.0 to 0.25: adi-iio 1.0.1 uses the libiio
+ 0.x API (iio_buffer_cancel/destroy, single-arg iio_channel_enable/disable,
+ iio_device_create_buffer, iio_buffer_refill/first/step/push) which was
+ removed/changed in libiio 1.0, causing compilation failures in iio_buffer.cpp.
+ libiio 0.25 header (iio.h) is at source root, not include/iio/ subdirectory.
* Mon Sep 28 2026 ai-importer <ai-importer@openeuler.org> - 1.0.1-3
- Disable libiio network backend: it requires libavahi/libxml2/libzstd which are
not pulled in; local backend suffices for adi-iio's iio_create_context_from_uri