From 9b5fc1605be1dfd44bbbe6a1f06fd4d5655ebb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20S=C3=A1?= Date: Thu, 28 Aug 2025 15:34:23 +0100 Subject: [PATCH] libiio: Add sysvinit support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Libiio can also be built with a sysvinit init script. Hence, enable it as iiod still runs on some system running sysvinit init scripts. Signed-off-by: Nuno Sá Signed-off-by: Khem Raj --- meta-oe/recipes-support/libiio/libiio_0.26.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-support/libiio/libiio_0.26.bb b/meta-oe/recipes-support/libiio/libiio_0.26.bb index 2fcb9e02aa..99c153149c 100644 --- a/meta-oe/recipes-support/libiio/libiio_0.26.bb +++ b/meta-oe/recipes-support/libiio/libiio_0.26.bb @@ -16,7 +16,7 @@ DEPENDS = " \ flex-native bison-native libaio \ " -inherit cmake python3native systemd setuptools3 pkgconfig +inherit cmake python3native systemd setuptools3 pkgconfig update-rc.d EXTRA_OECMAKE = " \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -25,6 +25,7 @@ EXTRA_OECMAKE = " \ -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines' \ -DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '-DWITH_SYSVINIT=on', '', d)} \ " PACKAGECONFIG ??= " \ @@ -59,6 +60,7 @@ FILES:${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" SYSTEMD_PACKAGES = "${PN}-iiod" SYSTEMD_SERVICE:${PN}-iiod = "iiod.service" +INITSCRIPT_NAME = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'iiod', '', d)}" # Explicitly define do_configure, do_compile and do_install because both cmake and setuptools3 have # EXPORT_FUNCTIONS do_configure do_compile do_install